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

version 1.4, 2004/12/24 14:08:43 version 1.5, 2004/12/27 20:05:53
Line 129 Line 129
 : u8tab-expand ( max span addr pos1 -- max span addr pos2 0 )  : u8tab-expand ( max span addr pos1 -- max span addr pos2 0 )
     key? IF  #tab (u8ins) 0  EXIT  THEN      key? IF  #tab (u8ins) 0  EXIT  THEN
     u8kill-expand 2dup extract-word dup 0= IF  nip EXIT  THEN      u8kill-expand 2dup extract-word dup 0= IF  nip EXIT  THEN
     search-prefix  tib-full?      search-prefix tib-full?
     IF    7 emit  2drop  0 0 prefix-found 2!      IF    7 emit  2drop  prefix-off
     ELSE  dup >r      ELSE  dup >r
         2>r >string r@ + 2r> 2swap insert          2>r >string r@ + 2r> 2swap insert
         r@ + rot r> + -rot          r@ + rot r> + -rot
     THEN      THEN
     prefix-found @ IF  bl (u8ins)  THEN  0 ;      prefix-found @ IF  bl (u8ins)  ELSE  .all .rest  THEN  0 ;
   
 : utf-8-io ( -- )  : utf-8-io ( -- )
     ['] u8forw       ctrl F bindkey      ['] u8forw       ctrl F bindkey
Line 150 Line 150
     ['] (u8enter)    #cr    bindkey      ['] (u8enter)    #cr    bindkey
     ['] u8tab-expand #tab   bindkey      ['] u8tab-expand #tab   bindkey
     ['] (u8ins)      IS insert-char      ['] (u8ins)      IS insert-char
       ['] kill-prefix  IS everychar
     ['] save-cursor  IS everyline      ['] save-cursor  IS everyline
     ['] u8key        IS key      ['] u8key        IS key
     ['] u8emit       IS emit ;      ['] u8emit       IS emit ;

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


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