[gforth] / gforth / prims2x.fs  

gforth: gforth/prims2x.fs

Diff for /gforth/prims2x.fs between version 1.129 and 1.130

version 1.129, Mon Jan 20 17:07:38 2003 UTC version 1.130, Thu Jan 30 16:14:31 2003 UTC
Line 1328 
Line 1328 
  getinput member? ;   getinput member? ;
 ' testchar? test-vector !  ' testchar? test-vector !
   
 : checksyncline ( -- )  : checksynclines ( -- )
     \ when input points to a newline, check if the next line is a      \ when input points to a newline, check if the next line is a
     \ sync line.  If it is, perform the appropriate actions.      \ sync line.  If it is, perform the appropriate actions.
       begin
     rawinput @ >r      rawinput @ >r
     s" #line " r@ over compare if      s" #line " r@ over compare if
         rdrop 1 line +! EXIT          rdrop 1 line +! EXIT
Line 1346 
Line 1347 
         dup char+ rawinput !          dup char+ rawinput !
         rawinput @ c@ cookedinput @ c!          rawinput @ c@ cookedinput @ c!
     endif      endif
     drop ;          drop
       again ;
   
 : ?nextchar ( f -- )  : ?nextchar ( f -- )
     s" syntax error, wrong char" ?print-error      s" syntax error, wrong char" ?print-error
Line 1355 
Line 1357 
         1 chars rawinput +!          1 chars rawinput +!
         1 chars cookedinput +!          1 chars cookedinput +!
         nl-char = if          nl-char = if
             checksyncline              checksynclines
             rawinput @ line-start !              rawinput @ line-start !
         endif          endif
         rawinput @ c@ cookedinput @ c!          rawinput @ c@
           cookedinput @ c!
     endif ;      endif ;
   
 : charclass ( set "name" -- )  : charclass ( set "name" -- )
Line 1503 
Line 1506 
     \ process the string at addr u      \ process the string at addr u
     over dup rawinput ! dup line-start ! cookedinput !      over dup rawinput ! dup line-start ! cookedinput !
     + endrawinput !      + endrawinput !
     checksyncline      checksynclines
     primitives2something ;      primitives2something ;
   
   : unixify ( c-addr u1 -- c-addr u2 )
       \ delete crs from the string
       bounds tuck tuck ?do ( c-addr1 )
           i c@ dup #cr <> if
               over c! char+
           else
               drop
           endif
       loop
       over - ;
   
 : process-file ( addr u xt-simple x-combined -- )  : process-file ( addr u xt-simple x-combined -- )
     output-combined ! output !      output-combined ! output !
     save-mem 2dup filename 2!      save-mem 2dup filename 2!
     slurp-file      slurp-file unixify
     warnings @ if      warnings @ if
         ." ------------ CUT HERE -------------" cr  endif          ." ------------ CUT HERE -------------" cr  endif
     primfilter ;      primfilter ;


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help