Diff for /gforth/utf-8.fs between versions 1.3 and 1.4

version 1.3, 2004/12/12 22:20:00 version 1.4, 2004/12/24 14:08:43
Line 20 Line 20
   
 \ short: u8 means utf-8 encoded address  \ short: u8 means utf-8 encoded address
   
 : u8len ( u -- n )  : u8len ( u8 -- n )
     dup      $80 u< IF  drop 1  EXIT  THEN \ special case ASCII      dup      $80 u< IF  drop 1  EXIT  THEN \ special case ASCII
     $800  2 >r      $800  2 >r
     BEGIN  2dup u>=  WHILE  5 lshift r> 1+ >r  REPEAT      BEGIN  2dup u>=  WHILE  5 lshift r> 1+ >r  REPEAT
Line 137 Line 137
     THEN      THEN
     prefix-found @ IF  bl (u8ins)  THEN  0 ;      prefix-found @ IF  bl (u8ins)  THEN  0 ;
   
 ' u8forw       ctrl F bindkey  : utf-8-io ( -- )
 ' u8back       ctrl B bindkey      ['] u8forw       ctrl F bindkey
 ' ?u8del       ctrl H bindkey      ['] u8back       ctrl B bindkey
 ' u8eof        ctrl D bindkey      ['] ?u8del       ctrl H bindkey
 ' <u8del>      ctrl X bindkey      ['] u8eof        ctrl D bindkey
 ' u8clear-tib  ctrl K bindkey      ['] <u8del>      ctrl X bindkey
 ' u8first-pos  ctrl A bindkey      ['] u8clear-tib  ctrl K bindkey
 ' u8end-pos    ctrl E bindkey      ['] u8first-pos  ctrl A bindkey
 ' (u8enter)    #lf    bindkey      ['] u8end-pos    ctrl E bindkey
 ' (u8enter)    #cr    bindkey      ['] (u8enter)    #lf    bindkey
 ' u8tab-expand #tab   bindkey      ['] (u8enter)    #cr    bindkey
 ' (u8ins) IS insert-char      ['] u8tab-expand #tab   bindkey
 ' save-cursor IS everyline      ['] (u8ins)      IS insert-char
 ' u8key IS key      ['] save-cursor  IS everyline
 ' u8emit IS emit      ['] u8key        IS key
       ['] u8emit       IS emit ;
   

Removed from v.1.3  
changed lines
  Added in v.1.4


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