Diff for /gforth/utf-8.fs between versions 1.18 and 1.23

version 1.18, 2005/12/31 15:46:10 version 1.23, 2006/05/01 09:45:56
Line 128  $80 Value max-single-byte Line 128  $80 Value max-single-byte
         nip nip over -          nip nip over -
     then ;      then ;
   
   [IFUNDEF] wcwidth
       : wcwidth abort ;
   [THEN]
       
   : u8width ( xcaddr u -- n )
       0 rot rot over + swap ?DO
           I xc@+ swap >r wcwidth +
       r> I - +LOOP ;
   
 : set-encoding-utf-8 ( -- )  : set-encoding-utf-8 ( -- )
     ['] u8emit is xemit      ['] u8emit is xemit
     ['] u8key is xkey      ['] u8key is xkey
Line 139  $80 Value max-single-byte Line 148  $80 Value max-single-byte
     ['] u8!+? is xc!+?      ['] u8!+? is xc!+?
     ['] u8@+ is xc@+      ['] u8@+ is xc@+
     ['] u8len is xc-size      ['] u8len is xc-size
   [ [IFDEF] x-width ]
       ['] u8width is x-width
   [ [THEN] ]
     ['] -u8trailing-garbage is -trailing-garbage      ['] -u8trailing-garbage is -trailing-garbage
 ;  ;
   
Line 150  $80 Value max-single-byte Line 162  $80 Value max-single-byte
     s" UTF-8" search nip nip      s" UTF-8" search nip nip
     IF  set-encoding-utf-8  ELSE  set-encoding-fixed-width  THEN ;      IF  set-encoding-utf-8  ELSE  set-encoding-fixed-width  THEN ;
   
 ' utf-8-cold INIT8 chained  :noname ( -- )
       defers 'cold
       utf-8-cold
   ; is 'cold
   
 utf-8-cold  utf-8-cold

Removed from v.1.18  
changed lines
  Added in v.1.23


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