HEA és HWP az EPDOC forrásából:
if s = '.HEA' then begin
BlockRead(F, Buf, 17, NumRead);
if (NumRead = 17) and (Buf[1] = #$80) then begin
HibaStr := 'Hibás fájltartalom';
BlockRead(F, Buf, ord(Buf[16]) + 7, NumRead);
repeat;
k := 0;
s2 := '';
BlockRead(F, Buf, 2, NumRead);
j := ord(Buf[0]) + ord(Buf[1]) * 256;
if j > 0 then begin
BlockRead(F, Buf, j - 2, NumRead);
for i := 2 to j - 1 do begin
c := Buf[i];
if k = 0 then begin
s := '';
k := ord(c) and 127;
end else begin
case c of
#$21..#$9F: s := s + KodTabla[c];
else s := s + copy(ures, 1, (ord(c) - $9f) mod 256);
end;
dec(k);
end;
if k = 0 then
s2 := s2 + s + #13+ #10;
end;
end;
RichEdit1.Text := RichEdit1.Text + s2;
until j = 0;
HibaStr := '';
end;
end else if s = '.HWP' then begin
BlockRead(F, Buf, 12 + 34, NumRead);
s := '';
for i := 0 to 9 do
s := s + Buf[i];
if (NumRead = 12 + 34) and (s = 'HWP.DOC 1.') then begin
HibaStr := 'Hibás fájltartalom';
for l := 1 to ord(buf[11]) do begin
{
HOSSZ 0=SEGEND vagy TEXTEND 2=ÜRES_SOR
FLAG 0-15=SORKOZ B7=LAPVEG B6=LAPVÉGKÉRÉS B5=VÉGTÍLTÁS B4=PUHACR
0-11 KARKÉSZLET
12 ALÁHÚZÁS VÁLTÓ
13 INVERZ VÁLTÓ
32-159 CHR
160- PUHA SZÓKÖZ
}
BlockRead(F, Buf, 2, NumRead);
j := ord(Buf[0]) + ord(Buf[1]) * 256;
BlockRead(F, Buf, j, NumRead);
k := 0;
s2 := '';
for i := 0 to j - 1 do begin
if k = 0 then
flag := 0;
case flag of
0: begin
s := '';
k := ord(Buf[i]);
inc(flag);
end;
1: inc(flag);
else begin
c := Buf[i];
case c of
#$20..#$9F: s := s + KodTabla[c];
#$A0..#$FF: s := s + copy(ures, 1, (ord(c) - $a0));
end;
end;
end;
dec(k);
if k = 0 then
s2 := s2 + s + #13+ #10;
end;
RichEdit1.Text := RichEdit1.Text + s2;
end;
HibaStr := '';
end;
end;