home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
153.img
/
TELES.ZIP
/
FAG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-03-04
|
3KB
|
94 lines
(*TAG FAG PROCEDURES
procedure printa1(i:anystring; var abort,next:boolean);
var c:integer;
begin
checkhangup;
if not hangup then begin
abort:=false;
next:=false;
c:=1;
if not empty then wkey(abort,next);
while not(abort or hangup) and (c-1<>length(i)) do begin
checkhangup;
if i[c]=chr(8) then begin
pap:=pap-1;
delay(30);
end else
if i[c]=#3 then begin
if i[c+1] in [#0..#9] then
if okansi then ansic(ord(i[c+1]));
end else if i[c]<>chr(10) then pap:=pap+1;
if not empty then wkey(abort,next);
if i[c]=#3 then c:=c+1
else outkey(i[c]);
c:=c+1;
end; {while}
end else abort:=true;
end;
procedure printacr(i:anystring; var abort,next:boolean);
begin
if not abort then
if i[length(i)]=#1 then printa(i,abort,next,true)
else printa(i+#1,abort,next,true);
end;
procedure printa(i:anystring; var abort,next:boolean; spc:boolean);
var s:anystring;
p,op,rp,rop,nca:integer;
crend:boolean;
begin
if not abort then begin
crend:=(i[length(i)]=#1);
if crend then i:=copy(i,1,length(i)-1);
if (i[1]=#2) or (i[1]+i[2]='~*') then begin
centre(i);
printa1(i,abort,next);
nl;
end else
if i[1]+i[2]='~(' then begin
i:=copy(i,3,length(i)-2);
if length(i)<thisuser.colms then
i:=copy(spaces,1,thisuser.colms-length(i)-1)+i;
printa1(i,abort,next);
nl;
end else begin
wkey(abort,next);
if i='' then nl;
while (i<>'') and not(abort or hangup) do begin
rp:=0;
if pos(#27,i)=0 then nca:=thisuser.colms-pap-1 else nca:=255;
p:=0;
while (rp<nca) and (p<length(i)) do begin
if i[p+1]=#8 then rp:=rp-1
else
if i[p+1]=#3 then p:=p+1
else if (i[p+1]<>#10) then rp:=rp+1;
p:=p+1;
end; {while}
op:=p;
rop:=rp;
if (rp>=nca) and (p<length(i)) then begin
while ((not (i[p] in [' ',#8,#10])) or (i[p-1]=#3)) and (p>1)
do begin
rp:=rp-1; p:=p-1;
end;
if p=1 then
if not (i[1] in [' ',#8,#10]) then begin
rp:=rp-1; p:=p-1;
end;
end;
if abs(rop-rp)>=(thisuser.colms div 2) then p:=op;
s:=copy(i,1,p);
delete(i,1,p);
if (s[length(s)]=' ') and spc then s[0]:=pred(s[0]);
printa1(s,abort,next);
if ((i='') and crend) or (i<>'') or abort then nl
else if spc then printa1(' ',abort,next);
end; {while}
end; {else}
end;
end;
*)