Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-17 04:52:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-17 04:52:36 +0400
commitad96dacbc5a7cc61ccf74405927847f243a955b5 (patch)
treea2b78d3b502b99a1c7e59e8400dfd0807a896125 /source/blender/blenkernel/intern
parent9276fb479ed1c5b472c5d831f52913157efe9288 (diff)
style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/boids.c3
-rw-r--r--source/blender/blenkernel/intern/customdata.c6
-rw-r--r--source/blender/blenkernel/intern/ocean.c3
-rw-r--r--source/blender/blenkernel/intern/suggestions.c54
-rw-r--r--source/blender/blenkernel/intern/text.c12
5 files changed, 52 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 6656d06e72e..ec2e6b3c078 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -1514,7 +1514,8 @@ BoidState *boid_new_state(BoidSettings *boids)
return state;
}
-BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state) {
+BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state)
+{
BoidState *staten = MEM_dupallocN(state);
BLI_duplicatelist(&staten->rules, &state->rules);
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 6efd0a2727f..c88b21e2813 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1995,7 +1995,8 @@ void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *l
CustomData_add_layer(ldata, CD_MLOOPCOL, CD_CALLOC, &(fdata->layers[i].name), 0);
}
}
-void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata, int total){
+void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata, int total)
+{
int i;
for(i=0; i < pdata->totlayer; i++){
if(pdata->layers[i].type == CD_MTEXPOLY)
@@ -2008,7 +2009,8 @@ void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData
}
-void CustomData_bmesh_init_pool(CustomData *data, int allocsize){
+void CustomData_bmesh_init_pool(CustomData *data, int allocsize)
+{
if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize, FALSE, FALSE);
}
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index ae622358fd2..15ce2e377b6 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -1343,7 +1343,8 @@ typedef struct Ocean {
} Ocean;
-float BKE_ocean_jminus_to_foam(float UNUSED(jminus), float UNUSED(coverage)) {
+float BKE_ocean_jminus_to_foam(float UNUSED(jminus), float UNUSED(coverage))
+{
return 0.0f;
}
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c
index 48bc4926a85..e1e872c42b6 100644
--- a/source/blender/blenkernel/intern/suggestions.c
+++ b/source/blender/blenkernel/intern/suggestions.c
@@ -47,7 +47,8 @@ static SuggList suggestions = {NULL, NULL, NULL, NULL, NULL};
static char *documentation = NULL;
//static int doc_lines = 0;
-static int txttl_cmp(const char *first, const char *second, int len) {
+static int txttl_cmp(const char *first, const char *second, int len)
+{
int cmp, i;
for (cmp=0, i=0; i<len; i++) {
if ( (cmp= toupper(first[i])-toupper(second[i])) ) {
@@ -57,7 +58,8 @@ static int txttl_cmp(const char *first, const char *second, int len) {
return cmp;
}
-static void txttl_free_suggest(void) {
+static void txttl_free_suggest(void)
+{
SuggItem *item, *prev;
for (item = suggestions.last; item; item=prev) {
prev = item->prev;
@@ -69,7 +71,8 @@ static void txttl_free_suggest(void) {
suggestions.top = 0;
}
-static void txttl_free_docs(void) {
+static void txttl_free_docs(void)
+{
if (documentation) {
MEM_freeN(documentation);
documentation = NULL;
@@ -80,23 +83,27 @@ static void txttl_free_docs(void) {
/* General tool functions */
/**************************/
-void free_texttools(void) {
+void free_texttools(void)
+{
txttl_free_suggest();
txttl_free_docs();
}
-void texttool_text_set_active(Text *text) {
+void texttool_text_set_active(Text *text)
+{
if (activeToolText == text) return;
texttool_text_clear();
activeToolText = text;
}
-void texttool_text_clear(void) {
+void texttool_text_clear(void)
+{
free_texttools();
activeToolText = NULL;
}
-short texttool_text_is_active(Text *text) {
+short texttool_text_is_active(Text *text)
+{
return activeToolText==text ? 1 : 0;
}
@@ -104,7 +111,8 @@ short texttool_text_is_active(Text *text) {
/* Suggestion list methods */
/***************************/
-void texttool_suggest_add(const char *name, char type) {
+void texttool_suggest_add(const char *name, char type)
+{
SuggItem *newitem, *item;
int len, cmp;
@@ -154,7 +162,8 @@ void texttool_suggest_add(const char *name, char type) {
suggestions.top= 0;
}
-void texttool_suggest_prefix(const char *prefix) {
+void texttool_suggest_prefix(const char *prefix)
+{
SuggItem *match, *first, *last;
int cmp, len = strlen(prefix), top = 0;
@@ -194,27 +203,33 @@ void texttool_suggest_prefix(const char *prefix) {
}
}
-void texttool_suggest_clear(void) {
+void texttool_suggest_clear(void)
+{
txttl_free_suggest();
}
-SuggItem *texttool_suggest_first(void) {
+SuggItem *texttool_suggest_first(void)
+{
return suggestions.firstmatch;
}
-SuggItem *texttool_suggest_last(void) {
+SuggItem *texttool_suggest_last(void)
+{
return suggestions.lastmatch;
}
-void texttool_suggest_select(SuggItem *sel) {
+void texttool_suggest_select(SuggItem *sel)
+{
suggestions.selected = sel;
}
-SuggItem *texttool_suggest_selected(void) {
+SuggItem *texttool_suggest_selected(void)
+{
return suggestions.selected;
}
-int *texttool_suggest_top(void) {
+int *texttool_suggest_top(void)
+{
return &suggestions.top;
}
@@ -222,7 +237,8 @@ int *texttool_suggest_top(void) {
/* Documentation methods */
/*************************/
-void texttool_docs_show(const char *docs) {
+void texttool_docs_show(const char *docs)
+{
int len;
if (!docs) return;
@@ -246,10 +262,12 @@ void texttool_docs_show(const char *docs) {
documentation[len] = '\0';
}
-char *texttool_docs_get(void) {
+char *texttool_docs_get(void)
+{
return documentation;
}
-void texttool_docs_clear(void) {
+void texttool_docs_clear(void)
+{
txttl_free_docs();
}
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 60cc029bf6e..7e102bc9854 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -2851,7 +2851,8 @@ void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsign
/* Returns the first matching marker on the specified line between two points.
If the group or flags fields are non-zero the returned flag must be in the
specified group and have at least the specified flags set. */
-TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags) {
+TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags)
+{
TextMarker *marker, *next;
int lineno= txt_get_span(text->lines.first, line);
@@ -2918,7 +2919,8 @@ short txt_clear_markers(Text *text, int group, int flags)
/* Finds the marker at the specified line and cursor position with at least the
specified flags set in the given group (if non-zero). */
-TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int flags) {
+TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int flags)
+{
TextMarker *marker;
int lineno= txt_get_span(text->lines.first, line);
@@ -2936,7 +2938,8 @@ TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int
/* Finds the previous marker in the same group. If no other is found, the same
marker will be returned */
-TextMarker *txt_prev_marker(Text *text, TextMarker *marker) {
+TextMarker *txt_prev_marker(Text *text, TextMarker *marker)
+{
TextMarker *tmp= marker;
while (tmp) {
if (tmp->prev) tmp= tmp->prev;
@@ -2949,7 +2952,8 @@ TextMarker *txt_prev_marker(Text *text, TextMarker *marker) {
/* Finds the next marker in the same group. If no other is found, the same
marker will be returned */
-TextMarker *txt_next_marker(Text *text, TextMarker *marker) {
+TextMarker *txt_next_marker(Text *text, TextMarker *marker)
+{
TextMarker *tmp= marker;
while (tmp) {
if (tmp->next) tmp= tmp->next;