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-04-21 19:53:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-21 19:53:30 +0400
commitf9f771cd01b626be30a85a533ea622bcedd981f5 (patch)
tree45c3744fc35aeeebfcfd641ea3c0b3b9aa6303fe /source/blender/blenlib
parent210ee1ade4b4ec5b6f2d3710986171a21a4b8604 (diff)
converted more mixed tab/space indentations to tabs. only whitespace changes.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c2
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c20
-rw-r--r--source/blender/blenlib/intern/fileops.c6
-rw-r--r--source/blender/blenlib/intern/math_geom.c28
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c2
-rw-r--r--source/blender/blenlib/intern/noise.c16
-rw-r--r--source/blender/blenlib/intern/path_util.c12
-rw-r--r--source/blender/blenlib/intern/winstuff.c30
8 files changed, 58 insertions, 58 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 0144dea3960..ff08ef4dba9 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -175,7 +175,7 @@ unsigned int BLI_ghashutil_inthash(const void *ptr) {
key += ~(key << 9);
key ^= (key >> 17);
- return (unsigned int)(key & 0xffffffff);
+ return (unsigned int)(key & 0xffffffff);
}
int BLI_ghashutil_intcmp(const void *a, const void *b) {
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index 4c16363f6d3..8c7e097d239 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -174,7 +174,7 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he
vertex_pack_indices = MEM_mallocN( len*3*sizeof(int), "boxPack Indices");
for (box=boxarray, box_index=0, i=0; box_index < len; box_index++, box++) {
-
+
vert->blb = vert->brb = vert->tlb =\
vert->isect_cache[0] = vert->isect_cache[1] =\
vert->isect_cache[2] = vert->isect_cache[3] = NULL;
@@ -260,17 +260,17 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he
if (vert->free & quad_flags[j]) {
switch (j) {
case BL:
- SET_BOXRIGHT(box, vert->x);
- SET_BOXTOP(box, vert->y);
- break;
+ SET_BOXRIGHT(box, vert->x);
+ SET_BOXTOP(box, vert->y);
+ break;
case TR:
- SET_BOXLEFT(box, vert->x);
- SET_BOXBOTTOM(box, vert->y);
- break;
+ SET_BOXLEFT(box, vert->x);
+ SET_BOXBOTTOM(box, vert->y);
+ break;
case TL:
- SET_BOXRIGHT(box, vert->x);
- SET_BOXBOTTOM(box, vert->y);
- break;
+ SET_BOXRIGHT(box, vert->x);
+ SET_BOXBOTTOM(box, vert->y);
+ break;
case BR:
SET_BOXLEFT(box, vert->x);
SET_BOXTOP(box, vert->y);
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 2407078fc76..2e0f4b483b1 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -133,13 +133,13 @@ int BLI_is_writable(const char *filename)
int BLI_touch(const char *file)
{
- FILE *f = fopen(file,"r+b");
- if (f != NULL) {
+ FILE *f = fopen(file,"r+b");
+ if (f != NULL) {
char c = getc(f);
rewind(f);
putc(c,f);
} else {
- f = fopen(file,"wb");
+ f = fopen(file,"wb");
}
if (f) {
fclose(f);
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 42a9587596e..4af56c66dde 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -99,7 +99,7 @@ float area_tri_v2(const float v1[2], const float v2[2], const float v3[2])
float area_tri_signed_v2(const float v1[2], const float v2[2], const float v3[2])
{
- return 0.5f * ((v1[0]-v2[0])*(v2[1]-v3[1]) + (v1[1]-v2[1])*(v3[0]-v2[0]));
+ return 0.5f * ((v1[0]-v2[0])*(v2[1]-v3[1]) + (v1[1]-v2[1])*(v3[0]-v2[0]));
}
float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]) /* only convex Quadrilaterals */
@@ -1524,22 +1524,22 @@ void interp_weights_face_v3(float w[4], const float v1[3], const float v2[3], co
* note: using area_tri_signed_v2 means locations outside the triangle are correctly weighted */
void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
{
- float wtot_inv, wtot;
+ float wtot_inv, wtot;
- w[0] = area_tri_signed_v2(v2, v3, co);
- w[1] = area_tri_signed_v2(v3, v1, co);
- w[2] = area_tri_signed_v2(v1, v2, co);
- wtot = w[0]+w[1]+w[2];
+ w[0] = area_tri_signed_v2(v2, v3, co);
+ w[1] = area_tri_signed_v2(v3, v1, co);
+ w[2] = area_tri_signed_v2(v1, v2, co);
+ wtot = w[0]+w[1]+w[2];
- if (wtot != 0.0f) {
- wtot_inv = 1.0f/wtot;
+ if (wtot != 0.0f) {
+ wtot_inv = 1.0f/wtot;
- w[0] = w[0]*wtot_inv;
- w[1] = w[1]*wtot_inv;
- w[2] = w[2]*wtot_inv;
- }
- else /* dummy values for zero area face */
- w[0] = w[1] = w[2] = 1.0f/3.0f;
+ w[0] = w[0]*wtot_inv;
+ w[1] = w[1]*wtot_inv;
+ w[2] = w[2]*wtot_inv;
+ }
+ else /* dummy values for zero area face */
+ w[0] = w[1] = w[2] = 1.0f/3.0f;
}
/* given 2 triangles in 3D space, and a point in relation to the first triangle.
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 9a36f000624..75520bb8ba0 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -315,7 +315,7 @@ MINLINE float dot_v3v3(const float a[3], const float b[3])
MINLINE float cross_v2v2(const float a[2], const float b[2])
{
- return a[0]*b[1] - a[1]*b[0];
+ return a[0]*b[1] - a[1]*b[0];
}
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 49a09dd7b15..5d80edebbef 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1098,7 +1098,7 @@ static float dist_Minkovsky4(float x, float y, float z, float e)
/* Minkovsky, general case, slow, maybe too slow to be useful */
static float dist_Minkovsky(float x, float y, float z, float e)
{
- return pow(pow(fabs(x), e) + pow(fabs(y), e) + pow(fabs(z), e), 1.0/e);
+ return pow(pow(fabs(x), e) + pow(fabs(y), e) + pow(fabs(z), e), 1.0/e);
}
@@ -1275,18 +1275,18 @@ static float voronoi_CrS(float x, float y, float z)
/* returns unsigned cellnoise */
static float cellNoiseU(float x, float y, float z)
{
- int xi = (int)(floor(x));
- int yi = (int)(floor(y));
- int zi = (int)(floor(z));
- unsigned int n = xi + yi*1301 + zi*314159;
- n ^= (n<<13);
- return ((float)(n*(n*n*15731 + 789221) + 1376312589) / 4294967296.0);
+ int xi = (int)(floor(x));
+ int yi = (int)(floor(y));
+ int zi = (int)(floor(z));
+ unsigned int n = xi + yi*1301 + zi*314159;
+ n ^= (n<<13);
+ return ((float)(n*(n*n*15731 + 789221) + 1376312589) / 4294967296.0);
}
/* idem, signed */
float cellNoise(float x, float y, float z)
{
- return (2.0*cellNoiseU(x, y, z)-1.0);
+ return (2.0*cellNoiseU(x, y, z)-1.0);
}
/* returns a vector/point/color in ca, using point hasharray directly */
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index f7115b4d46f..73d6588b97f 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -324,8 +324,8 @@ void BLI_cleanup_path(const char *relabase, char *dir)
/* Note, this should really be moved to the file selector,
* since this function is used in many areas */
if(strcmp(dir, ".")==0) { /* happens for example in FILE_MAIN */
- get_default_root(dir);
- return;
+ get_default_root(dir);
+ return;
}
while ( (start = strstr(dir, "\\..\\")) ) {
@@ -353,9 +353,9 @@ void BLI_cleanup_path(const char *relabase, char *dir)
}
#else
if(dir[0]=='.') { /* happens, for example in FILE_MAIN */
- dir[0]= '/';
- dir[1]= 0;
- return;
+ dir[0]= '/';
+ dir[1]= 0;
+ return;
}
/* support for odd paths: eg /../home/me --> /home/me
@@ -525,7 +525,7 @@ int BLI_parent_dir(char *path)
BLI_add_slash(tmp);
strcat(tmp, parent_dir);
BLI_cleanup_dir(NULL, tmp);
-
+
if (!BLI_testextensie(tmp, parent_dir)) {
BLI_strncpy(path, tmp, sizeof(tmp));
return 1;
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 90754e7d2bb..596ab2b0470 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -307,21 +307,21 @@ int check_file_chars(char *filename)
#include <string.h>
char* dirname(char *path)
{
- char *p;
- if( path == NULL || *path == '\0' )
- return ".";
- p = path + strlen(path) - 1;
- while( *p == '/' ) {
- if( p == path )
- return path;
- *p-- = '\0';
- }
- while( p >= path && *p != '/' )
- p--;
- return
- p < path ? "." :
- p == path ? "/" :
- (*p = '\0', path);
+ char *p;
+ if( path == NULL || *path == '\0' )
+ return ".";
+ p = path + strlen(path) - 1;
+ while( *p == '/' ) {
+ if( p == path )
+ return path;
+ *p-- = '\0';
+ }
+ while( p >= path && *p != '/' )
+ p--;
+ return
+ p < path ? "." :
+ p == path ? "/" :
+ (*p = '\0', path);
}
/* End of copied part */