summaryrefslogtreecommitdiff
path: root/src/sharedcore.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-08-22 04:00:54 +0000
committerMike Buland <eichlan@xagasoft.com>2009-08-22 04:00:54 +0000
commit6d4a2e8f5153eefcada061d346aa5d852f2500ee (patch)
treea65dbe1ef11d3fae1b3d049c4df3d2dcec4face2 /src/sharedcore.cpp
parent78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc (diff)
downloadlibbu++-6d4a2e8f5153eefcada061d346aa5d852f2500ee.tar.gz
libbu++-6d4a2e8f5153eefcada061d346aa5d852f2500ee.tar.bz2
libbu++-6d4a2e8f5153eefcada061d346aa5d852f2500ee.tar.xz
libbu++-6d4a2e8f5153eefcada061d346aa5d852f2500ee.zip
Pretty much just removed the debugging from SharedCore, it wasn't at fault, and
it passed many more valgrind tests.
Diffstat (limited to 'src/sharedcore.cpp')
-rw-r--r--src/sharedcore.cpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/sharedcore.cpp b/src/sharedcore.cpp
index 24d8972..6333335 100644
--- a/src/sharedcore.cpp
+++ b/src/sharedcore.cpp
@@ -7,70 +7,3 @@
7 7
8#include "bu/sharedcore.h" 8#include "bu/sharedcore.h"
9 9
10void hardlog(const char *fmt, ...)
11{
12 va_list ap;
13 va_start( ap, fmt );
14
15 FILE *fh = fopen("sharedcore.log", "ab");
16 vfprintf( fh, fmt, ap );
17 va_end( ap );
18 fclose( fh );
19}
20
21int iDepth = 0;
22
23void fncin( void *base, const char *fn, void *core, int *iRefCount, int params, ... )
24{
25 va_list ap;
26 va_start( ap, params );
27
28 FILE *fh = fopen("sharedcore.log", "ab");
29 fprintf( fh, "%08X: ", base );
30 for( int j = 0; j < iDepth; j++ )
31 fprintf( fh, " " );
32 fprintf( fh, "%s(", fn );
33 for( int j = 0; j < params; j++ )
34 if( j == 0 )
35 fprintf( fh, " %08X", va_arg( ap, void * ) );
36 else
37 fprintf( fh, ", %08X", va_arg( ap, void * ) );
38 if( params > 0 )
39 fprintf( fh, " )");
40 else
41 fprintf( fh, ")");
42
43 fprintf( fh, " [%08X / %08X] (%d)\n", core, iRefCount, rc );
44 va_end( ap );
45 fclose( fh );
46
47 iDepth++;
48}
49
50void fncout( void *base, const char *fn, void *core, int *iRefCount, int params, ... )
51{
52 va_list ap;
53 va_start( ap, params );
54
55 iDepth--;
56
57 FILE *fh = fopen("sharedcore.log", "ab");
58 fprintf( fh, "%08X: ", base );
59 for( int j = 0; j < iDepth; j++ )
60 fprintf( fh, " " );
61 fprintf( fh, "%s(", fn );
62 for( int j = 0; j < params; j++ )
63 if( j == 0 )
64 fprintf( fh, " %08X", va_arg( ap, void * ) );
65 else
66 fprintf( fh, ", %08X", va_arg( ap, void * ) );
67 if( params > 0 )
68 fprintf( fh, " )");
69 else
70 fprintf( fh, ")");
71
72 fprintf( fh, " [%08X / %08X] (%d)\n", core, iRefCount, rc );
73 va_end( ap );
74 fclose( fh );
75}
76