aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/find-name.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/find-name.frt')
-rw-r--r--amforth-6.5/common/lib/find-name.frt10
1 files changed, 10 insertions, 0 deletions
diff --git a/amforth-6.5/common/lib/find-name.frt b/amforth-6.5/common/lib/find-name.frt
new file mode 100644
index 0000000..df40185
--- /dev/null
+++ b/amforth-6.5/common/lib/find-name.frt
@@ -0,0 +1,10 @@
+
+\ #require search-name.frt
+
+: (find-name) ( addr len wid -- addr len 0 | nt -1 )
+ >r 2dup r> search-name dup if nip nip then ;
+
+: find-name ( addr len -- nt|0 )
+ ['] (find-name) cfg-order map-stack
+ dup 0= if nip nip then
+;