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>2014-03-15 20:24:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-15 20:26:23 +0400
commit2097e621edcf7658895b9f6ba9cc4e51f5538369 (patch)
tree9f112e8a2b35fed01734ed355d3832cd857de826 /source/blender/blenlib
parent38244166b03bc4a01d8c0b99e2fd2cb2c9b60012 (diff)
Code cleanup: use r_ prefix for return args
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_edgehash.h4
-rw-r--r--source/blender/blenlib/BLI_fileops.h2
-rw-r--r--source/blender/blenlib/BLI_math_color.h8
-rw-r--r--source/blender/blenlib/BLI_math_geom.h6
-rw-r--r--source/blender/blenlib/intern/edgehash.c6
-rw-r--r--source/blender/blenlib/intern/fileops.c4
-rw-r--r--source/blender/blenlib/intern/math_color.c26
-rw-r--r--source/blender/blenlib/intern/math_geom.c22
-rw-r--r--source/blender/blenlib/intern/string_utf8.c4
9 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index 2ca011871d8..fccbda4b4db 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -60,7 +60,7 @@ void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag);
EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
void BLI_edgehashIterator_free(EdgeHashIterator *ehi);
-void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r);
+void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *r_v0, unsigned int *r_v1);
void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
void **BLI_edgehashIterator_getValue_p(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val);
@@ -89,7 +89,7 @@ void BLI_edgeset_free(EdgeSet *es);
/* rely on inline api for now */
BLI_INLINE EdgeSetIterator *BLI_edgesetIterator_new(EdgeSet *gs) { return (EdgeSetIterator *)BLI_edgehashIterator_new((EdgeHash *)gs); }
BLI_INLINE void BLI_edgesetIterator_free(EdgeSetIterator *esi) { BLI_edgehashIterator_free((EdgeHashIterator *)esi); }
-BLI_INLINE void BLI_edgesetIterator_getKey(EdgeSetIterator *esi, unsigned int *v0_r, unsigned int *v1_r) { BLI_edgehashIterator_getKey((EdgeHashIterator *)esi, v0_r, v1_r); }
+BLI_INLINE void BLI_edgesetIterator_getKey(EdgeSetIterator *esi, unsigned int *r_v0, unsigned int *r_v1) { BLI_edgehashIterator_getKey((EdgeHashIterator *)esi, r_v0, r_v1); }
BLI_INLINE void BLI_edgesetIterator_step(EdgeSetIterator *esi) { BLI_edgehashIterator_step((EdgeHashIterator *)esi); }
BLI_INLINE bool BLI_edgesetIterator_isDone(EdgeSetIterator *esi) { return BLI_edgehashIterator_isDone((EdgeHashIterator *)esi); }
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index ca82086b529..7c10e50acc4 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -85,7 +85,7 @@ bool BLI_file_is_writable(const char *file);
bool BLI_file_touch(const char *file);
int BLI_file_gzip(const char *from, const char *to);
-char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r);
+char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size);
size_t BLI_file_descriptor_size(int file);
size_t BLI_file_size(const char *file);
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h
index 8a6bc35141c..5c14ac55492 100644
--- a/source/blender/blenlib/BLI_math_color.h
+++ b/source/blender/blenlib/BLI_math_color.h
@@ -132,10 +132,10 @@ void hsv_clamp_v(float hsv[3], float v_max);
void rgb_float_set_hue_float_offset(float *rgb, float hue_offset);
void rgb_byte_set_hue_float_offset(unsigned char *rgb, float hue_offset);
-void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3]);
-void rgba_uchar_to_float(float col_r[4], const unsigned char col_ub[4]);
-void rgb_float_to_uchar(unsigned char col_r[3], const float col_f[3]);
-void rgba_float_to_uchar(unsigned char col_r[4], const float col_f[4]);
+void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3]);
+void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4]);
+void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3]);
+void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4]);
void xyz_to_lab(float x, float y, float z, float *l, float *a, float *b);
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index e800369a682..09ff3585312 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -84,7 +84,7 @@ float dist_squared_to_line_v2(const float p[2], const float l1[2], const float l
float dist_to_line_v2(const float p[2], const float l1[2], const float l2[2]);
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2]);
float dist_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2]);
-void closest_to_line_segment_v2(float closest[2], const float p[2], const float l1[2], const float l2[2]);
+void closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2]);
float dist_squared_to_plane_v3(const float p[3], const float plane[4]);
float dist_to_plane_v3(const float p[3], const float plane[4]);
@@ -94,8 +94,8 @@ float dist_squared_to_line_v3(const float p[3], const float l1[3], const float l
float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3]);
float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
-void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
-void closest_to_plane_v3(float close_r[3], const float plane[4], const float pt[3]);
+void closest_to_line_segment_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]);
+void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3]);
/* Set 'r' to the point in triangle (t1, t2, t3) closest to point 'p' */
void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3], const float t2[3], const float t3[3]);
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index 1d0c9b20550..c12efbd80f6 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -465,11 +465,11 @@ void BLI_edgehashIterator_free(EdgeHashIterator *ehi)
/**
* Retrieve the key from an iterator.
*/
-void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r)
+void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *r_v0, unsigned int *r_v1)
{
if (ehi->curEntry) {
- *v0_r = ehi->curEntry->v0;
- *v1_r = ehi->curEntry->v1;
+ *r_v0 = ehi->curEntry->v0;
+ *r_v1 = ehi->curEntry->v1;
}
}
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 55726565f59..4702b384211 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -116,7 +116,7 @@ int BLI_file_gzip(const char *from, const char *to)
/* gzip the file in from_file and write it to memory to_mem, at most size bytes.
* return the unziped size
*/
-char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
+char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
{
gzFile gzfile;
int readsize, size, alloc_size = 0;
@@ -154,7 +154,7 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
else if (alloc_size != size)
mem = MEM_reallocN(mem, size);
- *size_r = size;
+ *r_size = size;
return mem;
}
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 43f6d4c29ae..093b82e9126 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -508,29 +508,29 @@ void cpack_to_rgb(unsigned int col, float *r, float *g, float *b)
*b = ((float)(((col) >> 16) & 0xFF)) * (1.0f / 255.0f);
}
-void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3])
+void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
{
- col_r[0] = ((float)col_ub[0]) * (1.0f / 255.0f);
- col_r[1] = ((float)col_ub[1]) * (1.0f / 255.0f);
- col_r[2] = ((float)col_ub[2]) * (1.0f / 255.0f);
+ r_col[0] = ((float)col_ub[0]) * (1.0f / 255.0f);
+ r_col[1] = ((float)col_ub[1]) * (1.0f / 255.0f);
+ r_col[2] = ((float)col_ub[2]) * (1.0f / 255.0f);
}
-void rgba_uchar_to_float(float col_r[4], const unsigned char col_ub[4])
+void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
{
- col_r[0] = ((float)col_ub[0]) * (1.0f / 255.0f);
- col_r[1] = ((float)col_ub[1]) * (1.0f / 255.0f);
- col_r[2] = ((float)col_ub[2]) * (1.0f / 255.0f);
- col_r[3] = ((float)col_ub[3]) * (1.0f / 255.0f);
+ r_col[0] = ((float)col_ub[0]) * (1.0f / 255.0f);
+ r_col[1] = ((float)col_ub[1]) * (1.0f / 255.0f);
+ r_col[2] = ((float)col_ub[2]) * (1.0f / 255.0f);
+ r_col[3] = ((float)col_ub[3]) * (1.0f / 255.0f);
}
-void rgb_float_to_uchar(unsigned char col_r[3], const float col_f[3])
+void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
{
- F3TOCHAR3(col_f, col_r);
+ F3TOCHAR3(col_f, r_col);
}
-void rgba_float_to_uchar(unsigned char col_r[4], const float col_f[4])
+void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
{
- F4TOCHAR4(col_f, col_r);
+ F4TOCHAR4(col_f, r_col);
}
/* ********************************* color transforms ********************************* */
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 3b49ad5db8d..2a19584cdb3 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -295,49 +295,49 @@ float dist_to_line_segment_v2(const float p[2], const float l1[2], const float l
}
/* point closest to v1 on line v2-v3 in 2D */
-void closest_to_line_segment_v2(float close_r[2], const float p[2], const float l1[2], const float l2[2])
+void closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
{
float lambda, cp[2];
lambda = closest_to_line_v2(cp, p, l1, l2);
if (lambda <= 0.0f)
- copy_v2_v2(close_r, l1);
+ copy_v2_v2(r_close, l1);
else if (lambda >= 1.0f)
- copy_v2_v2(close_r, l2);
+ copy_v2_v2(r_close, l2);
else
- copy_v2_v2(close_r, cp);
+ copy_v2_v2(r_close, cp);
}
/* point closest to v1 on line v2-v3 in 3D */
-void closest_to_line_segment_v3(float close_r[3], const float v1[3], const float v2[3], const float v3[3])
+void closest_to_line_segment_v3(float r_close[3], const float v1[3], const float v2[3], const float v3[3])
{
float lambda, cp[3];
lambda = closest_to_line_v3(cp, v1, v2, v3);
if (lambda <= 0.0f)
- copy_v3_v3(close_r, v2);
+ copy_v3_v3(r_close, v2);
else if (lambda >= 1.0f)
- copy_v3_v3(close_r, v3);
+ copy_v3_v3(r_close, v3);
else
- copy_v3_v3(close_r, cp);
+ copy_v3_v3(r_close, cp);
}
/**
* Find the closest point on a plane.
*
- * \param close_r Return coordinate
+ * \param r_close Return coordinate
* \param plane The plane to test against.
* \param pt The point to find the nearest of
*
* \note non-unit-length planes are supported.
*/
-void closest_to_plane_v3(float close_r[3], const float plane[4], const float pt[3])
+void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3])
{
const float len_sq = len_squared_v3(plane);
const float side = plane_point_side_v3(plane, pt);
- madd_v3_v3v3fl(close_r, pt, plane, -side / len_sq);
+ madd_v3_v3v3fl(r_close, pt, plane, -side / len_sq);
}
float dist_squared_to_plane_v3(const float pt[3], const float plane[4])
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index e7beaaa33a0..e97f0d8bdaf 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -195,7 +195,7 @@ static const size_t utf8_skip_data[256] = {
char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy)
{
- char *dst_r = dst;
+ char *r_dst = dst;
BLI_assert(maxncpy != 0);
@@ -206,7 +206,7 @@ char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t
/* note: currently we don't attempt to deal with invalid utf8 chars */
BLI_STR_UTF8_CPY(dst, src, maxncpy);
- return dst_r;
+ return r_dst;
}
char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy)