[gforth] / gforth / kernel / io.fs  

gforth: gforth/kernel/io.fs

Diff for /gforth/kernel/io.fs between version 1.6 and 1.7

version 1.6, Tue Dec 8 22:03:11 1998 UTC version 1.7, Fri Dec 11 22:54:31 1998 UTC
Line 39 
Line 39 
     infile-id key?-file ;      infile-id key?-file ;
 [THEN]  [THEN]
   
 [IFUNDEF] (type)  undef-words
   
   Defer type ( c-addr u -- ) \ core
 : (type)  BEGIN  dup  WHILE  : (type)  BEGIN  dup  WHILE
     >r dup c@ (emit) 1+ r> 1-  REPEAT  2drop ;      >r dup c@ (emit) 1+ r> 1-  REPEAT  2drop ;
 [THEN]  
   
 Defer type ( c-addr u -- ) \ core  [IFDEF] (type) ' (type) IS Type [THEN]
 ' (type) IS Type  
   
 Defer emit ( c -- ) \ core  Defer emit ( c -- ) \ core
 ' (Emit) IS Emit  : (emit) ( c -- ) \ gforth
       0 emit-file drop \ !! use ?DUP-IF THROW ENDIF instead of DROP ?
   ;
   
   [IFDEF] (emit) ' (emit) IS emit [THEN]
   
 Defer key ( -- c ) \ core  Defer key ( -- c ) \ core
 ' (key) IS key  : (key) ( -- c ) \ gforth
       0 key-file ;
   
   [IFDEF] (key) ' (key) IS key [THEN]
   
 Defer key? ( -- flag ) \ core  Defer key? ( -- flag ) \ core
 ' (key?) IS key?  : (key?) ( -- flag ) \ gforth
       0 key?-file ;
   
   [IFDEF] (key?) ' (key?) IS key? [THEN]
   
   all-words
   
 : (.")     "lit count type ;  : (.")     "lit count type ;
 : (S")     "lit count ;  : (S")     "lit count ;
Line 78 
Line 90 
 [ [THEN] ]  [ [THEN] ]
     ;      ;
   
 1 [IF]  : space bl emit ;
   has? ec [IF]
   : spaces 0 max 0 ?DO space LOOP ;
   : backspaces  0 max 0 ?DO  #bs emit  LOOP ;
   [ELSE]
 \ space spaces                                          21mar93py  \ space spaces                                          21mar93py
 decimal  decimal
 Create spaces ( u -- ) \ core  Create spaces ( u -- ) \ core
Line 92 
Line 108 
    swap     swap
    0 max 0 ?DO  I' I - &80 min 2dup type  +LOOP  drop ;     0 max 0 ?DO  I' I - &80 min 2dup type  +LOOP  drop ;
 hex  hex
 : space ( -- ) \ core  
     1 spaces ;  
 [ELSE]  
 : space bl emit ;  
 : spaces 0 max 0 ?DO space LOOP ;  
   
 [THEN]  [THEN]
   


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help