> ConvRTF021  Convert various text files  Recovered and fixed ( v0.20 VDU23;3;55 on MODE 7 2+ v0.21 Extended/Unextended View option < F- Q Quad Chapter -> fs96 (48point) P- X Double SubChapter -> fs48 (24point) Z- D DblsStrk Section -> fs32 (16point) d( _ Underlne SubSection -> Underline n. Plain Text -> fs24 (12 point) x# E Emphs Text -> Bold & B Bold Prog Text -> Courier & I Italics Pathname -> Italics : :&87:23;3,55;0;0;0:ver$="0.21":init: A$=FNOS_GetEnv err: menu::pc%:*Quit  : -init:A%=0:X%=1:os%=(&FFF4 &FF00)256 8pc%=os%=32:max%=-P-2000+2000*(>&FFFF): mem% max% At1$=132+157+135+141:t2$=134+157+129:t3$=129+157+135 %pc%:t1$=" ":t2$=" ":t3$=t2$ lpp%=66:cr0%=2:vex%=  :  ݤmenu: ": z%=-1 pc%:t1$;"Rich Text Format File Convertor": ,1t2$"Version ";ver$;" (C)1995-98 J.G.Harston" 64t3$;(11-sz(max%)/2);"Memory free: "sz(max%) @b'" Paper size: A4 (80chars x 70lines)"'" Page length: ";lpp%;" Extended View: "onf(vex%) J P.'SPC10"(R)TF to View" T.'10"(V)iew to RTF"'10"(L)ines per page" ^ 10"(E)xtended View On/Off" h 10"E(x)it"'10"(*)command" r'10"Press a key:"; |K%=:K%>96:K%=K%-32 K%="*":"*"A$:A$:":"; "LERVX "+13,K%):K%' ?K%="L":"Lines per page: "lpp%:lpp%<60 lpp%>70:lpp%=66 K%="L":=0 K%="V":VtoR:=0 K%="R":RtoV:=0 K%="E":vex%=vex%:=0  =K%="X" :  VtoR '"Convert View to RTF file":type%=1 eol$=13+10 "Input View file: "in$ in%=(in$) &in%=0:pc%:in$=in$+".":in%=(in$) (in%=0:pc%:in$=in$+"TXT":in%=(in$) &-in%=0:"File '";in$;"' not found":A%=: 0"Output RTF file: "out$ :'pc%:out$,".")=0:out$=out$+".RTF" DDext%=#in%:ext%max%:"SAVE "+out$+" 0+"+~(ext%*1.4)+" FFFF0000 FFFFFF00",pc%):out%=(out$) out%=0:optr%=mem%+ext% bpre:eof%= ldo(g):eof% vkpost:out%=0:"SAVE "+out$+" "+~(mem%+ext%)+" "+~(optr%)+" FFFF0000 FFFFFF00",pc%) #out%:out%=0 in%<>0:#in%:in%=0 os%=6:"Stamp "+out$ "SetType "+out$+" C32"  : pre:type%<>1: 3ul%=:bd%=:code$="":cr%=cr0%:last1%=0:last0%=0 Ɠout("{\rtf1\ansi \deff0\deflang1024{\fonttbl{\f0\fmodern Times New Roman;}{\f1\froman Symbol;}{\f2\fswiss Arial;}{\f3\froman Courier;}}"+eol$) wout("\paperw11909\paperh16834\margl360\margr360\margt"+(108*(70-lpp%))+"\margb"+(108*(70-lpp%))+"\gutter0"+eol$) Qout("\sectd \linex0\headery709\footery709\colsx709 \f0\fs24\pard\plain \qj") 7z%=1 10:out("\tx"+(144*(z%*8-1)))::out(eol$)  :  post  type%=1:out("}"+eol$):   : *'do(A%):A%=10:13;" CHR$10! ";: 4A%=13:cr%:cr%=cr%-1: >. last0%=13 last1%<>13 A%>32:out(" ") Hlast1%=last0%:last0%=A% R1 last1%=13 A%=13:out("\par \par "+eol$): \3 last1%=13 (A%=9 A%=32):out("\par "+eol$) f A%=13:so: p: z: 0 Still some slight problems with CR/CR/etcs A%="\":out("\\"): A%="{":out("\{"): A%="}":out("\}"): A%="`":out("\'a3"): A%>127:out("\'"+~A%): A%=9:out("\tab "): A%=26:out(" "): @A%=28:ul%:rem("\ul "):out("\plain "+code$+"\f0"):ul%=: ?A%=28:out("\ul "):ul%=:code$=code$+"\ul ":: SubSection A%<>29:out(A%): /vex%:bd%:out("\f0\fs24\plain "):bd%=: &vex%:bd%=:out("\f3\fs24\b "):  A%=g $A%<64:out("["+h0(A%,2)+"]"): 3A%="Q":out("\fs96 "):: Chapter $-A%="q":out("\fs24 "):cr%=3:last0%=13: .6A%="X":out("\fs48 "):: SubChapter 8-A%="x":out("\fs24 "):cr%=1:last0%=13: B3A%="D":out("\fs32 "):: Section LA%="d":out("\fs24 "): V8A%="B":out("\f3\fs24\b "):: Program text `&A%="b":out("\f0\fs24\plain "): j(A%="E"A%="e":A%=A%-3: Emphasise t I-> falls through ~7A%>95:rem("\"+A%+" "):out("\f0\plain "+code$): 31:out(A%) ( so 2 eof% < F: Pod:a$=g Z"\{}",a$):out(a$): da$=a$+g:"\{} ",a$,1)) nb$=a$,1):a$=a$,a$-1) xa$="\tab":out(9) a$="\par":out(13)  a$="\ul":out(28):ul%=ul% a$="\b"::: a$="\i"::: a$="\plain"::: b$="\":od  : out(a$):a$="": 'out%=0:$optr%=a$:optr%=optr%+a$: #:#out%,a$:a$=a$,2):a$="": : 2ݤg:in%=0:ptr%>=ext%-1:eof%=:=mem%?(ptr%-1) %in%=0:ptr%=ptr%+1:=mem%?(ptr%-1) #in%:eof%=:=254  =#in% ": ,0so:in%=0:13;d0(100*ptr%ext%,2);"%";: 6&13;d0(100*#in%#in%,2);"%";: @: J(ݤsz(A%):="&"+~A%+", "+A%+" bytes" T#ݤh0(A%,N%)="0000000"+~A%,N%) ^#ݤd0(A%,N%)="00000000"+A%,N%) h ݤonf(A%):A%:="ON" ="OFF" r: |ݤerr::#0:<>17:K%= =K%<0 (os%>0) : ݤOS_GetEnv: A$,A%,X%,Y% 'A%=0:X%=1:os%=( &FFF4 &FF00)256 2os%=32:A$=$&100:?&100=13:=A$,A$+" "," ")+1) Sos%=6 >&8000:ș "OS_GetEnv" A$:A$=A$,A$," ",1+A$," ",1+A$," ")))):=A$ eX%=P+200:Y%=X%256:?X%=0:X%!1=P+220:!(X%!1)=0:A%=9:&FFD1:X%=P+220:!X%:X%?(1+?X%)=13:=$(X%+1) =""