version 1.12, 2004/12/12 20:14:07
|
version 1.13, 2004/12/28 17:27:24
|
Line 19
|
Line 19
|
\ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. |
\ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. |
|
|
: (ins) ( max span addr pos1 key -- max span addr pos2 ) |
: (ins) ( max span addr pos1 key -- max span addr pos2 ) |
>r 2dup + r@ swap c! r> emit 1+ rot 1+ -rot ; |
>r 2over = IF rdrop bell EXIT THEN |
|
2dup + r@ swap c! r> emit 1+ rot 1+ -rot ; |
: (bs) ( max span addr pos1 -- max span addr pos2 flag ) |
: (bs) ( max span addr pos1 -- max span addr pos2 flag ) |
dup IF |
dup IF |
#bs emit space #bs emit 1- rot 1- -rot |
#bs emit space #bs emit 1- rot 1- -rot |
Line 53 defer everyline
|
Line 54 defer everyline
|
dup #del = IF drop #bs THEN \ del is rubout |
dup #del = IF drop #bs THEN \ del is rubout |
dup bl u< IF cells ctrlkeys + perform EXIT THEN |
dup bl u< IF cells ctrlkeys + perform EXIT THEN |
\ check for end reached |
\ check for end reached |
>r 2over = IF rdrop bell 0 EXIT THEN |
insert-char 0 ; |
r> insert-char 0 ; |
|
|
|
: edit-line ( c-addr n1 n2 -- n3 ) \ gforth |
: edit-line ( c-addr n1 n2 -- n3 ) \ gforth |
\G edit the string with length @var{n2} in the buffer @var{c-addr |
\G edit the string with length @var{n2} in the buffer @var{c-addr |