diff options
| author | Daniel C. Sobral <dcs@FreeBSD.org> | 2000-06-14 19:37:00 +0000 |
|---|---|---|
| committer | Daniel C. Sobral <dcs@FreeBSD.org> | 2000-06-14 19:37:00 +0000 |
| commit | 18ee60a57616434a5c49b4d75f07f57d63d1db60 (patch) | |
| tree | 2cb18e672729b902c3f37a7af0ed82f0340f0679 /sys/boot/common/interp.c | |
| parent | 933aec2f75b7a3cbfcede381696c517e22f455d6 (diff) | |
Notes
Diffstat (limited to 'sys/boot/common/interp.c')
| -rw-r--r-- | sys/boot/common/interp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/boot/common/interp.c b/sys/boot/common/interp.c index e93e35ae52e8..880910bae094 100644 --- a/sys/boot/common/interp.c +++ b/sys/boot/common/interp.c @@ -122,6 +122,7 @@ interact(void) prompt(); ngets(input, sizeof(input)); #ifdef BOOT_FORTH + bf_vm->sourceID.i = 0; bf_run(input); #else if (!parse(&argc, &argv, input)) { @@ -189,7 +190,7 @@ include(char *filename) #ifdef BOOT_FORTH int res; char *cp; - int fd, line; + int prevsrcid, fd, line; #else int argc,res; char **argv, *cp; @@ -252,6 +253,9 @@ include(char *filename) */ #ifndef BOOT_FORTH argv = NULL; +#else + prevsrcid = bf_vm->sourceID.i; + bf_vm->sourceID.i = fd; #endif res = CMD_OK; for (sp = script; sp != NULL; sp = sp->next) { @@ -293,6 +297,8 @@ include(char *filename) #ifndef BOOT_FORTH if (argv != NULL) free(argv); +#else + bf_vm->sourceID.i = prevsrcid; #endif while(script != NULL) { se = script; |
