diff options
author | glenda <glenda@cirno> | 2022-09-10 00:24:23 +0000 |
---|---|---|
committer | glenda <glenda@cirno> | 2022-09-10 00:24:23 +0000 |
commit | f5ea447c9c6f1b3ddadc97dcb0057674b4dd0665 (patch) | |
tree | 095c90f1893f371c3b196eeb743c844c1ce6b306 /main.c | |
parent | 0f1552c7a132ed59160a930464e46b2a1a345fa5 (diff) |
First step of a programmable session
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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); |