aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main.c b/main.c
index 68e093e..fe3bb2a 100644
--- a/main.c
+++ b/main.c
@@ -1,16 +1,18 @@
#include "builtins.h"
#include "parser.h"
+#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
extern ht_t *WORD_TABLE;
extern array_t *STACK;
extern char *INBUF;
extern parser_t *PARSER;
extern array_t *EVAL_STACK;
-extern ht_t *OBJ_FREE_TABLE;
+extern ht_t *OBJ_TABLE;
extern ht_t *FLIT;
void usage() {
@@ -20,7 +22,7 @@ void usage() {
void version() {
printf("Author: Preston Pan, MIT License 2023\n");
- printf("stem, version 1.1\n");
+ printf("stem, version 1.2 alpha\n");
exit(0);
}
@@ -55,7 +57,7 @@ int main(int argc, char **argv) {
WORD_TABLE = init_ht(500);
EVAL_STACK = init_array(10);
FLIT = init_ht(500);
- OBJ_FREE_TABLE = init_ht(500);
+ OBJ_TABLE = init_ht(500);
add_funcs();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
free(INBUF);
ht_free(WORD_TABLE, value_free);
ht_free(FLIT, func_free);
- ht_free(OBJ_FREE_TABLE, func_free);
+ ht_free(OBJ_TABLE, custom_free);
array_free(STACK);
free(PARSER);
array_free(EVAL_STACK);