From 8e1c58addb92dc01d72290768eaa6763db1bec61 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 12 May 1995 17:31:45 +0000 Subject: Forgot to add these. --- lib/libforms/debug.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/libforms/debug.c (limited to 'lib/libforms/debug.c') diff --git a/lib/libforms/debug.c b/lib/libforms/debug.c new file mode 100644 index 0000000..31d42e2 --- /dev/null +++ b/lib/libforms/debug.c @@ -0,0 +1,21 @@ +#ifdef DEBUG +#include + +int +debug_dump_bindings(char *key, void *data, void *arg) +{ + TUPLE *tuple = (TUPLE *)data; + + printf("%s, %d, %x\n", tuple->name, tuple->type, (int)tuple->addr); + + return (1); +} + +void +debug_dump_table(hash_table *htable) +{ + printf("Dumping table at address %x\n", htable); + hash_traverse(htable, debug_dump_bindings, NULL); + printf("------------------------------\n"); +} +#endif -- cgit v1.1