summaryrefslogtreecommitdiff
path: root/softcore/fileaccess.fr
diff options
context:
space:
mode:
Diffstat (limited to 'softcore/fileaccess.fr')
-rw-r--r--softcore/fileaccess.fr22
1 files changed, 22 insertions, 0 deletions
diff --git a/softcore/fileaccess.fr b/softcore/fileaccess.fr
new file mode 100644
index 000000000000..2673fefc0767
--- /dev/null
+++ b/softcore/fileaccess.fr
@@ -0,0 +1,22 @@
+S" FICL_WANT_FILE" ENVIRONMENT? drop [if]
+\ **
+\ ** File Access words for ficl
+\ ** submitted by Larry Hastings, larry@hastings.org
+\ **
+
+: r/o 1 ;
+: r/w 3 ;
+: w/o 2 ;
+: bin 8 or ;
+
+: included
+ r/o bin open-file 0= if
+ include-file
+ else
+ drop
+ endif
+ ;
+
+: include parse-word included ;
+
+[endif]