From:	CSBVAX::MRGATE!@KL.SRI.Com,@wiscvm.wisc.edu:ZRGC002@DTUPEV5A.BITNET@SMTP 29-JUL-1987 14:51
To:	EVERHART
Subj:	Another version of the bitmap [with fragmentation]

Received: from wiscvm.wisc.edu by KL.SRI.COM with TCP; Tue 28 Jul 87 12:00:46-PDT
Received: from DTUPEV5A.BITNET by wiscvm.wisc.edu ; Tue, 28 Jul 87 13:53:36 CDT
Date:     Wed, 22-Jul-1987 12:49:35.89 GMT+1
From:     <zrgc002%DTUPEV5A.BITNET@wiscvm.wisc.edu> (Christoph D. Gatzka)
Subject:  Another version of the bitmap [with fragmentation]
To:       <info-vax@sri-kl.arpa>

program a(input,output);

var ein:text;
    bitmap:packed record case boolean of
false:(a:packed array[0..790000]of char);
true:(b:packed array[0..10000]of packed array[1..80]of char);end;
    zeile:varying[132]of char;
    zeile2:varying[80]of char;
    i,j,lbn,count:integer;
begin
open (ein,'disk.ana',READONLY);
reset (ein);
while not(eof(ein))
 do begin
     readln (ein,zeile);
     if zeile.length > 44
      then if substr (zeile,9,6) ='Count:'
            then
             begin
              readv (substr(zeile,15,15),count);
              readv (substr(zeile,38,zeile.length-37),lbn);
              if count> 0 then
              BEGIN
              for i:=lbn to lbn+count-1
               do begin
               bitmap.a[i]:='*';
              if (i=632766) or (i=632769) or (i=13463) or (i=42000) OR (I=504025
)
               then writeln ('lbn:',lbn,' count: ',count,' i:',i);
               end;
             BITMAP.A[LBN]:='[';
             BITMAP.A[LBN+COUNT-1]:=']';
             END;
            end;
    end;
close(ein);
for j:=0 to 790000-1
 do if NOT (bitmap.a[j] IN ['*','[',']']) then bitmap.a[j]:='-';
open (ein,'bitmap.karte');
rewrite (ein);

for j:=0 to 10000
 do begin
    zeile2.body:=bitmap.b[j];
    zeile2.length:=80;
    writeln (ein,zeile2);
    end;
end.

 Christoph D. Gatzka                zrgc002@dtupev5a.bitnet
 Student of medicine

 University of Tuebingen
 Germany
