summaryrefslogtreecommitdiffstats
path: root/lib/libforms/debug.c
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1995-05-12 17:31:45 +0000
committerpaul <paul@FreeBSD.org>1995-05-12 17:31:45 +0000
commit8e1c58addb92dc01d72290768eaa6763db1bec61 (patch)
tree1148e4362516e4ba77c0b6d2633b9be635caca62 /lib/libforms/debug.c
parent65e32573aa7d24409456153f596c431cc62fd970 (diff)
downloadFreeBSD-src-8e1c58addb92dc01d72290768eaa6763db1bec61.zip
FreeBSD-src-8e1c58addb92dc01d72290768eaa6763db1bec61.tar.gz
Forgot to add these.
Diffstat (limited to 'lib/libforms/debug.c')
-rw-r--r--lib/libforms/debug.c21
1 files changed, 21 insertions, 0 deletions
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 <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
OpenPOWER on IntegriCloud