2020-06-10 11:48:49 +10:00
|
|
|
: _blen ( buf -- length of str in buf )
|
2020-06-11 09:00:03 +10:00
|
|
|
DUP BEGIN C@+ 0x20 < UNTIL -^ 1- ;
|
2020-06-10 11:48:49 +10:00
|
|
|
: _rbufsz ( size of linebuf to the right of curpos )
|
|
|
|
EDPOS @ 64 MOD 63 -^ ;
|
2020-06-23 21:08:21 +10:00
|
|
|
: _i ( i without _pln and _type. used in VE )
|
2020-06-10 11:48:49 +10:00
|
|
|
_rbufsz IBUF _blen 2DUP > IF
|
|
|
|
TUCK - ( ilen chars-to-move )
|
|
|
|
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
|
2020-06-11 10:56:19 +10:00
|
|
|
3 PICK MOVE- ( ctm ilen ) NIP ( ilen )
|
|
|
|
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN
|
2020-06-10 11:48:49 +10:00
|
|
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
2020-06-23 21:08:21 +10:00
|
|
|
: i IBUF _type _i EDPOS @ 64 / _pln ;
|