浏览代码

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 <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Marius Predut <marius.predut@intel.com>
tags/10.6-branchpoint
Marius Predut 10 年前
父节点
当前提交
f0e693efb3

+ 1
- 1
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),

+ 4
- 4
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;

+ 1
- 1
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

+ 17
- 17
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;
}
}

+ 11
- 11
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;

+ 4
- 4
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]));
}

+ 1
- 1
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);

+ 1
- 1
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]); */


正在加载...
取消
保存