diff options
| author | Paul Richards <paul@FreeBSD.org> | 1995-05-12 17:31:45 +0000 |
|---|---|---|
| committer | Paul Richards <paul@FreeBSD.org> | 1995-05-12 17:31:45 +0000 |
| commit | e5e0d60df8761d6e40d033fd0f49eea72689c6dc (patch) | |
| tree | 1148e4362516e4ba77c0b6d2633b9be635caca62 /lib/libforms/debug.c | |
| parent | 89e255f52c667a49e05cd8f4b135bb3f6c9b2df1 (diff) | |
Notes
Diffstat (limited to 'lib/libforms/debug.c')
| -rw-r--r-- | lib/libforms/debug.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/libforms/debug.c b/lib/libforms/debug.c new file mode 100644 index 000000000000..31d42e286bd8 --- /dev/null +++ b/lib/libforms/debug.c @@ -0,0 +1,21 @@ +#ifdef DEBUG +#include <forms.h> + +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 |
