--- gforth/Attic/kernel.fs 1997/03/21 12:21:13 1.20 +++ gforth/Attic/kernel.fs 1997/04/10 21:32:08 1.24 @@ -69,7 +69,7 @@ NIL AConstant NIL \ gforth \ Aliases ' i Alias r@ ( -- w ; R: w -- w ) \ core r-fetch -\ copy w from the return stack to the data stack +\G copy w from the return stack to the data stack \ Bit string manipulation 06oct92py @@ -1265,7 +1265,10 @@ DEFER DOERROR ; : (DoError) ( throw-code -- ) - [ has-os [IF] ] stderr to outfile-id [ [THEN] ] + [ has-os [IF] ] + outfile-id dup flush-file drop >r + stderr to outfile-id + [ [THEN] ] sourceline# IF source >in @ sourceline# 0 0 .error-frame THEN @@ -1288,7 +1291,7 @@ DEFER DOERROR .error THEN normal-dp dpp ! - [ has-os [IF] ] stdout to outfile-id [ [THEN] ] + [ has-os [IF] ] r> to outfile-id [ [THEN] ] ; ' (DoError) IS DoError @@ -1320,12 +1323,12 @@ Defer 'cold ( -- ) \ gforth tick-cold [ [THEN] ] 'cold [ has-files [IF] ] - argc @ 1 > + ['] process-args catch ?dup IF - ['] process-args catch ?dup - IF - dup >r DoError cr r> negate (bye) - THEN + dup >r DoError cr r> negate (bye) + THEN + argc @ 1 > + IF \ there may be some unfinished line, so let's finish it cr THEN [ [THEN] ]