summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/main.c b/main.c
index d67d742..adcc662 100644
--- a/main.c
+++ b/main.c
@@ -7,6 +7,8 @@
#include "apl9.h"
Biobuf *stdin;
+static int booted = 0;
+static Rune *startfile = L"runtime/start.apl";
void
threadmain(int argc, char *argv[])
@@ -46,16 +48,22 @@ restart:
goto restart;
}
+ if(!booted){
+ booted = 1;
+ Array *path = mkrunearray(startfile);
+ runfile(path);
+ freearray(path);
+ }
+
while(!off){
checkmem("main loop");
- if(needsnewline){
+ /* if(needsnewline){
print("\n");
needsnewline = 0;
- }
- print("\t");
+ } */
Datum *result = evalline(nil, stdin, 1);
if(result && !result->shy)
- print("%S\n", ppdatum(result));
+ setquotequad(result);
freedatum(result);
/*
print("Unfreed arrays: %d\n", arrayalloccounts);