diff options
author | dcs <dcs@FreeBSD.org> | 2002-04-09 20:59:34 +0000 |
---|---|---|
committer | dcs <dcs@FreeBSD.org> | 2002-04-09 20:59:34 +0000 |
commit | 2ead48154d28aaa1621616f1cc1dcf0143030b95 (patch) | |
tree | da343699f18e28e894f88b81c8dd1c0c65085b18 /sys/boot/common/interp_forth.c | |
parent | 9e5410aeea25ede5e128f0d2f6eeab8baf74ab51 (diff) | |
download | FreeBSD-src-2ead48154d28aaa1621616f1cc1dcf0143030b95.zip FreeBSD-src-2ead48154d28aaa1621616f1cc1dcf0143030b95.tar.gz |
Upgrade FICL to 3.02. Forgot this one, sorry.
PR: 36308
Submitted by: dcs
Diffstat (limited to 'sys/boot/common/interp_forth.c')
-rw-r--r-- | sys/boot/common/interp_forth.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c index 41530b0..45cff4e 100644 --- a/sys/boot/common/interp_forth.c +++ b/sys/boot/common/interp_forth.c @@ -53,6 +53,7 @@ extern char bootprog_rev[]; * BootForth Interface to Ficl Forth interpreter. */ +FICL_SYSTEM *bf_sys; FICL_VM *bf_vm; FICL_WORD *pInterp; @@ -232,8 +233,8 @@ bf_init(void) char create_buf[41]; /* 31 characters-long builtins */ int fd; - ficlInitSystem(10000); /* Default dictionary ~4000 cells */ - bf_vm = ficlNewVM(); + bf_sys = ficlInitSystem(10000); /* Default dictionary ~4000 cells */ + bf_vm = ficlNewVM(bf_sys); /* Put all private definitions in a "builtins" vocabulary */ ficlExec(bf_vm, "vocabulary builtins also builtins definitions"); @@ -243,7 +244,7 @@ bf_init(void) /* make all commands appear as Forth words */ SET_FOREACH(cmdp, Xcommand_set) { - ficlBuild((*cmdp)->c_name, bf_command, FW_DEFAULT); + ficlBuild(bf_sys, (char *)(*cmdp)->c_name, bf_command, FW_DEFAULT); ficlExec(bf_vm, "forth definitions builtins"); sprintf(create_buf, "builtin: %s", (*cmdp)->c_name); ficlExec(bf_vm, create_buf); @@ -252,8 +253,8 @@ bf_init(void) ficlExec(bf_vm, "only forth definitions"); /* Export some version numbers so that code can detect the loader/host version */ - ficlSetEnv("FreeBSD_version", __FreeBSD_version); - ficlSetEnv("loader_version", + ficlSetEnv(bf_sys, "FreeBSD_version", __FreeBSD_version); + ficlSetEnv(bf_sys, "loader_version", (bootprog_rev[0] - '0') * 10 + (bootprog_rev[2] - '0')); /* try to load and run init file if present */ @@ -263,7 +264,7 @@ bf_init(void) } /* Do this last, so /boot/boot.4th can change it */ - pInterp = ficlLookup("interpret"); + pInterp = ficlLookup(bf_sys, "interpret"); } /* |