From 95670e03a01d30cda5a0f685974f28790be6809d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 3 Mar 2012 20:19:11 +0000 Subject: style cleanup / comment formatting for bli/bke/bmesh --- source/blender/blenlib/intern/BLI_kdopbvh.c | 27 ++-- source/blender/blenlib/intern/boxpack2d.c | 4 +- source/blender/blenlib/intern/bpath.c | 6 +- source/blender/blenlib/intern/fileops.c | 10 +- source/blender/blenlib/intern/freetypefont.c | 36 ++--- source/blender/blenlib/intern/math_color.c | 14 +- source/blender/blenlib/intern/math_color_inline.c | 6 +- source/blender/blenlib/intern/math_geom.c | 148 ++++++++++--------- source/blender/blenlib/intern/math_matrix.c | 4 +- source/blender/blenlib/intern/math_rotation.c | 74 +++++----- source/blender/blenlib/intern/math_vector.c | 8 +- source/blender/blenlib/intern/math_vector_inline.c | 4 +- source/blender/blenlib/intern/noise.c | 17 ++- source/blender/blenlib/intern/path_util.c | 160 ++++++++++----------- source/blender/blenlib/intern/pbvh.c | 118 +++++++-------- source/blender/blenlib/intern/scanfill.c | 77 +++++----- source/blender/blenlib/intern/storage.c | 6 +- source/blender/blenlib/intern/string.c | 8 +- source/blender/blenlib/intern/string_utf8.c | 12 +- source/blender/blenlib/intern/threads.c | 94 ++++++------ source/blender/blenlib/intern/winstuff.c | 6 +- 21 files changed, 425 insertions(+), 414 deletions(-) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index afc8a6a4aa6..1c0bac4a82f 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -201,16 +201,18 @@ static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, in ////////////////////////////////////////////////////////////////////////////////////////////////////// //static int size_threshold = 16; /* -* Common methods for all algorithms -*/ -/*static int floor_lg(int a) + * Common methods for all algorithms + */ +#if 0 +static int floor_lg(int a) { return (int)(floor(log(a)/log(2))); -}*/ +} +#endif /* -* Insertion sort algorithm -*/ + * Insertion sort algorithm + */ static void bvh_insertionsort(BVHNode **a, int lo, int hi, int axis) { int i,j; @@ -244,8 +246,8 @@ static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis) } /* -* Heapsort algorithm -*/ + * Heapsort algorithm + */ #if 0 static void bvh_downheap(BVHNode **a, int i, int n, int lo, int axis) { @@ -310,8 +312,8 @@ static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // #if 0 /* -* Quicksort algorithm modified for Introsort -*/ + * Quicksort algorithm modified for Introsort + */ static void bvh_introsort_loop (BVHNode **a, int lo, int hi, int depth_limit, int axis) { int p; @@ -1210,7 +1212,7 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare nearest[i] = proj[i]; } -/* +#if 0 //nearest on a general hull copy_v3_v3(nearest, data->co); for(i = data->tree->start_axis; i != data->tree->stop_axis; i++, bv+=2) @@ -1228,7 +1230,8 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare madd_v3_v3fl(nearest, KDOP_AXES[i], du); } } -*/ +#endif + return len_squared_v3v3(proj, nearest); } diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c index 57174d0c0dd..7a1f7bee1ce 100644 --- a/source/blender/blenlib/intern/boxpack2d.c +++ b/source/blender/blenlib/intern/boxpack2d.c @@ -277,8 +277,8 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he } /* Now we need to check that the box intersects - * with any other boxes - * Assume no intersection... */ + * with any other boxes + * Assume no intersection... */ isect = 0; if (/* Constrain boxes to positive X/Y values */ diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index fdda9166c94..7bc2446b64b 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -499,7 +499,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla Tex *tex = (Tex *)id; if (tex->plugin) { /* FIXME: rewrite_path assumes path length of FILE_MAX, but - tex->plugin->name is 160. ... is this field even a path? */ + * tex->plugin->name is 160. ... is this field even a path? */ //rewrite_path(tex->plugin->name, visit_cb, bpath_user_data); } if (tex->type == TEX_VOXELDATA && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format)) { @@ -594,7 +594,7 @@ void bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, voi } /* Rewrites a relative path to be relative to the main file - unless the path is - absolute, in which case it is not altered. */ + * absolute, in which case it is not altered. */ int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src) { /* be sure there is low chance of the path being too short */ @@ -609,7 +609,7 @@ int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_sr } /* Make referenced file absolute. This would be a side-effect of - BLI_cleanup_file, but we do it explicitely so we know if it changed. */ + * BLI_cleanup_file, but we do it explicitely so we know if it changed. */ BLI_strncpy(filepath, path_src, FILE_MAX); if (BLI_path_abs(filepath, base_old)) { /* Path was relative and is now absolute. Remap. diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 895ae03ab0f..a868cf8ea96 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -60,9 +60,9 @@ /* gzip the file in from and write it to "to". - return -1 if zlib fails, -2 if the originating file does not exist - note: will remove the "from" file - */ + * return -1 if zlib fails, -2 if the originating file does not exist + * note: will remove the "from" file + */ int BLI_file_gzip(const char *from, const char *to) { char buffer[10240]; @@ -106,8 +106,8 @@ int BLI_file_gzip(const char *from, const char *to) } /* gzip the file in from_file and write it to memery to_mem, at most size bytes. - return the unziped size - */ + * return the unziped size + */ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r) { gzFile gzfile; diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 3a0d44db12e..8fe081fe70b 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -322,13 +322,13 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) const char *fontname; VFontData *vfd; -/* +#if 0 FT_CharMap found = 0; FT_CharMap charmap; FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT; FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS; int n; -*/ +#endif // load the freetype font err = FT_New_Memory_Face( library, @@ -338,7 +338,8 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) &face ); if(err) return NULL; -/* + +#if 0 for ( n = 0; n < face->num_charmaps; n++ ) { charmap = face->charmaps[n]; @@ -355,7 +356,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) // now, select the charmap for the face object err = FT_Set_Charmap( face, found ); if ( err ) { return NULL; } -*/ +#endif // allocate blender font vfd= MEM_callocN(sizeof(*vfd), "FTVFontData"); @@ -416,13 +417,13 @@ static int check_freetypefont(PackedFile * pf) FT_Face face; FT_GlyphSlot glyph; FT_UInt glyph_index; -/* +#if 0 FT_CharMap charmap; FT_CharMap found; FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT; FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS; int n; -*/ +#endif int success = 0; err = FT_New_Memory_Face( library, @@ -435,24 +436,23 @@ static int check_freetypefont(PackedFile * pf) //XXX error("This is not a valid font"); } else { -/* - for ( n = 0; n < face->num_charmaps; n++ ) - { - charmap = face->charmaps[n]; - if ( charmap->platform_id == my_platform_id && - charmap->encoding_id == my_encoding_id ) - { - found = charmap; - break; - } + +#if 0 + for ( n = 0; n < face->num_charmaps; n++) { + charmap = face->charmaps[n]; + if (charmap->platform_id == my_platform_id && charmap->encoding_id == my_encoding_id) { + found = charmap; + break; + } } - if ( !found ) { return 0; } + if (!found ) { return 0; } // now, select the charmap for the face object err = FT_Set_Charmap( face, found ); if ( err ) { return 0; } -*/ +#endif + glyph_index = FT_Get_Char_Index( face, 'A' ); err = FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP); if(err) success = 0; diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index b9772b1f3b4..96600b6665f 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -290,8 +290,8 @@ void xyz_to_rgb(float xc, float yc, float zc, float *r, float *g, float *b, int } /* we define a 'cpack' here as a (3 byte color code) number that can be expressed like 0xFFAA66 or so. - for that reason it is sensitive for endianness... with this function it works correctly -*/ + * for that reason it is sensitive for endianness... with this function it works correctly + */ unsigned int hsv_to_cpack(float h, float s, float v) { @@ -413,11 +413,11 @@ void minmax_rgb(short c[]) } /*If the requested RGB shade contains a negative weight for - one of the primaries, it lies outside the color gamut - accessible from the given triple of primaries. Desaturate - it by adding white, equal quantities of R, G, and B, enough - to make RGB all positive. The function returns 1 if the - components were modified, zero otherwise.*/ + * one of the primaries, it lies outside the color gamut + * accessible from the given triple of primaries. Desaturate + * it by adding white, equal quantities of R, G, and B, enough + * to make RGB all positive. The function returns 1 if the + * components were modified, zero otherwise.*/ int constrain_rgb(float *r, float *g, float *b) { float w; diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index f497470fa4c..47ee54d6215 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -79,9 +79,9 @@ MINLINE void linearrgb_to_srgb_uchar4(unsigned char srgb[4], const float linear[ } /* predivide versions to work on associated/premultipled alpha. if this should - be done or not depends on the background the image will be composited over, - ideally you would never do color space conversion on an image with alpha - because it is ill defined */ + * be done or not depends on the background the image will be composited over, + * ideally you would never do color space conversion on an image with alpha + * because it is ill defined */ MINLINE void srgb_to_linearrgb_predivide_v4(float linear[4], const float srgb[4]) { diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 64b31df9c8e..9f5e191c9ff 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -331,8 +331,9 @@ int isect_line_line_v2(const float v1[2], const float v2[2], const float v3[2], } /* get intersection point of two 2D segments and return intersection type: - -1: colliniar - 1: intersection */ + * -1: colliniar + * 1: intersection + */ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[2], const float v4[2], float vi[2]) { float a1, a2, b1, b2, c1, c2, d; @@ -531,29 +532,28 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], } /* --1: colliniar - 1: intersection - -*/ + * -1: colliniar + * 1: intersection + */ static short IsectLLPt2Df(const float x0, const float y0, const float x1, const float y1, const float x2, const float y2, const float x3, const float y3, float *xi,float *yi) { /* - this function computes the intersection of the sent lines - and returns the intersection point, note that the function assumes - the lines intersect. the function can handle vertical as well - as horizontal lines. note the function isn't very clever, it simply - applies the math, but we don't need speed since this is a - pre-processing step - */ + * this function computes the intersection of the sent lines + * and returns the intersection point, note that the function assumes + * the lines intersect. the function can handle vertical as well + * as horizontal lines. note the function isn't very clever, it simply + * applies the math, but we don't need speed since this is a + * pre-processing step + */ float c1,c2, // constants of linear equations det_inv, // the inverse of the determinant of the coefficient m1,m2; // the slopes of each line /* - compute slopes, note the cludge for infinity, however, this will - be close enough - */ + * compute slopes, note the cludge for infinity, however, this will + * be close enough + */ if (fabs(x1-x0) > 0.000001) m1 = (y1-y0) / (x1-x0); else @@ -629,9 +629,9 @@ int isect_point_quad_v2(const float pt[2], const float v1[2], const float v2[2], } /* moved from effect.c - test if the line starting at p1 ending at p2 intersects the triangle v0..v2 - return non zero if it does -*/ + * test if the line starting at p1 ending at p2 intersects the triangle v0..v2 + * return non zero if it does + */ int isect_line_tri_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]) @@ -670,9 +670,9 @@ int isect_line_tri_v3(const float p1[3], const float p2[3], return 1; } /* moved from effect.c - test if the ray starting at p1 going in d direction intersects the triangle v0..v2 - return non zero if it does -*/ + * test if the ray starting at p1 going in d direction intersects the triangle v0..v2 + * return non zero if it does + */ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]) @@ -1512,14 +1512,12 @@ int isect_point_tri_v2(float v0[2], float v1[2], float v2[2], float pt[2]) #endif /* - - x1,y2 - | \ - | \ .(a,b) - | \ - x1,y1-- x2,y1 - -*/ + * x1,y2 + * | \ + * | \ .(a,b) + * | \ + * x1,y1-- x2,y1 + */ int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y2, const int a, const int b) { float v1[2], v2[2], v3[2], p[2]; @@ -1541,18 +1539,18 @@ int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y static int point_in_slice(const float p[3], const float v1[3], const float l1[3], const float l2[3]) { -/* -what is a slice ? -some maths: -a line including l1,l2 and a point not on the line -define a subset of R3 delimeted by planes parallel to the line and orthogonal -to the (point --> line) distance vector,one plane on the line one on the point, -the room inside usually is rather small compared to R3 though still infinte -useful for restricting (speeding up) searches -e.g. all points of triangular prism are within the intersection of 3 'slices' -onother trivial case : cube -but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too -*/ + /* + * what is a slice ? + * some maths: + * a line including l1,l2 and a point not on the line + * define a subset of R3 delimeted by planes parallel to the line and orthogonal + * to the (point --> line) distance vector,one plane on the line one on the point, + * the room inside usually is rather small compared to R3 though still infinte + * useful for restricting (speeding up) searches + * e.g. all points of triangular prism are within the intersection of 3 'slices' + * onother trivial case : cube + * but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too + */ float h,rp[3],cp[3],q[3]; closest_to_line_v3(cp,v1,l1,l2); @@ -1565,8 +1563,8 @@ but see a 'spat' which is a deformed cube with paired parallel planes needs only } #if 0 -/*adult sister defining the slice planes by the origin and the normal -NOTE |normal| may not be 1 but defining the thickness of the slice*/ +/* adult sister defining the slice planes by the origin and the normal + * NOTE |normal| may not be 1 but defining the thickness of the slice */ static int point_in_slice_as(float p[3],float origin[3],float normal[3]) { float h,rp[3]; @@ -1791,7 +1789,7 @@ void interp_weights_face_v3(float w[4], const float v1[3], const float v2[3], co if(degenerate || (w[0] < 0.0f)) { /* if w[1] is negative, co is on the other side of the v1-v3 edge, - so we interpolate using the other triangle */ + * so we interpolate using the other triangle */ degenerate= barycentric_weights(v2, v3, v4, co, n, w2); if(!degenerate) { @@ -2035,8 +2033,8 @@ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3 void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]) { /* find UV such that - t= u*t0 + v*t1 + (1-u-v)*t2 - u*(t0-t2) + v*(t1-t2)= t-t2 */ + * t= u*t0 + v*t1 + (1-u-v)*t2 + * u*(t0-t2) + v*(t1-t2)= t-t2 */ const double a= st0[0]-st2[0], b= st1[0]-st2[0]; const double c= st0[1]-st2[1], d= st1[1]-st2[1]; const double det= a*d - c*b; @@ -2056,7 +2054,7 @@ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const (st2[0]*st3[1] - st2[1]*st3[0]) + (st3[0]*st0[1] - st3[1]*st0[0]); /* X is 2D cross product (determinant) - A= (p0-p) X (p0-p3)*/ + * A= (p0-p) X (p0-p3)*/ const double a= (st0[0]-st[0])*(st0[1]-st3[1]) - (st0[1]-st[1])*(st0[0]-st3[0]); /* B= ( (p0-p) X (p1-p2) + (p1-p) X (p0-p3) ) / 2 */ @@ -2083,7 +2081,7 @@ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const } /* find UV such that - fST = (1-u)(1-v)*ST0 + u*(1-v)*ST1 + u*v*ST2 + (1-u)*v*ST3 */ + * fST = (1-u)(1-v)*ST0 + u*(1-v)*ST1 + u*v*ST2 + (1-u)*v*ST3 */ { const double denom_s= (1-r_uv[0])*(st0[0]-st3[0]) + r_uv[0]*(st1[0]-st2[0]); const double denom_t= (1-r_uv[0])*(st0[1]-st3[1]) + r_uv[0]*(st1[1]-st2[1]); @@ -2386,7 +2384,7 @@ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3], } /* Add weighted face normal component into normals of the face vertices. - Caller must pass pre-allocated vdiffs of nverts length. */ + * Caller must pass pre-allocated vdiffs of nverts length. */ void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], float **vertcos, float vdiffs[][3], int nverts) { @@ -2405,9 +2403,9 @@ void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], for(i=0; i 1.0e-35f) { d= sqrtf(d); mul_v3_v3fl(r, a, 1.0f/d); @@ -541,7 +541,7 @@ MINLINE double normalize_v3_d(double n[3]) double d= n[0]*n[0] + n[1]*n[1] + n[2]*n[2]; /* a larger value causes normalize errors in a - scaled down models with camera xtreme close */ + * scaled down models with camera xtreme close */ if(d > 1.0e-35) { double mul; diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index f77ea3895c3..ddf165662fc 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -1043,7 +1043,8 @@ float BLI_hnoisep(float noisesize, float x, float y, float z) return noise3_perlin(vec); } -/*static float turbulencep(float noisesize, float x, float y, float z, int nr) +#if 0 +static float turbulencep(float noisesize, float x, float y, float z, int nr) { float vec[3]; @@ -1052,7 +1053,8 @@ float BLI_hnoisep(float noisesize, float x, float y, float z) vec[2]= z/noisesize; nr++; return turbulence_perlin(vec, 1.0, (float)(1< 2 && relfile[1] != ':') { char* ptemp; /* fix missing volume name in relative base, - can happen with old recent-files.txt files */ + * can happen with old recent-files.txt files */ get_default_root(temp); ptemp = &temp[2]; if (relfile[0] != '\\' && relfile[0] != '/') { @@ -471,7 +471,7 @@ void BLI_path_rel(char *file, const char *relfile) if (lslash) { /* find the prefix of the filename that is equal for both filenames. - This is replaced by the two slashes at the beginning */ + * This is replaced by the two slashes at the beginning */ char *p= temp; char *q= file; @@ -490,8 +490,8 @@ void BLI_path_rel(char *file, const char *relfile) } /* we might have passed the slash when the beginning of a dir matches - so we rewind. Only check on the actual filename - */ + * so we rewind. Only check on the actual filename + */ if (*q != '/') { while ( (q >= file) && (*q != '/') ) { --q; --p; } } @@ -502,10 +502,10 @@ void BLI_path_rel(char *file, const char *relfile) strcpy(res, "//"); /* p now points to the slash that is at the beginning of the part - where the path is different from the relative path. - We count the number of directories we need to go up in the - hierarchy to arrive at the common 'prefix' of the path - */ + * where the path is different from the relative path. + * We count the number of directories we need to go up in the + * hierarchy to arrive at the common 'prefix' of the path + */ while (p && p < lslash) { if (*p == '/') strcat(res, "../"); @@ -646,9 +646,9 @@ int BLI_path_abs(char *path, const char *basepath) BLI_strncpy(vol, path, 3); /* we are checking here if we have an absolute path that is not in the current - blend file as a lib main - we are basically checking for the case that a - UNIX root '/' is passed. - */ + * blend file as a lib main - we are basically checking for the case that a + * UNIX root '/' is passed. + */ if (!wasrelative && (vol[1] != ':' && (vol[0] == '\0' || vol[0] == '/' || vol[0] == '\\'))) { char *p = path; get_default_root(tmp); @@ -685,11 +685,11 @@ int BLI_path_abs(char *path, const char *basepath) BLI_cleanup_path(NULL, base); /* push slashes into unix mode - strings entering this part are - potentially messed up: having both back- and forward slashes. - Here we push into one conform direction, and at the end we - push them into the system specific dir. This ensures uniformity - of paths and solving some problems (and prevent potential future - ones) -jesterKing. */ + * potentially messed up: having both back- and forward slashes. + * Here we push into one conform direction, and at the end we + * push them into the system specific dir. This ensures uniformity + * of paths and solving some problems (and prevent potential future + * ones) -jesterKing. */ BLI_char_switch(tmp, '\\', '/'); BLI_char_switch(base, '\\', '/'); @@ -716,11 +716,11 @@ int BLI_path_abs(char *path, const char *basepath) #ifdef WIN32 /* skip first two chars, which in case of - absolute path will be drive:/blabla and - in case of relpath //blabla/. So relpath - // will be retained, rest will be nice and - shiny win32 backward slashes :) -jesterKing - */ + * absolute path will be drive:/blabla and + * in case of relpath //blabla/. So relpath + * // will be retained, rest will be nice and + * shiny win32 backward slashes :) -jesterKing + */ BLI_char_switch(path+2, '/', '\\'); #endif @@ -753,12 +753,12 @@ int BLI_path_cwd(char *path) printf( "Could not get the current working directory - $PWD for an unknown reason."); } else { /* uses the blend path relative to cwd important for loading relative linked files. - * - * cwd should contain c:\ etc on win32 so the relbase can be NULL - * relbase being NULL also prevents // being misunderstood as relative to the current - * blend file which isnt a feature we want to use in this case since were dealing - * with a path from the command line, rather than from inside Blender */ - + * + * cwd should contain c:\ etc on win32 so the relbase can be NULL + * relbase being NULL also prevents // being misunderstood as relative to the current + * blend file which isnt a feature we want to use in this case since were dealing + * with a path from the command line, rather than from inside Blender */ + char origpath[FILE_MAX]; BLI_strncpy(origpath, path, FILE_MAX); @@ -805,7 +805,7 @@ 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 */ + * as default location to save documents */ const char *BLI_getDefaultDocumentFolder(void) { #ifndef WIN32 @@ -1196,8 +1196,8 @@ void BLI_setenv(const char *env, const char*val) /** - Only set an env var if already not there. - Like Unix setenv(env, val, 0); + * Only set an env var if already not there. + * Like Unix setenv(env, val, 0); */ void BLI_setenv_if_new(const char *env, const char* val) { @@ -1288,13 +1288,13 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, /* we first push all slashes into unix mode, just to make sure we don't get - any mess with slashes later on. -jesterKing */ + * any mess with slashes later on. -jesterKing */ /* constant strings can be passed for those parameters - don't change them - elubie */ - /* +#if 0 BLI_char_switch(relabase, '\\', '/'); BLI_char_switch(dir, '\\', '/'); BLI_char_switch(file, '\\', '/'); - */ +#endif /* Resolve relative references */ if (relabase && dir[0] == '/' && dir[1] == '/') { @@ -1547,31 +1547,31 @@ char *BLI_path_basename(char *path) return filename ? filename + 1 : path; } -/* - Produce image export path. - - Fails returning 0 if image filename is empty or if destination path - matches image path (i.e. both are the same file). - - Trailing slash in dest_dir is optional. - - Logic: - - - if an image is "below" current .blend file directory, rebuild the - same dir structure in dest_dir - - For example //textures/foo/bar.png becomes - [dest_dir]/textures/foo/bar.png. - - - if an image is not "below" current .blend file directory, - disregard it's path and copy it in the same directory where 3D file - goes. - - For example //../foo/bar.png becomes [dest_dir]/bar.png. - - This logic will help ensure that all image paths are relative and - that a user gets his images in one place. It'll also provide - consistent behavior across exporters. +/** + * Produce image export path. + * + * Fails returning 0 if image filename is empty or if destination path + * matches image path (i.e. both are the same file). + * + * Trailing slash in dest_dir is optional. + * + * Logic: + * + * - if an image is "below" current .blend file directory, rebuild the + * same dir structure in dest_dir + * + * For example //textures/foo/bar.png becomes + * [dest_dir]/textures/foo/bar.png. + * + * - if an image is not "below" current .blend file directory, + * disregard it's path and copy it in the same directory where 3D file + * goes. + * + * For example //../foo/bar.png becomes [dest_dir]/bar.png. + * + * This logic will help ensure that all image paths are relative and + * that a user gets his images in one place. It'll also provide + * consistent behavior across exporters. */ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const char *base_dir, const char *src_dir, const char *dest_dir) { @@ -1740,18 +1740,18 @@ static int add_win32_extension(char *name) return (retval); } -/* -* Checks if name is a fully qualified filename to an executable. -* If not it searches $PATH for the file. On Windows it also -* adds the correct extension (.com .exe etc) from -* $PATHEXT if necessary. Also on Windows it translates -* the name to its 8.3 version to prevent problems with -* spaces and stuff. Final result is returned in fullname. -* -* \param fullname The full path and full name of the executable -* (must be FILE_MAX minimum) -* \param name The name of the executable (usually argv[0]) to be checked -*/ +/** + * Checks if name is a fully qualified filename to an executable. + * If not it searches $PATH for the file. On Windows it also + * adds the correct extension (.com .exe etc) from + * $PATHEXT if necessary. Also on Windows it translates + * the name to its 8.3 version to prevent problems with + * spaces and stuff. Final result is returned in fullname. + * + * \param fullname The full path and full name of the executable + * (must be FILE_MAX minimum) + * \param name The name of the executable (usually argv[0]) to be checked + */ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name) { char filename[FILE_MAX]; @@ -1849,15 +1849,15 @@ const char *BLI_program_dir(void) } /** -* Gets the temp directory when blender first runs. -* If the default path is not found, use try $TEMP -* -* Also make sure the temp dir has a trailing slash -* -* \param fullname The full path to the temp directory -* \param maxlen The size of the fullname buffer -* \param userdir Directory specified in user preferences -*/ + * Gets the temp directory when blender first runs. + * If the default path is not found, use try $TEMP + * + * Also make sure the temp dir has a trailing slash + * + * \param fullname The full path to the temp directory + * \param maxlen The size of the fullname buffer + * \param userdir Directory specified in user preferences + */ static void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir) { fullname[0] = '\0'; diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 318cd15d2e9..9e785f30ec7 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -63,52 +63,52 @@ struct PBVHNode { BB orig_vb; /* For internal nodes, the offset of the children in the PBVH - 'nodes' array. */ + * 'nodes' array. */ int children_offset; /* Pointer into the PBVH prim_indices array and the number of - primitives used by this leaf node. - - Used for leaf nodes in both mesh- and multires-based PBVHs. - */ + * primitives used by this leaf node. + * + * Used for leaf nodes in both mesh- and multires-based PBVHs. + */ int *prim_indices; unsigned int totprim; /* Array of indices into the mesh's MVert array. Contains the - indices of all vertices used by faces that are within this - node's bounding box. - - Note that a vertex might be used by a multiple faces, and - these faces might be in different leaf nodes. Such a vertex - will appear in the vert_indices array of each of those leaf - nodes. - - In order to support cases where you want access to multiple - nodes' vertices without duplication, the vert_indices array - is ordered such that the first part of the array, up to - index 'uniq_verts', contains "unique" vertex indices. These - vertices might not be truly unique to this node, but if - they appear in another node's vert_indices array, they will - be above that node's 'uniq_verts' value. - - Used for leaf nodes in a mesh-based PBVH (not multires.) - */ + * indices of all vertices used by faces that are within this + * node's bounding box. + * + * Note that a vertex might be used by a multiple faces, and + * these faces might be in different leaf nodes. Such a vertex + * will appear in the vert_indices array of each of those leaf + * nodes. + * + * In order to support cases where you want access to multiple + * nodes' vertices without duplication, the vert_indices array + * is ordered such that the first part of the array, up to + * index 'uniq_verts', contains "unique" vertex indices. These + * vertices might not be truly unique to this node, but if + * they appear in another node's vert_indices array, they will + * be above that node's 'uniq_verts' value. + * + * Used for leaf nodes in a mesh-based PBVH (not multires.) + */ int *vert_indices; unsigned int uniq_verts, face_verts; /* An array mapping face corners into the vert_indices - array. The array is sized to match 'totprim', and each of - the face's corners gets an index into the vert_indices - array, in the same order as the corners in the original - MFace. The fourth value should not be used if the original - face is a triangle. - - Used for leaf nodes in a mesh-based PBVH (not multires.) - */ + * array. The array is sized to match 'totprim', and each of + * the face's corners gets an index into the vert_indices + * array, in the same order as the corners in the original + * MFace. The fourth value should not be used if the original + * face is a triangle. + * + * Used for leaf nodes in a mesh-based PBVH (not multires.) + */ int (*face_vert_indices)[4]; /* Indicates whether this node is a leaf or not; also used for - marking various updates that need to be applied. */ + * marking various updates that need to be applied. */ PBVHNodeFlags flag : 8; /* Used for raycasting: how close bb is to the ray point. */ @@ -140,7 +140,7 @@ struct PBVH { int gridsize; /* Only used during BVH build and update, - don't need to remain valid after */ + * don't need to remain valid after */ BLI_bitmap vert_bitmap; #ifdef PERFCNTRS @@ -311,7 +311,7 @@ static void grow_nodes(PBVH *bvh, int totnode) } /* Add a vertex to the map, with a positive value for unique vertices and - a negative value for additional vertices */ + * a negative value for additional vertices */ static int map_insert_vert(PBVH *bvh, GHash *map, unsigned int *face_verts, unsigned int *uniq_verts, int vertex) @@ -417,15 +417,15 @@ static void build_grids_leaf_node(PBVH *bvh, PBVHNode *node) } /* Recursively build a node in the tree - - vb is the voxel box around all of the primitives contained in - this node. - - cb is the bounding box around all the centroids of the primitives - contained in this node - - offset and start indicate a range in the array of primitive indices -*/ + * + * vb is the voxel box around all of the primitives contained in + * this node. + * + * cb is the bounding box around all the centroids of the primitives + * contained in this node + * + * offset and start indicate a range in the array of primitive indices + */ static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, int offset, int count) @@ -689,7 +689,7 @@ static PBVHNode *pbvh_iter_next(PBVHIter *iter) int revisiting; /* purpose here is to traverse tree, visiting child nodes before their - parents, this order is necessary for e.g. computing bounding boxes */ + * parents, this order is necessary for e.g. computing bounding boxes */ while(iter->stacksize) { /* pop node */ @@ -925,18 +925,18 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, return; /* could be per node to save some memory, but also means - we have to store for each vertex which node it is in */ + * we have to store for each vertex which node it is in */ vnor= MEM_callocN(sizeof(float)*3*bvh->totvert, "bvh temp vnors"); - /* subtle assumptions: - - We know that for all edited vertices, the nodes with faces - adjacent to these vertices have been marked with PBVH_UpdateNormals. - This is true because if the vertex is inside the brush radius, the - bounding box of it's adjacent faces will be as well. - - However this is only true for the vertices that have actually been - edited, not for all vertices in the nodes marked for update, so we - can only update vertices marked with ME_VERT_PBVH_UPDATE. - */ + /* subtle assumptions: + * - We know that for all edited vertices, the nodes with faces + * adjacent to these vertices have been marked with PBVH_UpdateNormals. + * This is true because if the vertex is inside the brush radius, the + * bounding box of it's adjacent faces will be as well. + * - However this is only true for the vertices that have actually been + * edited, not for all vertices in the nodes marked for update, so we + * can only update vertices marked with ME_VERT_PBVH_UPDATE. + */ #pragma omp parallel for private(n) schedule(static) for(n = 0; n < totnode; n++) { @@ -966,7 +966,7 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, if(bvh->verts[v].flag & ME_VERT_PBVH_UPDATE) { /* this seems like it could be very slow but profile - does not show this, so just leave it for now? */ + * does not show this, so just leave it for now? */ #pragma omp atomic vnor[v][0] += fn[0]; #pragma omp atomic @@ -1454,10 +1454,10 @@ void BLI_pbvh_node_draw(PBVHNode *node, void *UNUSED(data)) } /* Adapted from: - http://www.gamedev.net/community/forums/topic.asp?topic_id=512123 - Returns true if the AABB is at least partially within the frustum - (ok, not a real frustum), false otherwise. -*/ + * http://www.gamedev.net/community/forums/topic.asp?topic_id=512123 + * Returns true if the AABB is at least partially within the frustum + * (ok, not a real frustum), false otherwise. + */ int BLI_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data) { float (*planes)[4] = data; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index b828ae052f8..7061a0fcf08 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -139,9 +139,9 @@ struct mem_elements { /* simple optimization for allocating thousands of small memory blocks - only to be used within loops, and not by one function at a time - free in the end, with argument '-1' -*/ + * only to be used within loops, and not by one function at a time + * free in the end, with argument '-1' + */ #define MEM_ELEM_BLOCKSIZE 16384 static struct mem_elements * melem__cur= NULL; static int melem__offs= 0; /* the current free address */ @@ -423,7 +423,7 @@ static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve) static void testvertexnearedge(void) { /* only vertices with ->h==1 are being tested for - being close to an edge, if true insert */ + * being close to an edge, if true insert */ ScanFillVert *eve; ScanFillEdge *eed,*ed1; @@ -528,7 +528,8 @@ static int scanfill(PolyFill *pf) nr= pf->nr; - /* PRINTS + /* PRINTS */ +#if 0 verts= pf->verts; eve= fillvertbase.first; while(eve) { @@ -539,7 +540,8 @@ static int scanfill(PolyFill *pf) while(eed) { printf("edge: %x verts: %x %x\n",eed,eed->v1,eed->v2); eed= eed->next; - } */ + } +#endif /* STEP 0: remove zero sized edges */ eed= filledgebase.first; @@ -567,8 +569,8 @@ static int scanfill(PolyFill *pf) } /* STEP 1: make using FillVert and FillEdge lists a sorted - ScanFillVertLink list - */ + * ScanFillVertLink list + */ sc= scdata= (ScanFillVertLink *)MEM_callocN(pf->verts*sizeof(ScanFillVertLink),"Scanfill1"); eve= fillvertbase.first; verts= 0; @@ -591,10 +593,10 @@ static int scanfill(PolyFill *pf) nexted= eed->next; BLI_remlink(&filledgebase,eed); /* This code is for handling zero-length edges that get - collapsed in step 0. It was removed for some time to - fix trunk bug #4544, so if that comes back, this code - may need some work, or there will have to be a better - fix to #4544. */ + * collapsed in step 0. It was removed for some time to + * fix trunk bug #4544, so if that comes back, this code + * may need some work, or there will have to be a better + * fix to #4544. */ if(eed->v1->f==255) { v1= eed->v1; while((eed->v1->f == 255) && (eed->v1->tmp.v != v1)) @@ -609,7 +611,7 @@ static int scanfill(PolyFill *pf) eed= nexted; } - /* +#if 0 sc= scdata; for(a=0;av1); @@ -619,7 +621,8 @@ static int scanfill(PolyFill *pf) eed= eed->next; } sc++; - }*/ + } +#endif /* STEP 2: FILL LOOP */ @@ -788,13 +791,13 @@ int BLI_begin_edgefill(void) int BLI_edgefill(short mat_nr) { /* - - fill works with its own lists, so create that first (no faces!) - - for vertices, put in ->tmp.v the old pointer - - struct elements xs en ys are not used here: don't hide stuff in it - - edge flag ->f becomes 2 when it's a new edge - - mode: & 1 is check for crossings, then create edges (TO DO ) - - returns number of triangle faces added. - */ + * - fill works with its own lists, so create that first (no faces!) + * - for vertices, put in ->tmp.v the old pointer + * - struct elements xs en ys are not used here: don't hide stuff in it + * - edge flag ->f becomes 2 when it's a new edge + * - mode: & 1 is check for crossings, then create edges (TO DO ) + * - returns number of triangle faces added. + */ ListBase tempve, temped; ScanFillVert *eve; ScanFillEdge *eed,*nexted; @@ -990,14 +993,14 @@ int BLI_edgefill(short mat_nr) /* CURRENT STATUS: - - eve->f :1= availalble in edges - - eve->xs :polynumber - - eve->h :amount of edges connected to vertex - - eve->tmp.v :store! original vertex number - - - eed->f :1= boundary edge (optionally set by caller) - - eed->f1 :poly number - */ + * - eve->f :1= availalble in edges + * - eve->xs :polynumber + * - eve->h :amount of edges connected to vertex + * - eve->tmp.v :store! original vertex number + * + * - eed->f :1= boundary edge (optionally set by caller) + * - eed->poly_nr :poly number + */ /* STEP 3: MAKE POLYFILL STRUCT */ @@ -1040,13 +1043,15 @@ int BLI_edgefill(short mat_nr) /* so, sort first */ qsort(pflist, poly, sizeof(PolyFill), vergpoly); - - /*pf= pflist; + +#if 0 + pf= pflist; for(a=1;a<=poly;a++) { printf("poly:%d edges:%d verts:%d flag: %d\n",a,pf->edges,pf->verts,pf->f); PRINT2(f, f, pf->min[0], pf->min[1]); pf++; - }*/ + } +#endif polycache= pc= MEM_callocN(sizeof(short)*poly, "polycache"); pf= pflist; @@ -1071,13 +1076,15 @@ int BLI_edgefill(short mat_nr) } MEM_freeN(polycache); } - - /* printf("after merge\n"); + +#if 0 + printf("after merge\n"); pf= pflist; for(a=1;a<=poly;a++) { printf("poly:%d edges:%d verts:%d flag: %d\n",a,pf->edges,pf->verts,pf->f); pf++; - } */ + } +#endif /* STEP 5: MAKE TRIANGLES */ diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 7c48d000d39..29f11ee0550 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -444,9 +444,9 @@ int BLI_exists(const char *name) { #if defined(WIN32) && !defined(__MINGW32__) struct _stat64i32 st; - /* in Windows stat doesn't recognize dir ending on a slash - To not break code where the ending slash is expected we - don't mess with the argument name directly here - elubie */ + /* in Windows stat doesn't recognize dir ending on a slash + * To not break code where the ending slash is expected we + * don't mess with the argument name directly here - elubie */ char tmp[FILE_MAX]; int len, res; BLI_strncpy(tmp, name, FILE_MAX); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index e2c86d70872..80f1606414c 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -326,11 +326,11 @@ int BLI_strncasecmp(const char *s1, const char *s2, size_t len) int BLI_natstrcmp(const char *s1, const char *s2) { int d1= 0, d2= 0; - + /* if both chars are numeric, to a strtol(). - then increase string deltas as long they are - numeric, else do a tolower and char compare */ - + * then increase string deltas as long they are + * numeric, else do a tolower and char compare */ + while(1) { char c1 = tolower(s1[d1]); char c2 = tolower(s2[d2]); diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index c958648836b..c60df413161 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -27,8 +27,8 @@ */ /** \file blender/blenlib/intern/string_utf8.c - * \ingroup bli - */ + * \ingroup bli + */ #include #include @@ -41,9 +41,9 @@ * http://svn.swish-e.org/libswish3/trunk/src/libswish3/utf8.c r3044 - campbell */ /* based on the valid_utf8 routine from the PCRE library by Philip Hazel - - length is in bytes, since without knowing whether the string is valid - it's hard to know how many characters there are! */ + * + * length is in bytes, since without knowing whether the string is valid + * it's hard to know how many characters there are! */ static const char trailingBytesForUTF8[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -101,7 +101,7 @@ int BLI_utf8_invalid_byte(const char *str, int length) break; /* Check for leading 0xfe or 0xff, - and then for 1111 1100, xx00 00xx */ + * and then for 1111 1100, xx00 00xx */ case 5: if (c == 0xfe || c == 0xff || (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error; diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index e92b445c27f..6048ca8cfc3 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -63,48 +63,48 @@ static void *thread_tls_data; #endif /* ********** basic thread control API ************ - -Many thread cases have an X amount of jobs, and only an Y amount of -threads are useful (typically amount of cpus) - -This code can be used to start a maximum amount of 'thread slots', which -then can be filled in a loop with an idle timer. - -A sample loop can look like this (pseudo c); - - ListBase lb; - int maxthreads= 2; - int cont= 1; - - BLI_init_threads(&lb, do_something_func, maxthreads); - - while(cont) { - if(BLI_available_threads(&lb) && !(escape loop event)) { - // get new job (data pointer) - // tag job 'processed - BLI_insert_thread(&lb, job); - } - else PIL_sleep_ms(50); - - // find if a job is ready, this the do_something_func() should write in job somewhere - cont= 0; - for(go over all jobs) - if(job is ready) { - if(job was not removed) { - BLI_remove_thread(&lb, job); - } - } - else cont= 1; - } - // conditions to exit loop - if(if escape loop event) { - if(BLI_available_threadslots(&lb)==maxthreads) - break; - } - } - - BLI_end_threads(&lb); - + * + * Many thread cases have an X amount of jobs, and only an Y amount of + * threads are useful (typically amount of cpus) + * + * This code can be used to start a maximum amount of 'thread slots', which + * then can be filled in a loop with an idle timer. + * + * A sample loop can look like this (pseudo c); + * + * ListBase lb; + * int maxthreads= 2; + * int cont= 1; + * + * BLI_init_threads(&lb, do_something_func, maxthreads); + * + * while(cont) { + * if(BLI_available_threads(&lb) && !(escape loop event)) { + * // get new job (data pointer) + * // tag job 'processed + * BLI_insert_thread(&lb, job); + * } + * else PIL_sleep_ms(50); + * + * // find if a job is ready, this the do_something_func() should write in job somewhere + * cont= 0; + * for(go over all jobs) + * if(job is ready) { + * if(job was not removed) { + * BLI_remove_thread(&lb, job); + * } + * } + * else cont= 1; + * } + * // conditions to exit loop + * if(if escape loop event) { + * if(BLI_available_threadslots(&lb)==maxthreads) + * break; + * } + * } + * + * BLI_end_threads(&lb); + * ************************************************ */ static pthread_mutex_t _malloc_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER; @@ -146,8 +146,8 @@ void BLI_threadapi_init(void) } /* tot = 0 only initializes malloc mutex in a safe way (see sequence.c) - problem otherwise: scene render will kill of the mutex! -*/ + * problem otherwise: scene render will kill of the mutex! + */ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot) { @@ -172,8 +172,8 @@ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot) #if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - we copy gomp thread local storage pointer to setting it again - inside the thread that we start */ + * we copy gomp thread local storage pointer to setting it again + * inside the thread that we start */ thread_tls_data = pthread_getspecific(gomp_tls_key); #endif } @@ -213,7 +213,7 @@ static void *tslot_thread_start(void *tslot_p) #if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - set gomp thread local storage pointer which was copied beforehand */ + * set gomp thread local storage pointer which was copied beforehand */ pthread_setspecific (gomp_tls_key, thread_tls_data); #endif diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index b2002b63a22..d61f4a8880e 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -227,8 +227,8 @@ void get_default_root(char* root) char str[MAX_PATH+1]; /* the default drive to resolve a directory without a specified drive - should be the Windows installation drive, since this was what the OS - assumes. */ + * should be the Windows installation drive, since this was what the OS + * assumes. */ if (GetWindowsDirectory(str,MAX_PATH+1)) { root[0] = str[0]; root[1] = ':'; @@ -236,7 +236,7 @@ void get_default_root(char* root) root[3] = '\0'; } else { /* if GetWindowsDirectory fails, something has probably gone wrong, - we are trying the blender install dir though */ + * we are trying the blender install dir though */ if (GetModuleFileName(NULL,str,MAX_PATH+1)) { printf("Error! Could not get the Windows Directory - Defaulting to Blender installation Dir!"); root[0] = str[0]; -- cgit v1.2.3