|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body File, seg_0046bd, separate Spreadsheet_Generic.Engine
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Library, Io, Common;
with Directory;
with Time_Utilities;
separate (Spreadsheet_Generic.Engine)
package body File is
package Tu renames Time_Utilities;
procedure Read (Name : String) is
F : Io.File_Type;
Buf : String (1 .. 255);
Last : Integer;
Valid : Boolean;
Obj : Directory.Object;
St : Directory.Naming.Name_Status;
begin
if (Capitalize (Name) = No_File_Name) or (Name = "") then
return;
end if;
Directory.Naming.Resolve (Name, Obj, St);
if not Directory.Naming."=" (St, Directory.Naming.Successful) then
Alert (Directory.Naming.Diagnosis (St, Name));
return;
end if;
Io.Open (F, Io.In_File, Name);
Echo_Line ("Loading from file " & Io.Name (F));
for L in Line_Type loop
Buf := Buf'Length * ' ';
Io.Get_Line (F, Buf, Last);
for C in Column_Type loop
begin
if Is_Modifiable (L, C) then
Feed (L, C,
Left_Align
(Buf (Column_Offset (Col (C)) + 1 ..
Column_Offset (Col (C)) + Width (C)),
Width (C)),
Valid);
end if;
exception
when others =>
null;
end;
end loop;
end loop;
Io.Close (F);
Screen.Refresh;
exception
when Io.End_Error =>
Beep ("Premature End Of File encountered");
if Io.Is_Open (F) then
Io.Close (F);
end if;
when others =>
Alert ("Fatal_error in reading");
if Io.Is_Open (F) then
Io.Close (F);
end if;
end Read;
procedure Write (Name : String) is
procedure Write_In (F : String) is
begin
Common.Write_File (F);
Echo_Line ("Image saved in file " & F);
exception
when others =>
Alert ("Could not write into " & F);
end Write_In;
begin
if Capitalize (Name) = No_File_Name then
return;
elsif Capitalize (Name) = Default_File_Name then
Write_In (Window_Name & '_' &
Tu.Image (Tu.Get_Time, Tu.Ada, Tu.Ada, Tu.Both));
else
Write_In (Name);
end if;
end Write;
end File;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=1e rec1=00 rec2=01 rec3=032
[0x01] rec0=00 rec1=00 rec2=04 rec3=018
[0x02] rec0=1d rec1=00 rec2=02 rec3=01a
[0x03] rec0=16 rec1=00 rec2=03 rec3=001
tail 0x215004a12815c66f76573 0x42a00088462061e03