Tweak (penv) formatting.

Remove unused include from hash.c
This commit is contained in:
Sage Vaillancourt 2022-04-05 16:53:21 -04:00 committed by Sage Vaillancourt
parent 61b9f79c36
commit 5ca9fdb042
2 changed files with 4 additions and 6 deletions

View File

@ -234,11 +234,7 @@ void printEnv(struct Environment* env, int printPointers)
if (env->table.elements[i].symbol == NULL) {
continue;
}
if (printPointers) {
printf("[%d]: `%s` %p :: ", i, env->table.elements[i].symbol, env->table.elements[i].symbol);
} else {
printf("[%d]: `%s` :: ", i, env->table.elements[i].symbol);
}
printf("%s: ", env->table.elements[i].symbol);
printf("");
if (env->table.elements[i].object.type == TYPE_STRING) {
printf("\"");
@ -254,6 +250,9 @@ void printEnv(struct Environment* env, int printPointers)
}
free(s);
}
if (printPointers) {
printf(" @ %p", env->table.elements[i].symbol);
}
printf("\n");
}
}

View File

@ -1,7 +1,6 @@
#include "hash.h"
#include "env.h"
#include <search.h>
#include <string.h>
static unsigned long hash(const char *str)