--- gforth/extend.fs 2009/08/23 12:14:47 1.63 +++ gforth/extend.fs 2010/12/31 18:09:02 1.67 @@ -1,6 +1,6 @@ \ EXTEND.FS CORE-EXT Word not fully tested! 12may93jaw -\ Copyright (C) 1995,1998,2000,2003,2005,2007 Free Software Foundation, Inc. +\ Copyright (C) 1995,1998,2000,2003,2005,2007,2009,2010 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -50,7 +50,7 @@ decimal >r s>d >r abs -rot s>d r> xor r> swap >r >r dabs rot tuck um* 2swap um* swap >r 0 d+ r> -rot r@ um/mod -rot r> um/mod - [ s" floored" environment? 0= throw ] [if] + [ 1 -3 mod 0< ] [if] -rot r> IF IF 1. d+ THEN dnegate ELSE drop THEN [else] nip swap r> IF dnegate THEN @@ -199,9 +199,10 @@ variable span ( -- c-addr ) \ core-ext-o \G editing capabilites are available. The length of the string is \G stored in @code{span}; it does not include the \G character. OBSOLESCENT: superceeded by @code{accept}. + everyline 0 rot over BEGIN ( maxlen span c-addr pos1 ) - key decode ( maxlen span c-addr pos2 flag ) + xkey decode ( maxlen span c-addr pos2 flag ) >r 2over = r> or UNTIL 2 pick swap /string type