From 018fa1540eaef603b28c04fd5b8533d21122e36f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Sep 2011 05:53:40 +0000 Subject: whitespace edits, make formatting for functions consustent at least within the file. --- source/blender/avi/intern/avirgb.c | 6 ++++-- source/blender/blenkernel/intern/boids.c | 3 ++- source/blender/blenkernel/intern/collision.c | 3 ++- source/blender/blenkernel/intern/constraint.c | 3 ++- source/blender/blenkernel/intern/displist.c | 3 ++- source/blender/blenkernel/intern/idcode.c | 3 ++- source/blender/blenkernel/intern/object.c | 6 ++++-- source/blender/blenkernel/intern/pointcache.c | 3 ++- source/blender/blenkernel/intern/sequencer.c | 3 ++- source/blender/blenkernel/intern/text.c | 9 +++++--- source/blender/blenkernel/intern/writeffmpeg.c | 3 ++- source/blender/blenlib/intern/BLI_args.c | 3 ++- source/blender/blenlib/intern/BLI_dynstr.c | 9 +++++--- source/blender/blenlib/intern/BLI_kdopbvh.c | 3 ++- source/blender/blenlib/intern/bpath.c | 12 +++++++---- source/blender/blenlib/intern/math_base.c | 3 ++- source/blender/blenlib/intern/path_util.c | 18 ++++++++++------ source/blender/blenlib/intern/storage.c | 3 ++- source/blender/blenlib/intern/string.c | 18 ++++++++++------ source/blender/blenlib/intern/threads.c | 3 ++- source/blender/blenloader/intern/readblenentry.c | 3 ++- source/blender/collada/AnimationImporter.cpp | 2 +- source/blender/collada/AnimationImporter.h | 2 +- source/blender/editors/curve/editcurve.c | 10 +++++---- source/blender/editors/interface/interface.c | 3 ++- source/blender/editors/object/object_bake.c | 3 ++- source/blender/editors/object/object_vgroup.c | 24 ++++++++++++++-------- source/blender/editors/screen/glutil.c | 9 +++++--- source/blender/editors/sculpt_paint/paint_image.c | 9 +++++--- source/blender/editors/space_file/filelist.c | 3 ++- source/blender/editors/space_node/node_edit.c | 3 ++- .../editors/space_sequencer/sequencer_select.c | 3 ++- source/blender/editors/space_view3d/drawobject.c | 3 ++- .../blender/editors/transform/transform_generics.c | 3 ++- source/blender/editors/transform/transform_input.c | 12 +++++++---- source/blender/editors/transform/transform_snap.c | 9 +++++--- source/blender/gpu/intern/gpu_buffers.c | 9 +++++--- source/blender/imbuf/intern/bmp.c | 8 ++++---- source/blender/imbuf/intern/imageprocess.c | 6 ++++-- source/blender/imbuf/intern/indexer_dv.c | 3 ++- source/blender/imbuf/intern/jpeg.c | 4 ++-- source/blender/imbuf/intern/targa.c | 3 ++- source/blender/modifiers/intern/MOD_explode.c | 3 ++- .../blender/modifiers/intern/MOD_weightvg_util.c | 6 ++++-- .../nodes/composite/nodes/node_composite_common.c | 3 ++- source/blender/python/generic/py_capi_utils.c | 6 ++++-- source/blender/python/intern/bpy_rna.c | 4 ++-- source/blender/windowmanager/intern/wm_cursors.c | 4 ++-- source/blender/windowmanager/intern/wm_operators.c | 3 ++- 49 files changed, 182 insertions(+), 98 deletions(-) diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c index 7050aec9bf6..c7d47b9da0d 100644 --- a/source/blender/avi/intern/avirgb.c +++ b/source/blender/avi/intern/avirgb.c @@ -44,7 +44,8 @@ /* implementation */ -void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) { +void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) +{ int x, y,i, rowstride; unsigned char *buf; AviBitmapInfoHeader *bi; @@ -116,7 +117,8 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu } } -void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) { +void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) +{ int y, x, i, rowstride; unsigned char *buf; diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 3966caa1fa9..f9f210fbae4 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -908,7 +908,8 @@ static int apply_boid_rule(BoidBrainData *bbd, BoidRule *rule, BoidValues *val, else return 0; } -static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa) { +static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa) +{ BoidState *state = boids->states.first; BoidParticle *bpa = pa->boid; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index d8b51973948..32d78a4d306 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1374,7 +1374,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree return collpair; } -static void machine_epsilon_offset(Cloth *cloth) { +static void machine_epsilon_offset(Cloth *cloth) +{ ClothVertex *cv; int i, j; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index a59092784dd..75e137bc9fb 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3937,7 +3937,8 @@ static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES]; static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */ /* This function only gets called when CTI_INIT is non-zero */ -static void constraints_init_typeinfo (void) { +static void constraints_init_typeinfo (void) +{ constraintsTypeInfo[0]= NULL; /* 'Null' Constraint */ constraintsTypeInfo[1]= &CTI_CHILDOF; /* ChildOf Constraint */ constraintsTypeInfo[2]= &CTI_TRACKTO; /* TrackTo Constraint */ diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index b19ea93a1b8..acc900d0b71 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1406,7 +1406,8 @@ void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, stru } /* add Orco layer to the displist object which has got derived mesh and return orco */ -float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender) { +float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender) +{ float *orco; if (derivedFinal == NULL) diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index e84a2a04ded..063b5e961e0 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -109,7 +109,8 @@ int BKE_idcode_is_valid(int code) return idtype_from_code(code)?1:0; } -int BKE_idcode_is_linkable(int code) { +int BKE_idcode_is_linkable(int code) +{ IDType *idt= idtype_from_code(code); return idt?(idt->flags&IDTYPE_FLAGS_ISLINKABLE):0; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 94be1a7a7b5..eae317b97fc 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2829,7 +2829,8 @@ void object_sculpt_modifiers_changed(Object *ob) } } -float give_timeoffset(Object *ob) { +float give_timeoffset(Object *ob) +{ if ((ob->ipoflag & OB_OFFS_PARENTADD) && ob->parent) { return ob->sf + give_timeoffset(ob->parent); } else { @@ -2837,7 +2838,8 @@ float give_timeoffset(Object *ob) { } } -int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) { +int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) +{ if (ob->data==NULL) return 0; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index a56010a5ccf..fb69db17b97 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2544,7 +2544,8 @@ static void ptcache_dt_to_str(char *str, double dtime) sprintf(str, "%is", ((int)dtime) % 60); } -static void *ptcache_bake_thread(void *ptr) { +static void *ptcache_bake_thread(void *ptr) +{ int usetimer = 0, sfra, efra; double stime, ptime, ctime, fetd; char run[32], cur[32], etd[32]; diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 743111b925f..08848c35add 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2852,7 +2852,8 @@ void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_ch left and right are the bounds at which the sequence is rendered, start and end are from the start and fixed length of the sequence. */ -int seq_tx_get_start(Sequence *seq) { +int seq_tx_get_start(Sequence *seq) +{ return seq->start; } int seq_tx_get_end(Sequence *seq) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 2c507370288..02cffcec249 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2792,7 +2792,8 @@ int setcurr_tab_spaces (Text *text, int space) /*********************************/ /* Creates and adds a marker to the list maintaining sorted order */ -void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsigned char color[4], int group, int flags) { +void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsigned char color[4], int group, int flags) +{ TextMarker *tmp, *marker; marker= MEM_mallocN(sizeof(TextMarker), "text_marker"); @@ -2841,7 +2842,8 @@ TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int en /* Clears all markers 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. */ -short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags) { +short txt_clear_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); short cleared= 0; @@ -2866,7 +2868,8 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in /* Clears all markers in the specified group (if given) with at least the specified flags set. Useful for clearing temporary markers (group=0, flags=TMARK_TEMP) */ -short txt_clear_markers(Text *text, int group, int flags) { +short txt_clear_markers(Text *text, int group, int flags) +{ TextMarker *marker, *next; short cleared= 0; diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 13875ff19f7..3cb32f9ad12 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -808,7 +808,8 @@ void flush_ffmpeg(void) ********************************************************************** */ /* Get the output filename-- similar to the other output formats */ -void filepath_ffmpeg(char* string, RenderData* rd) { +void filepath_ffmpeg(char* string, RenderData* rd) +{ char autosplit[20]; const char ** exts = get_file_extensions(rd->ffcodecdata.type); diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 5f31565d65b..cf3605a80ff 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -76,7 +76,8 @@ struct bArgs { int *passes; }; -static unsigned int case_strhash(const void *ptr) { +static unsigned int case_strhash(const void *ptr) +{ const char *s= ptr; unsigned int i= 0; unsigned char c; diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c index 7587a5195a2..e877e985d94 100644 --- a/source/blender/blenlib/intern/BLI_dynstr.c +++ b/source/blender/blenlib/intern/BLI_dynstr.c @@ -70,7 +70,8 @@ struct DynStr { /***/ -DynStr *BLI_dynstr_new(void) { +DynStr *BLI_dynstr_new(void) +{ DynStr *ds= MEM_mallocN(sizeof(*ds), "DynStr"); ds->elems= ds->last= NULL; ds->curlen= 0; @@ -78,7 +79,8 @@ DynStr *BLI_dynstr_new(void) { return ds; } -void BLI_dynstr_append(DynStr *ds, const char *cstr) { +void BLI_dynstr_append(DynStr *ds, const char *cstr) +{ DynStrElem *dse= malloc(sizeof(*dse)); int cstrlen= strlen(cstr); @@ -220,7 +222,8 @@ void BLI_dynstr_appendf(DynStr *ds, const char *format, ...) } } -int BLI_dynstr_get_len(DynStr *ds) { +int BLI_dynstr_get_len(DynStr *ds) +{ return ds->curlen; } diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index eae4f918a67..8e68d42456f 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -350,7 +350,8 @@ static void sort_along_axis(BVHTree *tree, int start, int end, int axis) //after a call to this function you can expect one of: // every node to left of a[n] are smaller or equal to it // every node to the right of a[n] are greater or equal to it -static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis){ +static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis) +{ int begin = _begin, end = _end, cut; while(end-begin > 3) { diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 654ade8955f..485b8137a02 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -644,7 +644,8 @@ void BLI_bpathIterator_step(struct BPathIterator *bpi) } } -int BLI_bpathIterator_isDone( struct BPathIterator *bpi) { +int BLI_bpathIterator_isDone( struct BPathIterator *bpi) +{ return bpi->type==BPATH_DONE; } @@ -699,7 +700,8 @@ static void bpath_as_report(struct BPathIterator *bpi, const char *message, Repo } /* high level function */ -void checkMissingFiles(Main *bmain, ReportList *reports) { +void checkMissingFiles(Main *bmain, ReportList *reports) +{ struct BPathIterator *bpi; /* be sure there is low chance of the path being too short */ @@ -718,7 +720,8 @@ void checkMissingFiles(Main *bmain, ReportList *reports) { } /* dont log any errors at the moment, should probably do this */ -void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports) { +void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports) +{ int tot= 0, changed= 0, failed= 0, linked= 0; struct BPathIterator *bpi; char filepath[FILE_MAX]; @@ -886,7 +889,8 @@ static int findFileRecursive(char *filename_new, const char *dirname, const char } /* high level function - call from fileselector */ -void findMissingFiles(Main *bmain, const char *str) { +void findMissingFiles(Main *bmain, const char *str) +{ struct BPathIterator *bpi; /* be sure there is low chance of the path being too short */ diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c index 8ad93495f6d..3e18517f3e5 100644 --- a/source/blender/blenlib/intern/math_base.c +++ b/source/blender/blenlib/intern/math_base.c @@ -64,7 +64,8 @@ double round(double x); /* from python 3.1 floatobject.c * ndigits must be between 0 and 21 */ -double double_round(double x, int ndigits) { +double double_round(double x, int ndigits) +{ double pow1, pow2, y, z; if (ndigits >= 0) { pow1 = pow(10.0, (double)ndigits); diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 0b750d5fff3..8adede3337c 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -785,7 +785,8 @@ void BLI_getlastdir(const char* dir, char *last, const size_t maxlen) /* This is now only used to really get the user's default document folder */ /* On Windows I chose the 'Users//Documents' since it's used as default location to save documents */ -const char *BLI_getDefaultDocumentFolder(void) { +const char *BLI_getDefaultDocumentFolder(void) +{ #if !defined(WIN32) return getenv("HOME"); @@ -1206,7 +1207,8 @@ void BLI_char_switch(char *string, char from, char to) } } -void BLI_make_exist(char *dir) { +void BLI_make_exist(char *dir) +{ int a; BLI_char_switch(dir, ALTSEP, SEP); @@ -1550,7 +1552,8 @@ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const return 1; } -char *BLI_first_slash(char *string) { +char *BLI_first_slash(char *string) +{ char *ffslash, *fbslash; ffslash= strchr(string, '/'); @@ -1563,7 +1566,8 @@ char *BLI_first_slash(char *string) { else return fbslash; } -char *BLI_last_slash(const char *string) { +char *BLI_last_slash(const char *string) +{ char *lfslash, *lbslash; lfslash= strrchr(string, '/'); @@ -1577,7 +1581,8 @@ char *BLI_last_slash(const char *string) { } /* adds a slash if there isnt one there already */ -int BLI_add_slash(char *string) { +int BLI_add_slash(char *string) +{ int len = strlen(string); #ifdef WIN32 if (len==0 || string[len-1]!='\\') { @@ -1596,7 +1601,8 @@ int BLI_add_slash(char *string) { } /* removes a slash if there is one */ -void BLI_del_slash(char *string) { +void BLI_del_slash(char *string) +{ int len = strlen(string); while (len) { #ifdef WIN32 diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 8be86a4b407..e336b914ffa 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -469,7 +469,8 @@ int BLI_exist(const char *name) } /* would be better in fileops.c except that it needs stat.h so add here */ -int BLI_is_dir(const char *file) { +int BLI_is_dir(const char *file) +{ return S_ISDIR(BLI_exist(file)); } diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 8315161aeda..db5d4dc99eb 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -43,14 +43,16 @@ #include "BLI_dynstr.h" #include "BLI_string.h" -char *BLI_strdupn(const char *str, const size_t len) { +char *BLI_strdupn(const char *str, const size_t len) +{ char *n= MEM_mallocN(len+1, "strdup"); memcpy(n, str, len); n[len]= '\0'; return n; } -char *BLI_strdup(const char *str) { +char *BLI_strdup(const char *str) +{ return BLI_strdupn(str, strlen(str)); } @@ -67,7 +69,8 @@ char *BLI_strdupcat(const char *str1, const char *str2) return n; } -char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy) { +char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy) +{ size_t srclen= strlen(src); size_t cpylen= (srclen>(maxncpy-1))?(maxncpy-1):srclen; @@ -87,7 +90,8 @@ size_t BLI_snprintf(char *buffer, size_t count, const char *format, ...) if (n != -1 && n < count) { buffer[n] = '\0'; - } else { + } + else { buffer[count-1] = '\0'; } @@ -280,7 +284,8 @@ char *BLI_strcasestr(const char *s, const char *find) } -int BLI_strcasecmp(const char *s1, const char *s2) { +int BLI_strcasecmp(const char *s1, const char *s2) +{ int i; for (i=0; ; i++) { @@ -299,7 +304,8 @@ int BLI_strcasecmp(const char *s1, const char *s2) { return 0; } -int BLI_strncasecmp(const char *s1, const char *s2, size_t len) { +int BLI_strncasecmp(const char *s1, const char *s2, size_t len) +{ int i; for (i=0; ido_thread(tslot->callerdata); } -int BLI_thread_is_main(void) { +int BLI_thread_is_main(void) +{ return pthread_equal(pthread_self(), mainid); } diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 31b3724e9f6..0e93e5fa8c0 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -240,7 +240,8 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) return names; } -void BLO_blendhandle_close(BlendHandle *bh) { +void BLO_blendhandle_close(BlendHandle *bh) +{ FileData *fd= (FileData*) bh; blo_freefiledata(fd); diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 9d96814c403..61f1b1dfa08 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -426,7 +426,7 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act) //sets the rna_path and array index to curve -void AnimationImporter::modify_fcurve(std::vector* curves , char* rna_path , int array_index ) +void AnimationImporter::modify_fcurve(std::vector* curves , const char* rna_path , int array_index ) { std::vector::iterator it; int i; diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index 9e8f7b42069..77587114374 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -164,7 +164,7 @@ public: int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition); - void modify_fcurve(std::vector* curves , char* rna_path , int array_index ); + void modify_fcurve(std::vector* curves , const char* rna_path , int array_index ); // prerequisites: // animlist_map - map animlist id -> animlist // curve_map - map anim id -> curve(s) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 91c06e0f125..0a05086a3a4 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6537,8 +6537,8 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob) return nu; } -static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) { - +static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) +{ Object *obedit= CTX_data_edit_object(C); ListBase *editnurb; Nurb *nu; @@ -6607,11 +6607,13 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) return OPERATOR_FINISHED; } -static int curve_prim_add(bContext *C, wmOperator *op, int type) { +static int curve_prim_add(bContext *C, wmOperator *op, int type) +{ return curvesurf_prim_add(C, op, type, 0); } -static int surf_prim_add(bContext *C, wmOperator *op, int type) { +static int surf_prim_add(bContext *C, wmOperator *op, int type) +{ return curvesurf_prim_add(C, op, type, 1); } diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index aad67b6b0be..286906402b9 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2804,7 +2804,8 @@ uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x1, i * otherwise return -1. * (1<derivedDeform && (ob->derivedDeform)==dm) { ob->derivedDeform->needsFree = 1; ob->derivedDeform->release(ob->derivedDeform); @@ -919,7 +925,8 @@ static void dm_deform_clear(DerivedMesh *dm, Object *ob) { } // recalculate the deformation -static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob) { +static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob) +{ return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); } @@ -931,7 +938,8 @@ index is the index of the vertex being moved norm and d are the plane's properties for the equation: ax + by + cz + d = 0 coord is a point on the plane */ -static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp) { +static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp) +{ DerivedMesh *dm; MDeformWeight *dw; MVert m; diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 589d652a275..827c14b1c0d 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -364,7 +364,8 @@ void fdrawXORcirc(float xofs, float yofs, float rad) set_inverted_drawing(0); } -void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments) { +void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments) +{ int i; glBegin(GL_TRIANGLE_FAN); @@ -378,7 +379,8 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment glEnd(); } -void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments) { +void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments) +{ int i; glBegin(GL_LINE_STRIP); @@ -797,7 +799,8 @@ void bglBegin(int mode) } } -int bglPointHack(void) { +int bglPointHack(void) +{ float value[4]; int pointhack_px; glGetFloatv(GL_POINT_SIZE_RANGE, value); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 5fe47f836d7..add269c0877 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1857,11 +1857,13 @@ static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], /* Clip the face by a bucket and set the uv-space bucket_bounds_uv * so we have the clipped UV's to do pixel intersection tests with * */ -static int float_z_sort_flip(const void *p1, const void *p2) { +static int float_z_sort_flip(const void *p1, const void *p2) +{ return (((float *)p1)[2] < ((float *)p2)[2] ? 1:-1); } -static int float_z_sort(const void *p1, const void *p2) { +static int float_z_sort(const void *p1, const void *p2) +{ return (((float *)p1)[2] < ((float *)p2)[2] ?-1:1); } @@ -3686,7 +3688,8 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, float } } -static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, int use_color_correction) { +static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, int use_color_correction) +{ if (ps->is_texbrush) { /* rgba already holds a texture result here from higher level function */ float rgba_br[3]; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index c7ada4a5801..c2e45c5ad8a 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -244,7 +244,8 @@ static int compare_size(const void *a1, const void *a2) else return BLI_natstrcmp(entry1->relname,entry2->relname); } -static int compare_extension(const void *a1, const void *a2) { +static int compare_extension(const void *a1, const void *a2) +{ const struct direntry *entry1=a1, *entry2=a2; const char *sufix1, *sufix2; const char *nil=""; diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 916e59eae9c..baa755ef841 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -3266,7 +3266,8 @@ void NODE_OT_delete(wmOperatorType *ot) } /* ****************** Delete with reconnect ******************* */ -static int is_connected_to_input_socket(bNode* node, bNodeLink* link) { +static int is_connected_to_input_socket(bNode* node, bNodeLink* link) +{ bNodeSocket *sock; if (link->tonode == node) { for(sock= node->inputs.first; sock; sock= sock->next) { diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index c0919ef3043..3ea27899128 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -530,7 +530,8 @@ void SEQUENCER_OT_select(wmOperatorType *ot) /* run recursivly to select linked */ -static int select_more_less_seq__internal(Scene *scene, int sel, int linked) { +static int select_more_less_seq__internal(Scene *scene, int sel, int linked) +{ Editing *ed= seq_give_editing(scene, FALSE); Sequence *seq, *neighbor; int change=0; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 65267bb481a..63a1d7f7b4f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1757,7 +1757,8 @@ static void drawSelectedVertices__mapFunc(void *userData, int index, float *co, } } -static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) { +static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) +{ glBegin(GL_POINTS); dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, me->mvert); glEnd(); diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 38776b51c62..b6651ebd1ff 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1270,7 +1270,8 @@ void applyTransObjects(TransInfo *t) recalcData(t); } -static void restoreElement(TransData *td) { +static void restoreElement(TransData *td) +{ /* TransData for crease has no loc */ if (td->loc) { copy_v3_v3(td->loc, td->iloc); diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index b3608305a7a..a1e1c0e0b1d 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -118,7 +118,8 @@ static void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, const int mval[ output[1] *= mi->factor; } -static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) { +static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) +{ float x, pad; pad = t->ar->winx / 10; @@ -135,7 +136,8 @@ static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2] output[0] = (x - pad) / (t->ar->winx - 2 * pad); } -static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) { +static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) +{ float vec[3]; InputVector(t, mi, mval, vec); @@ -144,7 +146,8 @@ static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval output[0] = dot_v3v3(t->viewinv[0], vec) * 2.0f; } -static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) { +static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) +{ float y, pad; pad = t->ar->winy / 10; @@ -160,7 +163,8 @@ static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2], output[0] = (y - pad) / (t->ar->winy - 2 * pad); } -static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) { +static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) +{ float vec[3]; InputVector(t, mi, mval, vec); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 17fd7517d71..4342d0de751 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1584,7 +1584,8 @@ static int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, flo return retval; } -static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) { +static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) +{ Base *base; float depth = FLT_MAX; int retval = 0; @@ -1914,7 +1915,8 @@ int peelObjectsContext(bContext *C, ListBase *depth_peels, float mval[2]) static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], GearsType action); -void snapGridAction(TransInfo *t, float *val, GearsType action) { +void snapGridAction(TransInfo *t, float *val, GearsType action) +{ float fac[3]; fac[NO_GEARS] = t->snap[0]; @@ -1925,7 +1927,8 @@ void snapGridAction(TransInfo *t, float *val, GearsType action) { } -void snapGrid(TransInfo *t, float *val) { +void snapGrid(TransInfo *t, float *val) +{ GearsType action; // Only do something if using Snap to Grid diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 0aaddf0dea5..2bf62b73424 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1058,7 +1058,8 @@ void GPU_uvedge_setup(DerivedMesh *dm) GLStates |= GPU_BUFFER_VERTEX_STATE; } -static int GPU_typesize(int type) { +static int GPU_typesize(int type) +{ switch(type) { case GL_FLOAT: return sizeof(float); @@ -1075,7 +1076,8 @@ static int GPU_typesize(int type) { } } -int GPU_attrib_element_size(GPUAttrib data[], int numdata) { +int GPU_attrib_element_size(GPUAttrib data[], int numdata) +{ int i, elementsize = 0; for(i = 0; i < numdata; i++) { @@ -1086,7 +1088,8 @@ int GPU_attrib_element_size(GPUAttrib data[], int numdata) { return elementsize; } -void GPU_interleaved_attrib_setup(GPUBuffer *buffer, GPUAttrib data[], int numdata) { +void GPU_interleaved_attrib_setup(GPUBuffer *buffer, GPUAttrib data[], int numdata) +{ int i; int elementsize; intptr_t offset = 0; diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index d79acc88a80..bfec60245b8 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -101,8 +101,8 @@ static int checkbmp(unsigned char *mem) return(ret_val); } -int imb_is_a_bmp(unsigned char *buf) { - +int imb_is_a_bmp(unsigned char *buf) +{ return checkbmp(buf); } @@ -200,8 +200,8 @@ static int putShortLSB(unsigned short us,FILE *ofile) { } /* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ -int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags) { - +int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags) +{ BMPINFOHEADER infoheader; int bytesize, extrabytes, x, y, t, ptr; uchar *data; diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 1ac4e4e06cb..49f81edd4b2 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -111,7 +111,8 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float ** */ /* function assumes out to be zero'ed, only does RGBA */ -static float P(float k){ +static float P(float k) +{ float p1, p2, p3, p4; p1 = MAX2(k+2.0f,0); p2 = MAX2(k+1.0f,0); @@ -123,7 +124,8 @@ static float P(float k){ #if 0 /* older, slower function, works the same as above */ -static float P(float k){ +static float P(float k) +{ return (float)(1.0f/6.0f)*( pow( MAX2(k+2.0f,0) , 3.0f ) - 4.0f * pow( MAX2(k+1.0f,0) , 3.0f ) + 6.0f * pow( MAX2(k,0) , 3.0f ) - 4.0f * pow( MAX2(k-1.0f,0) , 3.0f)); } #endif diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c index d1202136d56..aa258a6b9ee 100644 --- a/source/blender/imbuf/intern/indexer_dv.c +++ b/source/blender/imbuf/intern/indexer_dv.c @@ -56,7 +56,8 @@ static unsigned long bitstream_get_bits(indexer_dv_bitstream * This, int num) return rval; } -static int parse_num(indexer_dv_bitstream * b, int numbits) { +static int parse_num(indexer_dv_bitstream * b, int numbits) +{ return bitstream_get_bits(b, numbits); } diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index b87b46ca464..53d4a403190 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -84,8 +84,8 @@ type 3 is unsupported as of jul 05 2000 Frank. static int jpeg_default_quality; static int ibuf_ftype; -int imb_is_a_jpeg(unsigned char *mem) { - +int imb_is_a_jpeg(unsigned char *mem) +{ if ((mem[0]== 0xFF) && (mem[1] == 0xD8))return 1; return 0; } diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index ec00b15c079..c757b435d90 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -338,7 +338,8 @@ static int checktarga(TARGA *tga, unsigned char *mem) return(1); } -int imb_is_a_targa(unsigned char *buf) { +int imb_is_a_targa(unsigned char *buf) +{ TARGA tga; return checktarga(&tga, buf); diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 3d01661bc79..cbf079bccef 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -543,7 +543,8 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int } } -static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm){ +static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm) +{ DerivedMesh *splitdm; MFace *mf=NULL,*df1=NULL; MFace *mface=dm->getFaceArray(dm); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 2c94c4d1505..dcdb6b4dde8 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -225,7 +225,8 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne } /* Adds the given vertex to the specified vertex group, with given weight. */ -static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float weight) { +static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float weight) +{ /* TODO, move into deform.c as a generic function. This assumes the vertex * groups have already been checked, so this has to remain low level. */ MDeformWeight *newdw; @@ -244,7 +245,8 @@ static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float we /* Removes the given vertex from the vertex group, specified either by its defgrp_idx, * or directly by its MDeformWeight pointer, if dw is not NULL. * WARNING: This function frees the given MDeformWeight, do not use it afterward! */ -static void defvert_remove_from_group(MDeformVert *dv, int defgrp_idx, MDeformWeight *dw) { +static void defvert_remove_from_group(MDeformVert *dv, int defgrp_idx, MDeformWeight *dw) +{ /* TODO, move this into deform.c as a generic function. */ MDeformWeight *newdw; int i; diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index d5ae442c25f..ed85d1c2fb8 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -174,7 +174,8 @@ static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack } /* Free internal buffers */ -static void group_free_internal(bNodeTreeExec *gexec) { +static void group_free_internal(bNodeTreeExec *gexec) +{ bNodeStack *ns; int i; diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 17fda6d08a7..bf14102bb0d 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -107,7 +107,8 @@ int PyC_AsArray(void *array, PyObject *value, const int length, const PyTypeObje /* for debugging */ -void PyC_ObSpit(const char *name, PyObject *var) { +void PyC_ObSpit(const char *name, PyObject *var) +{ fprintf(stderr, "<%s> : ", name); if (var==NULL) { fprintf(stderr, ""); @@ -126,7 +127,8 @@ void PyC_ObSpit(const char *name, PyObject *var) { fprintf(stderr, "\n"); } -void PyC_LineSpit(void) { +void PyC_LineSpit(void) +{ const char *filename; int lineno; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index bcbd7670e2c..cbd6affb117 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -4140,8 +4140,8 @@ static PyObject *pyrna_struct_new(PyTypeObject *type, PyObject *args, PyObject * /* only needed for subtyping, so a new class gets a valid BPy_StructRNA * todo - also accept useful args */ -static PyObject *pyrna_prop_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds)) { - +static PyObject *pyrna_prop_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds)) +{ BPy_PropertyRNA *base; if (!PyArg_ParseTuple(args, "O!:bpy_prop.__new__", &pyrna_prop_Type, &base)) diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 32a4648c7f8..8939ffd85a9 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -317,8 +317,8 @@ are for */ #define BEGIN_CURSOR_BLOCK { #define END_CURSOR_BLOCK } -void wm_init_cursor_data(void){ - +void wm_init_cursor_data(void) +{ /********************** NW_ARROW Cursor **************************/ BEGIN_CURSOR_BLOCK static char nw_sbm[]={ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 68cd95c1b99..841198c0664 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -863,7 +863,8 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, "Relative Path", "Select the file relative to the blend file"); } -void WM_operator_properties_select_all(wmOperatorType *ot) { +void WM_operator_properties_select_all(wmOperatorType *ot) +{ static EnumPropertyItem select_all_actions[] = { {SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), "Toggle selection for all elements"}, {SEL_SELECT, "SELECT", 0, N_("Select"), "Select all elements"}, -- cgit v1.2.3