Upgrade FICL to 3.02. Forgot this one, sorry.

PR:		36308
Submitted by:	dcs
This commit is contained in:
dcs 2002-04-09 20:59:34 +00:00
parent 9e5410aeea
commit 2ead48154d

View File

@ -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");
}
/*