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>2012-04-29 21:11:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-29 21:11:40 +0400
commit343edf2722a9e114b98944c1147676e630e699b7 (patch)
tree7b969239ccab922b6390e040f85e96afa956932a /source/blender/blenlib
parentb6c1850fd35c040c9d489eb42c2190f38564d381 (diff)
style cleanup: function calls & whitespace.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h40
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c12
-rw-r--r--source/blender/blenlib/intern/DLRB_tree.c8
-rw-r--r--source/blender/blenlib/intern/freetypefont.c18
-rw-r--r--source/blender/blenlib/intern/noise.c2
-rw-r--r--source/blender/blenlib/intern/path_util.c4
-rw-r--r--source/blender/blenlib/intern/threads.c2
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
8 files changed, 44 insertions, 44 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 3a533f73d9d..18c2aa3313c 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -79,36 +79,36 @@
#define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) )
#define INIT_MINMAX(min, max) { \
- (min)[0]= (min)[1]= (min)[2]= 1.0e30f; \
- (max)[0]= (max)[1]= (max)[2]= -1.0e30f; \
+ (min)[0] = (min)[1] = (min)[2] = 1.0e30f; \
+ (max)[0] = (max)[1] = (max)[2] = -1.0e30f; \
}
#define INIT_MINMAX2(min, max) { \
- (min)[0]= (min)[1]= 1.0e30f; \
- (max)[0]= (max)[1]= -1.0e30f; \
+ (min)[0] = (min)[1] = 1.0e30f; \
+ (max)[0] = (max)[1] = -1.0e30f; \
} (void)0
#define DO_MIN(vec, min) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
+ if ((min)[0] > (vec)[0]) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1]) (min)[1] = (vec)[1]; \
+ if ((min)[2] > (vec)[2]) (min)[2] = (vec)[2]; \
} (void)0
#define DO_MAX(vec, max) { \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
- if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \
+ if ((max)[0] < (vec)[0]) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1]) (max)[1] = (vec)[1]; \
+ if ((max)[2] < (vec)[2]) (max)[2] = (vec)[2]; \
} (void)0
#define DO_MINMAX(vec, min, max) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
- if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \
+ if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \
+ if ((min)[2] > (vec)[2] ) (min)[2] = (vec)[2]; \
+ if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \
+ if ((max)[2] < (vec)[2] ) (max)[2] = (vec)[2]; \
} (void)0
#define DO_MINMAX2(vec, min, max) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
+ if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \
+ if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \
} (void)0
/* some math and copy defines */
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 3e1561136cc..e586c176800 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -177,7 +177,7 @@ static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, in
if (*memblock == local_memblock)
{
new_memblock = malloc( size_per_item * new_max_size );
- memcpy( new_memblock, *memblock, size_per_item * *max_size );
+ memcpy(new_memblock, *memblock, size_per_item * *max_size);
}
else
new_memblock = realloc(*memblock, size_per_item * new_max_size );
@@ -1329,7 +1329,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *n
}
if (nearest) {
- memcpy( &data.nearest, nearest, sizeof(*nearest) );
+ memcpy(&data.nearest, nearest, sizeof(*nearest));
}
else {
data.nearest.index = -1;
@@ -1518,7 +1518,7 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f
if (hit)
- memcpy( &data.hit, hit, sizeof(*hit) );
+ memcpy(&data.hit, hit, sizeof(*hit));
else {
data.hit.index = -1;
data.hit.dist = FLT_MAX;
@@ -1531,7 +1531,7 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f
if (hit)
- memcpy( hit, &data.hit, sizeof(*hit) );
+ memcpy(hit, &data.hit, sizeof(*hit));
return data.hit.index;
}
@@ -1610,7 +1610,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
data->callback(data->userdata, node->children[i]->index, dist);
}
else
- dfs_range_query( data, node->children[i] );
+ dfs_range_query(data, node->children[i]);
}
}
}
@@ -1639,7 +1639,7 @@ int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHT
data.callback(data.userdata, root->index, dist);
}
else
- dfs_range_query( &data, root );
+ dfs_range_query(&data, root);
}
}
diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c
index 7c5ee236a35..6398bd863db 100644
--- a/source/blender/blenlib/intern/DLRB_tree.c
+++ b/source/blender/blenlib/intern/DLRB_tree.c
@@ -44,7 +44,7 @@ DLRBT_Tree *BLI_dlrbTree_new (void)
}
/* Just zero out the pointers used */
-void BLI_dlrbTree_init (DLRBT_Tree *tree)
+void BLI_dlrbTree_init(DLRBT_Tree *tree)
{
if (tree == NULL)
return;
@@ -68,7 +68,7 @@ static void recursive_tree_free_nodes (DLRBT_Node *node)
}
/* Free the given tree's data but not the tree itself */
-void BLI_dlrbTree_free (DLRBT_Tree *tree)
+void BLI_dlrbTree_free(DLRBT_Tree *tree)
{
if (tree == NULL)
return;
@@ -113,7 +113,7 @@ static void linkedlist_sync_add_node (DLRBT_Tree *tree, DLRBT_Node *node)
}
/* Make sure the tree's Double-Linked list representation is valid */
-void BLI_dlrbTree_linkedlist_sync (DLRBT_Tree *tree)
+void BLI_dlrbTree_linkedlist_sync(DLRBT_Tree *tree)
{
/* sanity checks */
if (tree == NULL)
@@ -486,7 +486,7 @@ static void insert_check_3 (DLRBT_Tree *tree, DLRBT_Node *node)
/* Balance the tree after the given element has been added to it
* (using custom code, in the Binary Tree way).
*/
-void BLI_dlrbTree_insert (DLRBT_Tree *tree, DLRBT_Node *node)
+void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node)
{
/* sanity checks */
if ((tree == NULL) || (node == NULL))
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index a26c56a16f3..c9f7b7c7e64 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -304,7 +304,7 @@ static int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode)
// Load the font to memory
if (tf->pf) {
- err= FT_New_Memory_Face( library,
+ err= FT_New_Memory_Face(library,
tf->pf->data,
tf->pf->size,
0,
@@ -342,7 +342,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
#endif
// load the freetype font
- err = FT_New_Memory_Face( library,
+ err = FT_New_Memory_Face(library,
pf->data,
pf->size,
0,
@@ -351,10 +351,10 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
if (err) return NULL;
#if 0
- for ( n = 0; n < face->num_charmaps; n++ )
+ for (n = 0; n < face->num_charmaps; n++)
{
charmap = face->charmaps[n];
- if ( charmap->platform_id == my_platform_id &&
+ if (charmap->platform_id == my_platform_id &&
charmap->encoding_id == my_encoding_id )
{
found = charmap;
@@ -362,11 +362,11 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
}
}
- if ( !found ) { return NULL; }
+ if (!found ) { return NULL; }
// now, select the charmap for the face object
- err = FT_Set_Charmap( face, found );
- if ( err ) { return NULL; }
+ err = FT_Set_Charmap(face, found);
+ if (err) { return NULL; }
#endif
// allocate blender font
@@ -393,7 +393,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
}
}
- err = FT_Set_Charmap( face, found );
+ err = FT_Set_Charmap(face, found);
if ( err )
return NULL;
@@ -498,7 +498,7 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf)
}
//free Freetype
- FT_Done_FreeType( library);
+ FT_Done_FreeType(library);
return vfd;
}
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 5db42c35f5c..5b669c4ff1c 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -375,7 +375,7 @@ float BLI_turbulence1(float noisesize, float x, float y, float z, int nr)
{
float s, d= 0.5, div=1.0;
- s= fabsf( (-1.0f+2.0f*BLI_hnoise(noisesize, x, y, z)));
+ s= fabsf((-1.0f + 2.0f * BLI_hnoise(noisesize, x, y, z)));
while (nr>0) {
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index a6b851ca488..9f775028c1a 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -758,7 +758,7 @@ int BLI_path_cwd(char *path)
BLI_current_working_dir(cwd, sizeof(cwd)); /* in case the full path to the blend isn't used */
if (cwd[0] == '\0') {
- printf( "Could not get the current working directory - $PWD for an unknown reason.");
+ printf("Could not get the current working directory - $PWD for an unknown reason.\n");
}
else {
/* uses the blend path relative to cwd important for loading relative linked files.
@@ -1787,7 +1787,7 @@ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name
#ifdef WITH_BINRELOC
/* linux uses binreloc since argv[0] is not reliable, call br_init( NULL ) first */
- path = br_find_exe( NULL );
+ path = br_find_exe(NULL);
if (path) {
BLI_strncpy(fullname, path, maxlen);
free((void *)path);
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 05d8ded7764..2d82c0989b1 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -304,7 +304,7 @@ void BLI_end_threads(ListBase *threadbase)
/* System Information */
/* how many threads are native on this system? */
-int BLI_system_thread_count( void )
+int BLI_system_thread_count(void)
{
int t;
#ifdef WIN32
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 6c8754eeff3..0731213d607 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -245,7 +245,7 @@ struct dirent *readdir(DIR *dp)
}
}
-int closedir (DIR *dp)
+int closedir(DIR *dp)
{
if (dp->direntry.d_name) MEM_freeN(dp->direntry.d_name);
if (dp->handle!=INVALID_HANDLE_VALUE) FindClose(dp->handle);