summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-12-11 00:49:34 +0000
committerjhb <jhb@FreeBSD.org>2001-12-11 00:49:34 +0000
commit8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc (patch)
tree3d16cb8ac2303ccc50640d839778a81b153c89ec /share
parent991ffbae5691ddb93149381b3c23fcf0763b63bd (diff)
downloadFreeBSD-src-8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc.zip
FreeBSD-src-8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc.tar.gz
- Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter. Note that this will break existing 4th scripts that use fopen. Thus, the loader version has been bumped and loader.4th has been changed to check for a sufficient version on i386 and alpha. Be sure that you either do a full world build or install or full build and install of sys/boot after this since loader.old won't work with the new 4th files and vice versa. PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
Diffstat (limited to 'share')
-rw-r--r--share/examples/bootforth/boot.4th6
-rw-r--r--share/examples/bootforth/loader.rc6
2 files changed, 6 insertions, 6 deletions
diff --git a/share/examples/bootforth/boot.4th b/share/examples/bootforth/boot.4th
index 631775b..8f26e0d 100644
--- a/share/examples/bootforth/boot.4th
+++ b/share/examples/bootforth/boot.4th
@@ -7,15 +7,15 @@
cr .( Loading Forth extensions:)
cr .( - screen.4th...)
-s" /boot/screen.4th" fopen dup fload fclose
+s" /boot/screen.4th" O_RDONLY fopen dup fload fclose
\ Load frame support
cr .( - frames.4th...)
-s" /boot/frames.4th" fopen dup fload fclose
+s" /boot/frames.4th" O_RDONLY fopen dup fload fclose
\ Load our little menu
cr .( - menu.4th...)
-s" /boot/menu.4th" fopen dup fload fclose
+s" /boot/menu.4th" O_RDONLY fopen dup fload fclose
\ Show it
cr
diff --git a/share/examples/bootforth/loader.rc b/share/examples/bootforth/loader.rc
index d216a46..617bc3d 100644
--- a/share/examples/bootforth/loader.rc
+++ b/share/examples/bootforth/loader.rc
@@ -13,15 +13,15 @@ include /boot/loader.4th
\ Load the screen manipulation words
cr .( - screen.4th...)
-s" /boot/screen.4th" fopen dup fload fclose
+s" /boot/screen.4th" O_RDONLY fopen dup fload fclose
\ Load frame support
cr .( - frames.4th...)
-s" /boot/frames.4th" fopen dup fload fclose
+s" /boot/frames.4th" O_RDONLY fopen dup fload fclose
\ Load our little menu
cr .( - menuconf.4th...)
-s" /boot/menuconf.4th" fopen dup fload fclose
+s" /boot/menuconf.4th" O_RDONLY fopen dup fload fclose
\ Initialize loader.4th stuff
OpenPOWER on IntegriCloud