[gforth] / gforth / wf.fs  

gforth: gforth/wf.fs

Diff for /gforth/wf.fs between version 1.23 and 1.24

version 1.23, Sun Jan 25 19:35:13 2004 UTC version 1.24, Mon Feb 2 14:15:23 2004 UTC
Line 37 
Line 37 
 Variable tag-option  Variable tag-option
 s" " tag-option $!  s" " tag-option $!
   
   : .type ( addr u -- )
       bounds ?DO  I c@
           case
               '& of  ." &"  endof
               '< of  ." &lt;"   endof
               dup emit
           endcase
       LOOP ;
   
 : tag ( addr u -- ) '< emit type tag-option $@ type '> emit  : tag ( addr u -- ) '< emit type tag-option $@ type '> emit
     s" " tag-option $! ;      s" " tag-option $! ;
 : tag/ ( addr u -- )  s"  /" tag-option $+! tag ;  : tag/ ( addr u -- )  s"  /" tag-option $+! tag ;
 : /tag ( addr u -- ) '< emit '/ emit type '> emit ;  : /tag ( addr u -- ) '< emit '/ emit type '> emit ;
 : tagged ( addr1 u1 addr2 u2 -- )  2dup 2>r tag type 2r> /tag ;  : tagged ( addr1 u1 addr2 u2 -- )  2dup 2>r tag .type 2r> /tag ;
   
 : opt ( addr u opt u -- )  s"  " tag-option $+!  : opt ( addr u opt u -- )  s"  " tag-option $+!
     tag-option $+! s' ="' tag-option $+! tag-option $+!      tag-option $+! s' ="' tag-option $+! tag-option $+!
Line 243 
Line 252 
 \ line handling  \ line handling
   
 : char? ( -- c )  >in @ char swap >in ! ;  : char? ( -- c )  >in @ char swap >in ! ;
   
 : parse-tag ( addr u char -- )  : parse-tag ( addr u char -- )
     >r r@ parse type      >r r@ parse .type
     r> parse 2swap tagged ;      r> parse 2swap tagged ;
   
 : .text ( -- )  >in @ >r char drop  : .text ( -- )  >in @ >r char drop
     source r@ /string >in @ r> - nip      source r@ /string >in @ r> - nip .type ;
     bounds ?DO  I c@  
         case  
             '& of  ." &amp;"  endof  
             '< of  ." &lt;"   endof  
             dup emit  
         endcase  
     LOOP ;  
   
 Create do-words  $100 0 [DO] ' .text , [LOOP]  Create do-words  $100 0 [DO] ' .text , [LOOP]
   


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help