From 91e98cd153da9e17fa1abda2acf9c4bd5ee0976a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 4 Dec 2002 14:24:44 +0000 Subject: fix bad _mesa_printf() calls (mesa bug 646753) --- src/mesa/math/m_debug_norm.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/mesa/math/m_debug_norm.c') diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c index 73e69d77a75..9e3f16f13c0 100644 --- a/src/mesa/math/m_debug_norm.c +++ b/src/mesa/math/m_debug_norm.c @@ -1,4 +1,4 @@ -/* $Id: m_debug_norm.c,v 1.11 2002/10/29 20:28:59 brianp Exp $ */ +/* $Id: m_debug_norm.c,v 1.12 2002/12/04 14:24:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -291,15 +291,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) for ( i = 0 ; i < TEST_COUNT ; i++ ) { for ( j = 0 ; j < 3 ; j++ ) { if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf(NULL, "-----------------------------\n" ); - _mesa_printf(NULL, "(i = %i, j = %i)\n", i, j ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "-----------------------------\n" ); + _mesa_printf( "(i = %i, j = %i)\n", i, j ); + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][0], r[i][0], r[i][0]/d[i][0], MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][1], r[i][1], r[i][1]/d[i][1], MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][2], r[i][2], r[i][2]/d[i][2], MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); return 0; @@ -307,15 +307,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) if ( norm_normalize_types[mtype] != 0 ) { if ( significand_match( d2[i][j], r2[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf(NULL, "------------------- precalculated length case ------\n" ); - _mesa_printf(NULL, "(i = %i, j = %i)\n", i, j ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "------------------- precalculated length case ------\n" ); + _mesa_printf( "(i = %i, j = %i)\n", i, j ); + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][0], r2[i][0], r2[i][0]/d2[i][0], MAX_PRECISION - significand_match( d2[i][0], r2[i][0] ) ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][1], r2[i][1], r2[i][1]/d2[i][1], MAX_PRECISION - significand_match( d2[i][1], r2[i][1] ) ); - _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n", + _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][2], r2[i][2], r2[i][2]/d2[i][2], MAX_PRECISION - significand_match( d2[i][2], r2[i][2] ) ); return 0; @@ -343,11 +343,11 @@ void _math_test_all_normal_transform_functions( char *description ) if ( mesa_profile ) { if ( !counter_overhead ) { INIT_COUNTER(); - _mesa_printf(NULL, "counter overhead: %ld cycles\n\n", counter_overhead ); + _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead ); } - _mesa_printf(NULL, "normal transform results after hooking in %s functions:\n", + _mesa_printf( "normal transform results after hooking in %s functions:\n", description ); - _mesa_printf(NULL, "\n-------------------------------------------------------\n" ); + _mesa_printf( "\n-------------------------------------------------------\n" ); } #endif @@ -357,21 +357,21 @@ void _math_test_all_normal_transform_functions( char *description ) if ( test_norm_function( func, mtype, cycles ) == 0 ) { char buf[100]; - _mesa_sprintf(NULL, buf, "_mesa_normal_tab[0][%s] failed test (%s)", + _mesa_sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)", norm_strings[mtype], description ); _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf(NULL, " %li\t", benchmark_tab[mtype] ); - _mesa_printf(NULL, " | [%s]\n", norm_strings[mtype] ); + _mesa_printf( " %li\t", benchmark_tab[mtype] ); + _mesa_printf( " | [%s]\n", norm_strings[mtype] ); } #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf(NULL, "\n" ); + _mesa_printf( "\n" ); fflush( stdout ); } #endif -- cgit v1.2.3