Continued from the previous message...
procedure qwk_mail.writeheader;
begin
qwkinfo^.network := ' ';
blockwrite(qwkfile,qwkinfo^,sizeof(qwkinfo^));
fillchar(qwkinfo^,sizeof(qwkinfo^),#32);
end;{Procedure}
procedure qwk_mail.writetext;
begin
if (tptr mod 128) 0 then begin
inc(tptr);
repeat
txtptr^[tptr] := #32;
inc(tptr);
until (tptr mod 128 = 0);
end;
blockwrite(qwkfile,txtptr^,tptr);
tptr := 0;
fillchar(txtptr^,16000,#32);
dispose(txtptr);
end;{Procedure}
procedure qwk_mail.setnumber(l : longint);
begin
arraystr(qwkinfo^.number,long2str(l));
end;{Procedure}
procedure qwk_mail.setrefer( l : longint);
begin
arraystr(qwkinfo^.reference,long2str(l));
end;{Procedure}
procedure qwk_mail.setlogical(r : longint);
begin
qwkinfo^.logical := r;
end;{Procedure}
procedure qwk_mail.setprivate(b : boolean);
begin
if b then qwkinfo^.status := '*' else qwkinfo^.status := ' ';
end;{Procedure}
procedure qwk_mail.setrecord(r : longint);
var
index : indexes;
indexf : file of indexes; {QWK Format}
idxstr : string[8];
begin
idxstr := long2str(conf);
idxstr := padleft(idxstr,'0',3);
assign(indexf,workdir+idxstr+'.NDX');
filemode :=2;
{$I-}reset(indexf);{$I+}
if ioresult = 2 then rewrite(indexf);
seek(indexf,filesize(indexf));
real_to_msb(r,index.rec_num);
if conf <= 255 then
index.conf := conf else index.conf := 0;
write(indexf,index);
close(indexf);
end;{Procedure}
procedure qwk_mail.setconference(c : longint);
begin
conf := c-1;
qwkinfo^.conference := conf;
end;
procedure qwk_mail.addline(s : string);
var i : longint;
begin
if tptr = 0 then begin
tptr := 1;
new(txtptr);
fillchar(txtptr^,64000,#32);
end;
for i := tptr to tptr + length(s) do
txtptr^[i] := s[(i - tptr)+1];
inc(tptr,length(s));
inc(tptr);
txtptr^[tptr] := #227;
inc(tptr);
end;
function qwk_mail.nextrecord : longint;
begin
nextrecord := (filesize(qwkfile) div 128) + 1;
end;
function qwk_mail.logical : longint;
Continued in the next message...
--- TriToss (tm) Professional 10.0 - #132
---------------
* Origin: City Scape BBS * 413-568-5241 * ProSoft Productions (1:321/200.0)
|