summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <peter@pmikkelsen.com>2021-07-22 21:54:46 +0000
committerPeter Mikkelsen <peter@pmikkelsen.com>2021-07-22 21:54:46 +0000
commit48da622d4ad0b4acfe9005dd318ac3f20b4e8672 (patch)
tree9eed593702dc2fbd7f93689f53605241560f51e9 /main.c
parent0f347162b74d945f509955b6c57e506ab800db7b (diff)
Big commit changing the way the system is loaded at startup.
1) The loader and system modules are loaded by the C directly into the user module 2) The system module is then loaded with the loader from the user module 3) The loader module is then loaded with the loader from the user module 4) The repl is then loaded with the loader from the loader module 5) The user module is cleared
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/main.c b/main.c
index 826ff45..cdaf137 100644
--- a/main.c
+++ b/main.c
@@ -11,7 +11,6 @@ void repl(int, char **);
void
main(int argc, char *argv[])
{
- clausenr = 2; /* Start at two since 0 is for the facts in the database, and 1 is for queries */
initflags();
initstreams();
initmodules();
@@ -37,10 +36,6 @@ repl(int argc, char *argv[])
argc--;
}
args = mklist(args);
- Term *mod = mkatom(L"loader");
- Term *pred = mkcompound(L"start", 1, args);
-
- mod->next = pred;
- Term *goal = mkcompound(L":", 2, mod);
- evalquery(goal);
+ Term *start = mkcompound(L"start", 1, args);
+ evalquery(start);
} \ No newline at end of file