a small cleanup in retro-describe

FossilOrigin-Name: 9db02bdfb9a4ba3a08bad22f3e5adb0eb33e95cb3926a631acf98006db7cabd7
This commit is contained in:
crc 2021-06-21 03:15:12 +00:00
parent 37c4486d4f
commit 5ec4cc202a

View file

@ -26,7 +26,7 @@ script:arguments n:zero? [ #0 unix:exit ] if
~~~
~~~
#167 'DATA-START const
#166 'DATA-START const
~~~
# Data File
@ -144,13 +144,12 @@ the description.
'Target var
'LineNumber var
:matched? (-f) field:name @Target s:eq? ;
:entry? (-f)
@LineNumber DATA-START gteq? &LineNumber v:inc ;
:entry? (-f) @LineNumber DATA-START gteq? &LineNumber v:inc ;
:process (-) &Heap [ s:keep !SourceLine matched? [ display-result ] if ] v:preserve ;
---reveal---
:find-and-display-entry
#0 !LineNumber
s:keep !Target
script:name [ &Heap [ s:keep !SourceLine entry? 0; drop matched? [ display-result ] if ] v:preserve ] file:for-each-line nl ;
#0 !LineNumber s:keep !Target
script:name [ entry? [ process ] [ drop ] choose ] file:for-each-line nl ;
}}
~~~