summary refs log tree commit diff
path: root/dynamic.e
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic.e')
-rw-r--r--dynamic.e13
1 files changed, 13 insertions, 0 deletions
diff --git a/dynamic.e b/dynamic.e
index a260abe..55db683 100644
--- a/dynamic.e
+++ b/dynamic.e
@@ -50,6 +50,12 @@
 : oldest-entry
   latest @ { dup @ } { @ } while ;
 
+~ (dictionary handle -- entry pointer or 0)
+: oldest-entry-in
+  dup
+  dup { { dup @ } { @ } while } if
+  dup 3roll = { drop 0 } if ;
+
 ~ (entry pointer -- entry pointer or 0)
 : next-newer-entry
   latest @
@@ -57,6 +63,13 @@
   { dup { 2dup @ != } if }
   { @ } while swap drop ;
 
+~ (entry pointer, dictionary handle -- entry pointer or 0)
+: next-newer-entry-in
+  @
+  2dup = { 2drop 0 exit } if
+  { dup { 2dup @ != } if }
+  { @ } while swap drop ;
+
 ~ (entry pointer -- pointer)
 : guess-entry-end
   dup entry-flags@ 64 & 64 = { exit } if