|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1858 (0x742)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Tar)
procedure Dump (Files : Name := "?";
Archive : Name := Tar.Tape;
Record_Size : Positive := Tar.Tblock;
Records_Per_Block : Positive := 8;
Swap_Bytes : Boolean := False) is
Source_File : Block_Buffer.Buffer_Type;
File_Bytes : Natural;
Buffer : System.Byte_String (1 .. Record_Size);
procedure Read_File (Total_Bytes : Natural; Do_Process : Boolean) is
Bytes_Left : Natural := Total_Bytes;
begin
while Bytes_Left > 0 loop
Block_Buffer.Read (Source_File, Buffer);
if Bytes_Left > Buffer'Length then
if Do_Process then
Put_Bytes (Buffer);
end if;
Bytes_Left := Bytes_Left - Buffer'Length;
else
if Do_Process then
Put_Bytes (Buffer (1 .. Bytes_Left));
end if;
Bytes_Left := 0;
end if;
end loop;
end Read_File;
begin
Block_Buffer.Open (Source_File, Dio.In_File, Archive,
Record_Size, Records_Per_Block, Swap_Bytes);
loop
Block_Buffer.Read (Source_File, Buffer);
exit when File_End (Buffer);
File_Bytes := File_Byte_Count (Buffer);
if Naming.Matches (File_Name (Buffer), Files) then
Put_Line ("");
Put_Line (File_Name (Buffer) & " => " &
Naming.To_Rational_Name (File_Name (Buffer)) & ";" &
Natural'Image (File_Bytes) & " bytes");
Read_File (File_Bytes, Do_Process => True);
else
Read_File (File_Bytes, Do_Process => False);
end if;
end loop;
Block_Buffer.Close (Source_File);
exception
when others =>
Block_Buffer.Close (Source_File);
raise;
end Dump;