projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1c4cf61
)
dbg_PrintHash(): #ifdef DEBUG everything related to pure verbose debugging.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 26 May 2012 13:32:11 +0000
(15:32 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 26 May 2012 13:32:11 +0000
(15:32 +0200)
libcitadel/lib/hash.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/hash.c
b/libcitadel/lib/hash.c
index d4c2f5080f408b516c47ab98d800f5618beff19c..e49adb80ab55b8fb500aaf6016a52251717f3a2c 100644
(file)
--- a/
libcitadel/lib/hash.c
+++ b/
libcitadel/lib/hash.c
@@
-173,9
+173,11
@@
int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry
*/
int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Second)
{
*/
int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Second)
{
+#ifdef DEBUG
const char *foo;
const char *bar;
const char *bla = "";
const char *foo;
const char *bar;
const char *bla = "";
+#endif
long key;
long i;
long key;
long i;
@@
-193,8
+195,11
@@
int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Secon
if (Hash->LookupTable[i] == NULL)
{
if (Hash->LookupTable[i] == NULL)
{
+#ifdef DEBUG
foo = "";
bar = "";
foo = "";
bar = "";
+#endif
+
key = 0;
}
else
key = 0;
}
else
@@
-202,13
+207,26
@@
int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Secon
key = Hash->LookupTable[i]->Key;
foo = Hash->LookupTable[i]->HashKey;
if (First != NULL)
key = Hash->LookupTable[i]->Key;
foo = Hash->LookupTable[i]->HashKey;
if (First != NULL)
- bar = First(Hash->Members[Hash->LookupTable[i]->Position]->Data);
+#ifdef DEBUG
+ bar =
+#endif
+ First(Hash->Members[Hash->LookupTable[i]->Position]->Data);
+#ifdef DEBUG
else
bar = "";
else
bar = "";
+#endif
+
if (Second != NULL)
if (Second != NULL)
- bla = Second(Hash->Members[Hash->LookupTable[i]->Position]->Data);
+#ifdef DEBUG
+ bla =
+#endif
+ Second(Hash->Members[Hash->LookupTable[i]->Position]->Data);
+#ifdef DEBUG
+
else
bla = "";
else
bla = "";
+#endif
+
}
#ifdef DEBUG
printf (" ---- Hashkey[%ld][%ld]: '%s' Value: '%s' ; %s\n", i, key, foo, bar, bla);
}
#ifdef DEBUG
printf (" ---- Hashkey[%ld][%ld]: '%s' Value: '%s' ; %s\n", i, key, foo, bar, bla);