Add MAP.FILENAME for HMSL ASSIGNS (#108)
authorPhil Burk <philburk@mobileer.com>
Mon, 21 Feb 2022 19:56:46 +0000 (12:56 -0700)
committerGitHub <noreply@github.com>
Mon, 21 Feb 2022 19:56:46 +0000 (11:56 -0800)
Allow filename remapping in $INCLUDE

fth/system.fth

index 5b199f157d257ba1ec821ffb5a83f3f22ecea283..08f3ef4f8474f17497ea7454bf8888e08564f31e 100644 (file)
@@ -777,7 +777,13 @@ variable TRACE-INCLUDE
         rdrop
 ;
 
-: $INCLUDE ( $filename -- ) count included ;
+defer MAP.FILENAME ( $filename1 -- $filename2 , modify name )
+' noop is map.filename
+
+: $INCLUDE ( $filename -- )
+    map.filename
+    count included
+;
 
 create INCLUDE-SAVE-NAME 128 allot
 : INCLUDE ( <fname> -- )