| : sourceline# ( -- n ) 1 ; |
: sourceline# ( -- n ) 1 ; |
| [THEN] |
[THEN] |
| |
|
| |
Variable #fill-bytes |
| |
\G number of bytes read via (read-line) by the last refill |
| |
|
| : refill ( -- flag ) \ core-ext,block-ext,file-ext |
: refill ( -- flag ) \ core-ext,block-ext,file-ext |
| \G Attempt to fill the input buffer from the input source. When |
\G Attempt to fill the input buffer from the input source. When |
| \G the input source is the user input device, attempt to receive |
\G the input source is the user input device, attempt to receive |
| tib /line |
tib /line |
| [ has? file [IF] ] |
[ has? file [IF] ] |
| loadfile @ ?dup |
loadfile @ ?dup |
| IF read-line throw |
IF (read-line) #fill-bytes ! throw |
| ELSE |
ELSE |
| [ [THEN] ] |
[ [THEN] ] |
| sourceline# 0< IF 2drop false EXIT THEN |
sourceline# 0< IF 2drop false EXIT THEN |