[gforth] / gforth / kernel / io.fs  

gforth: gforth/kernel/io.fs

Diff for /gforth/kernel/io.fs between version 1.30 and 1.31

version 1.30, Mon Dec 31 18:40:26 2007 UTC version 1.31, Fri Jul 27 23:28:10 2012 UTC
Line 22 
Line 22 
 \ Output                                               13feb93py  \ Output                                               13feb93py
   
 has? os [IF]  has? os [IF]
 0 Value outfile-id ( -- file-id ) \ gforth  
 0 Value infile-id ( -- file-id ) \ gforth  0 Value infile-id ( -- file-id ) \ gforth
   0 Value outfile-id ( -- file-id ) \ gforth
   0 Value errfile-id ( -- file-id ) \ gforth
   
 : (type) ( c-addr u -- ) \ gforth  : (type) ( c-addr u -- ) \ gforth
     outfile-id write-file drop \ !! use ?DUP-IF THROW ENDIF instead of DROP ?      outfile-id write-file drop \ !! use ?DUP-IF THROW ENDIF instead of DROP ?
Line 100 
Line 101 
 0A constant #lf ( -- c ) \ gforth  0A constant #lf ( -- c ) \ gforth
   
 : bell  #bell emit [ has? os [IF] ] outfile-id flush-file drop [ [THEN] ] ;  : bell  #bell emit [ has? os [IF] ] outfile-id flush-file drop [ [THEN] ] ;
 : cr ( -- ) \ core c-r  Defer cr ( -- ) \ core c-r
     \G Output a newline (of the favourite kind of the host OS).  Note      \G Output a newline (of the favourite kind of the host OS).  Note
     \G that due to the way the Forth command line interpreter inserts      \G that due to the way the Forth command line interpreter inserts
     \G newlines, the preferred way to use @code{cr} is at the start      \G newlines, the preferred way to use @code{cr} is at the start
     \G of a piece of text; e.g., @code{cr ." hello, world"}.      \G of a piece of text; e.g., @code{cr ." hello, world"}.
   : (cr) ( -- )
     newline type ;      newline type ;
   ' (cr) IS cr
   
 : space ( -- ) \ core  : space ( -- ) \ core
   \G Display one space.    \G Display one space.


Generate output suitable for use with a patch program
Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help