diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 20:55:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 20:55:27 +0300 |
commit | 8b7482892b2ecb456be60b42fe1625156d19e954 (patch) | |
tree | b960b19759a4518d9ccaf7be01d08668d26414bf /source/blender/blenlib | |
parent | d7e2607f964b7bff5c8cc2fd9437bdc2815a6f08 (diff) |
made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_jitter.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_mempool.h | 12 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_noise.h | 1 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_scanfill.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_mempool.c | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/jitter.c | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/noise.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 14 | ||||
-rw-r--r-- | source/blender/blenlib/intern/rct.c | 5 | ||||
-rw-r--r-- | source/blender/blenlib/intern/scanfill.c | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/time.c | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/uvproject.c | 1 |
12 files changed, 29 insertions, 24 deletions
diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h index f626feb2ec8..aea0fe2bd77 100644 --- a/source/blender/blenlib/BLI_jitter.h +++ b/source/blender/blenlib/BLI_jitter.h @@ -32,9 +32,9 @@ #ifndef BLI_JITTER_H #define BLI_JITTER_H -extern void BLI_initjit(float *jitarr, int num); -extern void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1); -extern void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2); +void BLI_initjit(float *jitarr, int num); +void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1); +void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2); #endif diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index 7c2dc36d533..c1991769eb1 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -32,13 +32,11 @@ #define BLI_MEMPOOL_H struct BLI_mempool; -typedef struct BLI_mempool BLI_mempool; - -BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc); -void *BLI_mempool_alloc(BLI_mempool *pool); -void *BLI_mempool_calloc(BLI_mempool *pool); -void BLI_mempool_free(BLI_mempool *pool, void *addr); -void BLI_mempool_destroy(BLI_mempool *pool); +struct BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc); +void *BLI_mempool_alloc(struct BLI_mempool *pool); +void *BLI_mempool_calloc(struct BLI_mempool *pool); +void BLI_mempool_free(struct BLI_mempool *pool, void *addr); +void BLI_mempool_destroy(struct BLI_mempool *pool); #endif diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h index 11587262645..ce757c03bf3 100644 --- a/source/blender/blenlib/BLI_noise.h +++ b/source/blender/blenlib/BLI_noise.h @@ -57,7 +57,6 @@ void voronoi(float x, float y, float z, float* da, float* pa, float me, int dtyp float cellNoise(float x, float y, float z); void cellNoiseV(float x, float y, float z, float *ca); - #ifdef __cplusplus } #endif diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h index bae5375f757..707f23fb4e8 100644 --- a/source/blender/blenlib/BLI_scanfill.h +++ b/source/blender/blenlib/BLI_scanfill.h @@ -61,7 +61,7 @@ void BLI_end_edgefill(void); * @param f The function to use as callback * @attention used in creator.c */ -void BLI_setErrorCallBack(void (*f)(char*)); +void BLI_setErrorCallBack(void (*f)(const char*)); /** * Set a function to be able to interrupt the execution of processing diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 823841ef152..235cedb6fed 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -32,6 +32,7 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "BLI_mempool.h" #include <string.h> typedef struct BLI_freenode{ diff --git a/source/blender/blenlib/intern/jitter.c b/source/blender/blenlib/intern/jitter.c index dfc554394d6..2454c4b1444 100644 --- a/source/blender/blenlib/intern/jitter.c +++ b/source/blender/blenlib/intern/jitter.c @@ -34,6 +34,7 @@ #include "MEM_guardedalloc.h" #include "BLI_rand.h" +#include "BLI_jitter.h" void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1) diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 96dad590fee..9af1532ce4b 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -36,6 +36,8 @@ #include <math.h> +#include "BLI_noise.h" + /* local */ static float noise3_perlin(float vec[3]); //static float turbulence_perlin(float *point, float lofreq, float hifreq); @@ -388,7 +390,7 @@ static char p[512+2]= { 0xA2,0xA0}; -float g[512+2][3]= { +static float g[512+2][3]= { {0.33783, 0.715698, -0.611206}, {-0.944031, -0.326599, -0.045624}, {-0.101074, -0.416443, -0.903503}, diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 9be42f9f5fc..3c7300f2588 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -44,22 +44,22 @@ /* Bitmap */ typedef char* BLI_bitmap; -BLI_bitmap BLI_bitmap_new(int tot) +static BLI_bitmap BLI_bitmap_new(int tot) { return MEM_callocN((tot >> 3) + 1, "BLI bitmap"); } -int BLI_bitmap_get(BLI_bitmap b, int index) +static int BLI_bitmap_get(BLI_bitmap b, int index) { return b[index >> 3] & (1 << (index & 7)); } -void BLI_bitmap_set(BLI_bitmap b, int index) +static void BLI_bitmap_set(BLI_bitmap b, int index) { b[index >> 3] |= (1 << (index & 7)); } -void BLI_bitmap_clear(BLI_bitmap b, int index) +static void BLI_bitmap_clear(BLI_bitmap b, int index) { b[index >> 3] &= ~(1 << (index & 7)); } @@ -264,7 +264,7 @@ static int partition_indices(int *prim_indices, int lo, int hi, int axis, } } -void check_partitioning(int *prim_indices, int lo, int hi, int axis, +static void check_partitioning(int *prim_indices, int lo, int hi, int axis, float mid, BBC *prim_bbc, int index_of_2nd_partition) { int i; @@ -405,7 +405,7 @@ static void build_grids_leaf_node(PBVH *bvh, PBVHNode *node) offset and start indicate a range in the array of primitive indices */ -void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, +static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, int offset, int count) { int i, axis, end; @@ -841,7 +841,7 @@ float BLI_pbvh_node_get_tmin(PBVHNode* node) return node->tmin; } -void BLI_pbvh_search_callback_occluded(PBVH *bvh, +static void BLI_pbvh_search_callback_occluded(PBVH *bvh, BLI_pbvh_SearchCallback scb, void *search_data, BLI_pbvh_HitOccludedCallback hcb, void *hit_data) { diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index aa424c1c2bb..923abf22794 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -34,11 +34,12 @@ * ***** END GPL LICENSE BLOCK ***** * */ - -#include "DNA_vec_types.h" #include <stdio.h> #include <math.h> +#include "DNA_vec_types.h" +#include "BLI_rect.h" + int BLI_rcti_is_empty(rcti * rect) { return ((rect->xmax<=rect->xmin) || diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 1978e7ed7d6..2fa3023be51 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -30,10 +30,11 @@ #include "MEM_guardedalloc.h" - +#include "BLI_callbacks.h" #include "BLI_editVert.h" #include "BLI_listbase.h" #include "BLI_math.h" +#include "BLI_scanfill.h" /* callbacks for errors and interrupts and some goo */ static void (*BLI_localErrorCallBack)(const char*) = NULL; diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c index 0992e08b28f..c0554217f68 100644 --- a/source/blender/blenlib/intern/time.c +++ b/source/blender/blenlib/intern/time.c @@ -27,8 +27,9 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifdef WIN32 #include "PIL_time.h" + +#ifdef WIN32 #include <windows.h> double PIL_check_seconds_timer(void) diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c index b08f05b4fc8..5b1cd1dc097 100644 --- a/source/blender/blenlib/intern/uvproject.c +++ b/source/blender/blenlib/intern/uvproject.c @@ -28,6 +28,7 @@ #include "DNA_object_types.h" #include "BLI_math.h" +#include "BLI_uvproject.h" typedef struct UvCameraInfo { float camangle; |