1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-02 06:20:55 +11:00

Compare commits

..

No commits in common. "a405f771859eede7359f46923bccbc73b1a88d8d" and "bc951a5ff1f451023caa09fa68f23ac6bd127799" have entirely different histories.

3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,5 @@
: _blen ( buf -- length of str in buf ) : _blen ( buf -- length of str in buf )
DUP BEGIN C@+ 0x20 < UNTIL -^ 1- ; DUP BEGIN C@+ EOL? UNTIL -^ 1- ;
: _rbufsz ( size of linebuf to the right of curpos ) : _rbufsz ( size of linebuf to the right of curpos )
EDPOS @ 64 MOD 63 -^ ; EDPOS @ 64 MOD 63 -^ ;
: i COMPILE I ; IMMEDIATE ( save overshadowed ) : i COMPILE I ; IMMEDIATE ( save overshadowed )
@ -7,7 +7,9 @@
_rbufsz IBUF _blen 2DUP > IF _rbufsz IBUF _blen 2DUP > IF
TUCK - ( ilen chars-to-move ) TUCK - ( ilen chars-to-move )
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen ) SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
3 PICK MOVE- ( ctm ilen ) NIP ( ilen ) 3 PICK MOVE- ( ctm ilen )
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN NIP ( ilen )
ELSE DROP ( ilen becomes rbuffsize )
THEN
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ; DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
: I IBUF _type _I EDPOS @ 64 / _pln ; : I IBUF _type _I EDPOS @ 64 / _pln ;

View File

@ -1,10 +1,11 @@
: .2 DUP 10 < IF SPC THEN . ; : .2 DUP 10 < IF SPC THEN . ;
: EOL? ( c -- f ) DUP 0xd = SWAP NOT OR ;
: LIST : LIST
BLK@ BLK@
16 0 DO 16 0 DO
I 1+ .2 SPC I 1+ .2 SPC
64 I * BLK( + DUP 64 + SWAP DO 64 I * BLK( + DUP 64 + SWAP DO
I C@ 0x20 MAX EMIT I C@ DUP EOL? IF DROP LEAVE ELSE EMIT THEN
LOOP LOOP
NL NL
LOOP LOOP

Binary file not shown.