Diff for /gforth/utf-8.fs between versions 1.7 and 1.9

version 1.7, 2004/12/28 21:09:47 version 1.9, 2004/12/31 11:01:21
Line 45  s" malformed UTF-8 character" exception Line 45  s" malformed UTF-8 character" exception
     REPEAT  $7F xor 2* or  r>      REPEAT  $7F xor 2* or  r>
     BEGIN   over $80 u>= WHILE  tuck c! 1+  REPEAT  nip ;      BEGIN   over $80 u>= WHILE  tuck c! 1+  REPEAT  nip ;
   
   \ plug-in so that char and '<char> work for UTF-8
   
   [ifundef] char@ \ !! bootstrapping help
       Defer char@ ( addr u -- char addr' u' )
       :noname  over c@ -rot 1 /string ; IS char@
   [then]
   
   :noname  ( addr u -- char addr' u' )
       \ !! the if here seems to work around some breakage, but not
       \ entirely; e.g., try '' with LANG=C.
       dup 1 u<= IF defers char@ EXIT THEN
       over + >r u8@+ swap r> over - ; IS char@
   
 \ scan to next/previous character  \ scan to next/previous character
   
 : u8>> ( u8addr -- u8addr' )  : u8>> ( u8addr -- u8addr' )

Removed from v.1.7  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>