Tweak (penv) formatting.
Remove unused include from hash.c
This commit is contained in:
parent
61b9f79c36
commit
5ca9fdb042
|
@ -234,11 +234,7 @@ void printEnv(struct Environment* env, int printPointers)
|
||||||
if (env->table.elements[i].symbol == NULL) {
|
if (env->table.elements[i].symbol == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (printPointers) {
|
printf("%s: ", env->table.elements[i].symbol);
|
||||||
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("[0m");
|
printf("[0m");
|
||||||
if (env->table.elements[i].object.type == TYPE_STRING) {
|
if (env->table.elements[i].object.type == TYPE_STRING) {
|
||||||
printf("\"");
|
printf("\"");
|
||||||
|
@ -254,6 +250,9 @@ void printEnv(struct Environment* env, int printPointers)
|
||||||
}
|
}
|
||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
|
if (printPointers) {
|
||||||
|
printf(" @ %p", env->table.elements[i].symbol);
|
||||||
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
|
|
||||||
#include <search.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static unsigned long hash(const char *str)
|
static unsigned long hash(const char *str)
|
||||||
|
|
Loading…
Reference in New Issue