\ 4tH library - SCAN-FILE - Copyright 2005 J.L. Bezemer
\ You can redistribute this file and/or modify it under
\ the terms of the GNU General Public License
\ Skips everything until the read string from the input
\ source defined by SOURCE starts with the string defined
\ by count pair a/n
\ Load definitions when needed
[UNDEFINED] COMPARE [IF]
[NEEDS lib/compare.4th]
[THEN]
[UNDEFINED] line-found? [IF]
defer line-found?
: scan-file ( -- f)
begin
refill dup
if >r line-found? r> over if drop else swap then
else exit then 0=
until
;
( a n -- a n f)
:noname 2dup source drop over compare ; is line-found?
[THEN]
|