[Mesa-dev] [PATCH] tnl: replace __FUNCTION__ with __func__

2015-04-03 Thread Marius Predut
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.

Signed-off-by: Marius Predut marius.pre...@intel.com
---
 src/mesa/tnl_dd/t_dd_dmatmp.h   |   34 +-
 src/mesa/tnl_dd/t_dd_dmatmp2.h  |   22 +++---
 src/mesa/tnl_dd/t_dd_triemit.h  |8 
 src/mesa/tnl_dd/t_dd_tritmp.h   |2 +-
 src/mesa/tnl_dd/t_dd_unfilled.h |2 +-
 5 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 52ea2bf..667e2a6 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 

Re: [Mesa-dev] [PATCH] tnl: replace __FUNCTION__ with __func__

2015-04-03 Thread Emil Velikov
Hi Marius,

On 03/04/15 13:11, Marius Predut wrote:
 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.
 
Small note - for compilers that lack __func__ (inline and others) we
provide reasonable workaround via include/c99_compat.h.

Thanks for going through these :-)
Emil

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev