Differences From Artifact [86146489eda5917b]:
File rxe.retro part of check-in [4656eca6a1] - $$] reads files with short lines. by luke on 2010-06-06 05:21:39. [annotate] [view]
To Artifact [4f07a82f42d531e1]:
File rxe.retro part of check-in [96353f6640] - rxe; rebind docl's ] to | to avoid a conflict with the prior use of ] in rxe by charleschilders on 2010-06-06 15:05:53. [annotate] [view]
@@ -131,22 +131,22 @@
: $$E ( E = evaluate all )
normal pop pop 2drop ea ;
{{
3 elements fid action mode
- : ask ( - ) ." File? " 32 accept ;
- : open ( - ) tib @mode fopen !fid ;
- : emit ( c- ) @fid fwrite drop ;
- : dump ( an- ) for @+ emit next drop 10 emit ;
- : key ( -c ) @fid fread ;
- : read ( an- ) for key swap !+ next key 2drop ;
- : fread ( an- ) drop repeat key dup 10 =if 2drop ;then swap !+ again ;
- : all ( -a ) @blk block 8 for dup 64 @action execute 64 + next ;
- : end ( a- ) @fid fclose 2drop ;
- : common ( - ) ask open @fid if all end then clear ;
+ : ask ( - ) ." File? " 32 accept ;
+ : open ( - ) tib @mode fopen !fid ;
+ : emit ( c- ) @fid fwrite drop ;
+ : dump ( an- ) for @+ emit next drop 10 emit ;
+ : key ( -c ) @fid fread ;
+ : read ( an- ) for key swap !+ next key 2drop ;
+ : short ( an- ) drop repeat key dup 10 =if 2drop ;then swap !+ again ;
+ : all ( -a ) @blk block 8 for dup 64 @action execute 64 + next ;
+ : end ( a- ) @fid fclose 2drop ;
+ : common ( - ) ask open @fid if all end then clear ;
---reveal---
- : $${ &dump !action :w !mode common ;
- : $$} &read !action :r !mode common ;
- : $$] &fread !action :r !mode common ;
+ : $${ &dump !action :w !mode common ;
+ : $$} &read !action :r !mode common ;
+ : $$| &short !action :r !mode common ;
}}
))
: edit ( - )