{$M 16384,0,16384} {* Kay Ziatz *} program wlex; {* Version 1.1a (ex-2.7) '' ?R R?R *} uses crt,dos; const winarr:array[#128..#255] of char = ' < `' + #39 + '"" > " " ' + + '??'?':?%?'?????''''--?T?'??????????'-R?'; var inf: file; ouf: text; ifn, ofn: string; workarr: array[1..1024] of char; {* fileopened: boolean; } cc, ccc: char; p1: pathstr; d1: dirstr; n1: namestr; e1: extstr; i,ii,intercount,hcount,pages : integer; blockcount1,blockcount2: word; points,showcount: longint; xx,yy:integer; nullfactor:boolean; label 1; begin clrscr; writeln('??R?R?-? WinWord''R??R?R Ě' ? -R'-̿; v.1.1'); writeln('(K) Kay Ziatz, Alrights reserved'); writeln('Freeware program for general distribution.'); if paramstr(1)='' then begin writeln(''?? ? ?R-?-R R?? ?. ?. ?- Ě'R?.'); halt; end; ifn:=paramstr(1); assign(inf,ifn); {$I-} reset(inf); {$I+} if ioresult<>0 then begin writeln(''' ',ifn,' -? -??- ' R?'R - ???.'); halt(1); end; {* fileopened:=true;} if paramstr(2)<>'' then ofn:= paramstr(2) else begin p1:=paramstr(1); fsplit(p1,d1,n1,e1); ofn:=n1 + '.txt'; end; assign(ouf,ofn); {$I-} reset(ouf); {$I+} if ioresult=0 then begin close(ouf); write(''R? Ě' ',ofn,' ǁR ?. '??? [Y/N] '); ccc:=readkey; writeln(ccc); if upcase(ccc)<>'Y' then halt; end; rewrite(ouf); hcount:=1; reset(inf,1); points:=round(filesize(inf)/4096); xx:=wherex; yy:=wherey; for ii:=1 to points do begin write(''); end; gotoxy(xx,yy); {* ?ښ'R R??R? *} { seek(inf,3328); } intercount:=1; showcount:=1; pages:=1; repeat {* until EOF *} for i:=1 to 1024 do workarr[i]:=#32; {$I+} blockread(inf,workarr,sizeof(workarr),blockcount2); {$I-} inc(showcount); if showcount=5 then begin write(''); showcount:=1; end; for i:=1 to 1024 do begin {* skip header *} { if (showcount=2) and (i=1) then begin if (workarr[1]=#190) or (workarr[2]=#190) then i:=128; end;} { if workarr[i]='6' then begin if workarr[i+1]='.' then noskip:=true; end;} if (workarr[i]=#0) or (workarr[i+1]=#0) or (workarr[i+1]=#0) then nullfactor:=true else nullfactor:=false; if (workarr[i]=#255) and (workarr[i+1]=#255) and (workarr[i+2]=#255) then nullfactor:=true else nullfactor:=false; cc:=workarr[i]; case cc of #32: begin if intercount < 63 then begin write(ouf,#32); inc(intercount); end else begin write(ouf,#13,#10); intercount:=1; end; end; #13: begin writeln(ouf,#13,#10); intercount:=1; {* inc(i); *} end; #10: begin end; #31: begin end; #11: write(ouf,#13); #7: write(ouf,#10); { #25: begin write(ouf,#13,#10,#13,#10,#26); sound(536); delay(100); sound(660); delay(70); sound(800); delay(80); sound(600); delay(100); sound(710); delay(70); sound(890); delay(80); sound(660); delay(100); sound(800); delay(70); sound(1000); delay(80); sound(1072); delay(125); nosound; goto 1; end; } else begin if nullfactor=false then begin if (ord(cc)>31) and (ord(cc)<128) then write(ouf,cc); if ord(cc)>127 then write(ouf,winarr[cc]); if cc=#7 then write(ouf,#32); inc(intercount); {* ?R??'?-R *} end; end; end; { case } end; { loop 512 } until eof(inf)=true; 1: close(inf); close(ouf); end.