aboutsummaryrefslogtreecommitdiff
path: root/src/stable/trace.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/trace.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/stable/trace.cpp b/src/stable/trace.cpp
index c072fd9..2b3b863 100644
--- a/src/stable/trace.cpp
+++ b/src/stable/trace.cpp
@@ -9,59 +9,59 @@
9 9
10void Bu::__tracer( const char *pf ) 10void Bu::__tracer( const char *pf )
11{ 11{
12 printf("trace: %s\n", pf ); 12 printf("trace: %s\n", pf );
13} 13}
14 14
15template<> void Bu::__tracer_format<float>( const float &v ) 15template<> void Bu::__tracer_format<float>( const float &v )
16{ 16{
17 printf("%f", v ); 17 printf("%f", v );
18} 18}
19 19
20template<> void Bu::__tracer_format<double>( const double &v ) 20template<> void Bu::__tracer_format<double>( const double &v )
21{ 21{
22 printf("%f", v ); 22 printf("%f", v );
23} 23}
24 24
25template<> void Bu::__tracer_format<void *>( void * const &v ) 25template<> void Bu::__tracer_format<void *>( void * const &v )
26{ 26{
27 printf("0x%08X", (ptrdiff_t)v ); 27 printf("0x%08X", (ptrdiff_t)v );
28} 28}
29 29
30template<> void Bu::__tracer_format<char *>( char * const &v ) 30template<> void Bu::__tracer_format<char *>( char * const &v )
31{ 31{
32 printf("\"%s\"", v ); 32 printf("\"%s\"", v );
33} 33}
34 34
35template<> void Bu::__tracer_format<char **>( char ** const &v ) 35template<> void Bu::__tracer_format<char **>( char ** const &v )
36{ 36{
37 printf("["); 37 printf("[");
38 for( int j = 0; v[j]; j++ ) 38 for( int j = 0; v[j]; j++ )
39 { 39 {
40 if( j > 0 ) 40 if( j > 0 )
41 printf(", "); 41 printf(", ");
42 printf("\"%s\"", v[j] ); 42 printf("\"%s\"", v[j] );
43 } 43 }
44 printf("]"); 44 printf("]");
45} 45}
46 46
47template<> void Bu::__tracer_format<void const *>( void const * const &v ) 47template<> void Bu::__tracer_format<void const *>( void const * const &v )
48{ 48{
49 printf("0x%08X", (ptrdiff_t)v ); 49 printf("0x%08X", (ptrdiff_t)v );
50} 50}
51 51
52template<> void Bu::__tracer_format<char const *>( char const * const &v ) 52template<> void Bu::__tracer_format<char const *>( char const * const &v )
53{ 53{
54 printf("\"%s\"", v ); 54 printf("\"%s\"", v );
55} 55}
56 56
57template<> void Bu::__tracer_format<char const **>( char const ** const &v ) 57template<> void Bu::__tracer_format<char const **>( char const ** const &v )
58{ 58{
59 printf("["); 59 printf("[");
60 for( int j = 0; v[j]; j++ ) 60 for( int j = 0; v[j]; j++ )
61 { 61 {
62 if( j > 0 ) 62 if( j > 0 )
63 printf(", "); 63 printf(", ");
64 printf("\"%s\"", v[j] ); 64 printf("\"%s\"", v[j] );
65 } 65 }
66 printf("]"); 66 printf("]");
67} 67}