aboutsummaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map.c b/src/map.c
index 553bbde..799effb 100644
--- a/src/map.c
+++ b/src/map.c
@@ -7,6 +7,7 @@
#include <map.h>
#include <parse.h>
#include <schedule.h>
+#include <log.h>
static struct hashmap *all_terms;
@@ -54,7 +55,7 @@ void map_destroy(struct hashmap *map)
void map_dump(struct hashmap *map, char all)
{
fprintf(stderr, "\n---\nMap dump:\n");
- fprintf(stderr, "type\trefs\thash\t\t\tterm\t\tparents\n");
+ fprintf(stderr, "type\trefs\thash\tterm%*sparents\n", 21, "");
size_t iter = 0;
void *iter_val;
while (hashmap_iter(map, &iter, &iter_val)) {
@@ -63,9 +64,9 @@ void map_dump(struct hashmap *map, char all)
/* continue; */
fprintf(stderr, "%d\t%ld\t%lx\t", term->type, term->refs,
- term->hash);
- term_print(term);
- fprintf(stderr, "\t{");
+ term->hash & HASH_MASK);
+ size_t len = term_print(term);
+ fprintf(stderr, "%*s{", 25 - len, "");
size_t jiter = 0;
void *jiter_val;