[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[StrongED] Txtidy update



The Txtidy tool: !StrongED.Defaults.Modes.News.Tools.Txtidy
has been out of date ever since StrongED had its Great
System-Variable Renaming. It will crash your computer if you click on
the gentleman contemplating the scissors above his head. The cure is to
set !StrongED.Defaults.Modes.News.Tools as the current directory and
then to run the Basic program below:

REM MkTxtidy
REM GCW 16.11.2013
REM 'txtidy' is a utility for StrongED's process
REM command to replace top bit set characters by a
REM space and remove control codes that are not LFs.

ON ERROR REPORT:PRINT " at line ";ERL:END
DIM C% 200
PROCasm
PRINT P%-C%
SYS "OS_File",10,"Txtidy",&FFC,,C%,P%
END

DEF PROCasm
FOR pass% = 0 TO 2 STEP 2
P% = C%
[ OPT pass%
B entry%
.in%
EQUS  "<StrongED$ScrapDir>.Out"+CHR$0
ALIGN
.out%
EQUS  "<StrongED$ScrapDir>.In"+CHR$0
ALIGN
.entry%
ADR R1,in%
MOV R0,#&43
SWI &2000D       ; OS_Find
CMP R0,#0
MOVEQ PC,R14
MOV R6,R0        ; inhandle
ADR R1,out%
MOV R0,#&83
SWI &2000D       ; OS_Find
CMP R0,#0
MOVEQ PC,R14
MOV R5,R0        ; outhandle
B start%
.exit%
MOV R0,#0
MOV R1,R6
SWI &2000D       ; OS_Find  close inhandle
MOV R1,R5
SWI &2000D       ; OS_Find  close outhandle
MOV PC,R14
.writeblank%
MOV R0,#&20
.write%
MOV R1,R5
SWI &2000B       ; OS_BPut
.start%
MOV R1,R6
SWI &2000A       ; OS_BGet
BCS exit%        ; end of file
TST R0,#&80      ; top bit clear?
BNE writeblank%
CMP R0,#&20
BGE write%
CMP R0,#&A       ; LF
BEQ write%
B writeblank%    ; control
]
NEXT
ENDPROC

-- 
Gavin Wraith (gavin@xxxxxxxxxxxxxxx)
Home page: http://www.wra1th.plus.com/

--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html