summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Predut <[email protected]>2015-04-03 16:11:57 +0300
committerMatt Turner <[email protected]>2015-04-14 12:23:41 -0700
commitf0e693efb393f1135702c80a64f8733adc922db1 (patch)
tree8c266fb784c46ef00bb09c3617015e5dfaa4aed4
parent3ca17e75e4fe129511a4dcad47e139485beef880 (diff)
tnl: replace __FUNCTION__ with __func__
Consistently just use C99's __func__ everywhere. The patch was verified with Microsoft Visual studio 2013 redistributable package(RTM version number: 18.0.21005.1) Next MSVC versions intends to support __func__. No functional changes. Acked-by: Matt Turner <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Marius Predut <[email protected]>
-rw-r--r--src/mesa/tnl/t_draw.c2
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h8
-rw-r--r--src/mesa/tnl/t_vertex_generic.c2
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h34
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp2.h22
-rw-r--r--src/mesa/tnl_dd/t_dd_triemit.h8
-rw-r--r--src/mesa/tnl_dd/t_dd_tritmp.h2
-rw-r--r--src/mesa/tnl_dd/t_dd_unfilled.h2
8 files changed, 40 insertions, 40 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 60265d60bfc..6adf1dce676 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -448,7 +448,7 @@ void _tnl_draw_prims(struct gl_context *ctx,
if (0)
{
- printf("%s %d..%d\n", __FUNCTION__, min_index, max_index);
+ printf("%s %d..%d\n", __func__, min_index, max_index);
for (i = 0; i < nr_prims; i++)
printf("prim %d: %s start %d count %d\n", i,
_mesa_lookup_enum_by_nr(prim[i].mode),
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 57f569bd760..f8786accbbb 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -68,7 +68,7 @@ static void TAG(light_rgba_spec)( struct gl_context *ctx,
const GLuint nr = VB->Count;
#ifdef TRACE
- fprintf(stderr, "%s\n", __FUNCTION__ );
+ fprintf(stderr, "%s\n", __func__ );
#endif
VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
@@ -249,7 +249,7 @@ static void TAG(light_rgba)( struct gl_context *ctx,
const GLuint nr = VB->Count;
#ifdef TRACE
- fprintf(stderr, "%s\n", __FUNCTION__ );
+ fprintf(stderr, "%s\n", __func__ );
#endif
VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
@@ -429,7 +429,7 @@ static void TAG(light_fast_rgba_single)( struct gl_context *ctx,
#endif
#ifdef TRACE
- fprintf(stderr, "%s\n", __FUNCTION__ );
+ fprintf(stderr, "%s\n", __func__ );
#endif
(void) input; /* doesn't refer to Eye or Obj */
@@ -533,7 +533,7 @@ static void TAG(light_fast_rgba)( struct gl_context *ctx,
const struct gl_light *light;
#ifdef TRACE
- fprintf(stderr, "%s %d\n", __FUNCTION__, nr );
+ fprintf(stderr, "%s %d\n", __func__, nr );
#endif
(void) input;
diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c
index 2858922e2cb..2a25a96928f 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -36,7 +36,7 @@
#if 0
-#define DEBUG_INSERT printf("%s\n", __FUNCTION__)
+#define DEBUG_INSERT printf("%s\n", __func__)
#else
#define DEBUG_INSERT
#endif
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 52ea2bf739c..667e2a6e5d5 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -128,7 +128,7 @@ static void TAG(render_points_verts)( struct gl_context *ctx,
}
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -163,7 +163,7 @@ static void TAG(render_lines_verts)( struct gl_context *ctx,
}
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -195,7 +195,7 @@ static void TAG(render_line_strip_verts)( struct gl_context *ctx,
FLUSH();
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -261,7 +261,7 @@ static void TAG(render_line_loop_verts)( struct gl_context *ctx,
FLUSH();
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -331,7 +331,7 @@ static void TAG(render_tri_strip_verts)( struct gl_context *ctx,
FLUSH();
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -370,7 +370,7 @@ static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
/* Could write code to emit these as indexed vertices (for the
* g400, for instance).
*/
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -409,7 +409,7 @@ static void TAG(render_poly_verts)( struct gl_context *ctx,
else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -500,7 +500,7 @@ static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
/* Vertices won't fit in a single buffer or elts not
* available - should never happen.
*/
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -534,7 +534,7 @@ static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
FLUSH();
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -644,7 +644,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx,
else {
/* Vertices won't fit in a single buffer, should never happen.
*/
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -705,7 +705,7 @@ static void TAG(render_points_elts)( struct gl_context *ctx,
currentsz = dmasz;
}
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -743,7 +743,7 @@ static void TAG(render_lines_elts)( struct gl_context *ctx,
currentsz = dmasz;
}
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -777,7 +777,7 @@ static void TAG(render_line_strip_elts)( struct gl_context *ctx,
} else {
/* TODO: Try to emit as indexed lines.
*/
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -845,7 +845,7 @@ static void TAG(render_line_loop_elts)( struct gl_context *ctx,
FLUSH();
} else {
/* TODO: Try to emit as indexed lines */
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -922,7 +922,7 @@ static void TAG(render_tri_strip_elts)( struct gl_context *ctx,
}
} else {
/* TODO: try to emit as indexed triangles */
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -959,7 +959,7 @@ static void TAG(render_tri_fan_elts)( struct gl_context *ctx,
}
} else {
/* TODO: try to emit as indexed triangles */
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
@@ -998,7 +998,7 @@ static void TAG(render_poly_elts)( struct gl_context *ctx,
} else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
- fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+ fprintf(stderr, "%s - cannot draw primitive\n", __func__);
return;
}
}
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp2.h b/src/mesa/tnl_dd/t_dd_dmatmp2.h
index 7c6f136f2e7..96c5b47e571 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp2.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp2.h
@@ -121,7 +121,7 @@ static void TAG(render_points_verts)( struct gl_context *ctx,
{
if (start < count) {
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
EMIT_PRIM( ctx, GL_POINTS, HW_POINTS, start, count );
}
}
@@ -132,7 +132,7 @@ static void TAG(render_lines_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
count -= (count-start) & 1;
if (start+1 >= count)
@@ -156,7 +156,7 @@ static void TAG(render_line_strip_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (start+1 >= count)
return;
@@ -204,7 +204,7 @@ static void TAG(render_line_loop_verts)( struct gl_context *ctx,
{
LOCAL_VARS;
GLuint j, nr;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (flags & PRIM_BEGIN) {
j = start;
@@ -292,7 +292,7 @@ static void TAG(render_triangles_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
count -= (count-start)%3;
@@ -313,7 +313,7 @@ static void TAG(render_tri_strip_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (start + 2 >= count)
return;
@@ -358,7 +358,7 @@ static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (start+2 >= count)
return;
@@ -401,7 +401,7 @@ static void TAG(render_poly_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (start+2 >= count)
return;
@@ -415,7 +415,7 @@ static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
count -= (count-start) & 1;
@@ -466,7 +466,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx,
GLuint flags )
{
LOCAL_VARS;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
count -= (count-start)%4;
if (start+3 >= count)
@@ -642,7 +642,7 @@ static void TAG(render_line_loop_elts)( struct gl_context *ctx,
GLuint j, nr;
ELT_TYPE *dest;
- if (0) fprintf(stderr, "%s\n", __FUNCTION__);
+ if (0) fprintf(stderr, "%s\n", __func__);
if (flags & PRIM_BEGIN)
j = start;
diff --git a/src/mesa/tnl_dd/t_dd_triemit.h b/src/mesa/tnl_dd/t_dd_triemit.h
index 082e83f407b..093501f1676 100644
--- a/src/mesa/tnl_dd/t_dd_triemit.h
+++ b/src/mesa/tnl_dd/t_dd_triemit.h
@@ -39,7 +39,7 @@ static __inline void TAG(quad)( CTX_ARG,
GLuint j;
if (DO_DEBUG_VERTS) {
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
PRINT_VERTEX(v0);
PRINT_VERTEX(v1);
PRINT_VERTEX(v2);
@@ -63,7 +63,7 @@ static __inline void TAG(quad)( CTX_ARG,
GLuint j;
if (DO_DEBUG_VERTS) {
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
PRINT_VERTEX(v0);
PRINT_VERTEX(v1);
PRINT_VERTEX(v2);
@@ -90,7 +90,7 @@ static __inline void TAG(triangle)( CTX_ARG,
GLuint j;
if (DO_DEBUG_VERTS) {
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
PRINT_VERTEX(v0);
PRINT_VERTEX(v1);
PRINT_VERTEX(v2);
@@ -139,7 +139,7 @@ static void TAG(fast_clipped_poly)( struct gl_context *ctx, const GLuint *elts,
GLuint i,j;
if (DO_DEBUG_VERTS) {
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
PRINT_VERTEX(VERT(elts[0]));
PRINT_VERTEX(VERT(elts[1]));
}
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h
index 6fe2c8294a0..2176f1f1667 100644
--- a/src/mesa/tnl_dd/t_dd_tritmp.h
+++ b/src/mesa/tnl_dd/t_dd_tritmp.h
@@ -121,7 +121,7 @@ static void TAG(triangle)( struct gl_context *ctx, GLuint e0, GLuint e1, GLuint
GLuint facing = 0;
LOCAL_VARS(3);
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* fprintf(stderr, "%s\n", __func__); */
v[0] = (VERTEX *)GET_VERTEX(e0);
v[1] = (VERTEX *)GET_VERTEX(e1);
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h
index 6be0e7fcef5..82190c08916 100644
--- a/src/mesa/tnl_dd/t_dd_unfilled.h
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h
@@ -59,7 +59,7 @@ static void TAG(unfilled_tri)( struct gl_context *ctx,
}
}
-/* fprintf(stderr, "%s %s %d %d %d\n", __FUNCTION__, */
+/* fprintf(stderr, "%s %s %d %d %d\n", __func__, */
/* _mesa_lookup_enum_by_nr( mode ), */
/* ef[e0], ef[e1], ef[e2]); */