-/* $Id: m_debug_norm.c,v 1.13 2003/03/01 01:50:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Gareth Hughes
*/
-#include "glheader.h"
-#include "context.h"
-#include "macros.h"
-#include "imports.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/imports.h"
#include "m_matrix.h"
#include "m_xform.h"
#include "m_debug_util.h"
-#ifdef DEBUG /* This code only used for debugging */
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
+#ifdef DEBUG_MATH /* This code only used for debugging */
static int m_norm_identity[16] = {
/* Hmmm, don't know how we could test the precalculated
* length case...
*/
- scale = 1.0 / sqrt( len );
+ scale = 1.0 / SQRTF( len );
SCALE_SCALAR_3V( out[i], scale, t );
} else {
out[i][0] = out[i][1] = out[i][2] = 0;
case VAR:
break;
default:
- abort();
+ exit(1);
}
}
}
ASSIGN_3V( d2[i], 0.0, 0.0, 0.0 );
for ( j = 0 ; j < 3 ; j++ )
s[i][j] = rnd();
- length[i] = 1 / sqrt( LEN_SQUARED_3FV( s[i] ) );
+ length[i] = 1 / SQRTF( LEN_SQUARED_3FV( s[i] ) );
}
source->data = (GLfloat(*)[4]) s;
if ( first_time ) {
first_time = 0;
- mesa_profile = getenv( "MESA_PROFILE" );
+ mesa_profile = _mesa_getenv( "MESA_PROFILE" );
}
#ifdef RUN_DEBUG_BENCHMARK
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
_mesa_printf( "\n" );
- fflush( stdout );
}
#endif
}
-#endif /* DEBUG */
+#endif /* DEBUG_MATH */