|
|
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: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Build_Defs_Package, seg_020bd2, separate Rpc_Io
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
separate (Rpc_Io)
procedure Build_Defs_Package (From_Db : Analysis.Database;
Named_With_Root : String;
In_File : Io.File_Type) is
Subprogram_Iter : Analysis.Subprogram_Iterator;
Exception_Iter : Analysis.Exception_Iterator;
Id_Iter : Analysis.Id_Iterator;
Subprogram_Number : Natural := 0;
Exception_Number : Natural := 5; -- after predefined exceptions
procedure Put (Line : String; Line_Feeds : Natural := 0) is
begin
Io.Put (In_File, Line);
if Line_Feeds > 0 then
Io.New_Line (File => In_File,
Spacing => Io.Positive_Count (Line_Feeds));
end if;
end Put;
begin
Analysis.Init (From_Db => From_Db, Iter => Subprogram_Iter);
Analysis.Init (From_Db => From_Db, Iter => Exception_Iter);
Put (Ada_Io.Make_With_Clause (Name => "Rpc"));
Put (Ada_Io.Make_With_Clause (Name => "Transport_Defs"));
Put (Ada_Io.Make_Package (Name =>
Rpc_Names.Rpc_Defs_Package (Named_With_Root),
Kind => Ada_Io.Spec_Part));
Put (" -- Shared defintiions for remote procedure call:", 2);
Put (Ada_Io.Make_Constant_Declaration
(Name => "Network",
Type_Mark => "Transport_Defs.Network_Name",
Initial_Value => """TCP/IP"""));
-- the Socket, Program, and Version declarations must be completed
-- by the user
Put (Ada_Io.Make_Constant_Declaration
(Name => "Socket",
Type_Mark => "Transport_Defs.Socket_id (1..2)",
Initial_Value => "([INTEGER-expression], [INTEGER-expression])"),
1);
Put (Ada_Io.Make_Constant_Declaration
(Name => "Program",
Type_Mark => "Rpc.Program_Number",
Initial_Value => "[INTEGER-expression]"));
Put (Ada_Io.Make_Constant_Declaration
(Name => "Version",
Type_Mark => "Rpc.Version_Number",
Initial_Value => "[INTEGER-expression]"), 1);
Put (Ada_Io.Make_Package (Name => "Procedure_Number",
Kind => Ada_Io.Spec_Part));
-- uniquely number each package subprogram
while not Analysis.Done (Subprogram_Iter) loop
Put (Ada_Io.Make_Constant_Declaration
(Name => Analysis.Unique_Name (Subprogram_Iter),
Type_Mark => "Rpc.Procedure_Number",
Initial_Value => Natural'Image (Subprogram_Number)));
Analysis.Next (Subprogram_Iter);
Subprogram_Number := Subprogram_Number + 1;
end loop;
Put (Ada_Io.Make_End, 1);
Put (Ada_Io.Make_Package (Name => "Exception_Number",
Kind => Ada_Io.Spec_Part));
-- Predefined exceptions:
Put (Ada_Io.Make_Constant_Declaration (Name => "Constraint_Error",
Type_Mark => "Rpc.Exception_Number",
Initial_Value => "0"));
Put (Ada_Io.Make_Constant_Declaration (Name => "Numeric_Error",
Type_Mark => "Rpc.Exception_Number",
Initial_Value => "1"));
Put (Ada_Io.Make_Constant_Declaration (Name => "Program_Error",
Type_Mark => "Rpc.Exception_Number",
Initial_Value => "2"));
Put (Ada_Io.Make_Constant_Declaration (Name => "Storage_Error",
Type_Mark => "Rpc.Exception_Number",
Initial_Value => "3"));
Put (Ada_Io.Make_Constant_Declaration (Name => "Tasking_Error",
Type_Mark => "Rpc.Exception_Number",
Initial_Value => "4"));
-- uniquely number each user defined exception
while not Analysis.Done (Exception_Iter) loop
Id_Iter := Analysis.Names (Exception_Iter);
while not Analysis.Done (Id_Iter) loop
Put (Ada_Io.Make_Constant_Declaration
(Name => Analysis.Name (Id_Iter),
Type_Mark => "Rpc.Exception_Number",
Initial_Value => Natural'Image (Exception_Number)));
Analysis.Next (Id_Iter);
Exception_Number := Exception_Number + 1;
end loop;
Analysis.Next (Exception_Iter);
end loop;
Put (Ada_Io.Make_End, 1);
Put (Ada_Io.Make_End);
end Build_Defs_Package;
nblk1=6
nid=0
hdr6=c
[0x00] rec0=1b rec1=00 rec2=01 rec3=042
[0x01] rec0=00 rec1=00 rec2=06 rec3=014
[0x02] rec0=16 rec1=00 rec2=02 rec3=06e
[0x03] rec0=19 rec1=00 rec2=03 rec3=030
[0x04] rec0=0e rec1=00 rec2=04 rec3=004
[0x05] rec0=15 rec1=00 rec2=05 rec3=000
tail 0x2151c8164838d45639b05 0x42a00088462061e03