ref: ce0ad5efc68f2f70e4c177ea89dd02c6e5ec5b3a
parent: d606029959d901ba4db77fd8754f45f97cdec499
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Mar 9 15:51:55 EST 2023
use local dir vs /sys/lib/flisp depending on whether the exe name is *.out
--- a/flisp.c
+++ b/flisp.c
@@ -2346,6 +2346,11 @@
cvalues_init();
+#ifdef PLAN9
+ char *s;
+ if ((s = strstr(argv0, ".out")) == nil || s[4] != 0)
+ setc(symbol("*install-dir*"), cvalue_static_cstring("/sys/lib/flisp"));
+#else
char buf[1024];
char *exename = get_exename(buf, sizeof(buf));
if (exename != NULL) {
@@ -2352,6 +2357,7 @@
path_to_dirname(exename);
setc(symbol("*install-dir*"), cvalue_static_cstring(strdup(exename)));
}
+#endif
memory_exception_value = fl_list2(MemoryError,
cvalue_static_cstring("out of memory"));