|
|
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: 11264 (0x2c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Gestion_Table, seg_05682d
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Liste;
with H_Code_Tab_Liste;
with Text_Io;
with V_String;
package body Gestion_Table is
type Itemorb is
record
Num_Socket : Transport_Defs.Socket_Id (1 .. 2);
Host_Name : Transport_Defs.Host_Id (1 .. 4);
Enabled : Boolean;
end record;
type Tab1 is array (Positive range <>) of Itemorb;
A_Tab : Tab1 (1 .. 14);
B_Tab : H_Code_Tab_Liste.Map;
Last_In_A_Tab : Integer := A_Tab'First;
Existance_Competence : Boolean := True;
procedure Affiche_Tab_A is
begin
for I in A_Tab'First .. A_Tab'Last loop
Text_Io.Put_Line ("**********************" & Integer'Image (I));
Text_Io.Put_Line (Utils.Byte_String_To_String
(Byte_Defs.Byte_String
(A_Tab (I).Num_Socket)) & " " &
Utils.Byte_String_To_String
(Byte_Defs.Byte_String
(A_Tab (I).Host_Name)) & " " &
Boolean'Image (A_Tab (I).Enabled));
Text_Io.Put_Line ("***************************");
end loop;
end Affiche_Tab_A;
procedure Give_Host_Socket_Tab_A
(Indice : Integer;
Hname : in out Transport_Defs.Host_Id;
Socket : in out Transport_Defs.Socket_Id) is
begin
Hname := A_Tab (Indice).Host_Name;
Socket := A_Tab (Indice).Num_Socket;
end Give_Host_Socket_Tab_A;
function Add_Item_Tab_A (Nsocket : Transport_Defs.Socket_Id;
Hname : Transport_Defs.Host_Id) return Integer is
Identific_Int_A_Envoyer : Integer;
begin
A_Tab (Last_In_A_Tab).Enabled := True;
A_Tab (Last_In_A_Tab).Num_Socket := Nsocket;
A_Tab (Last_In_A_Tab).Host_Name := Hname;
Identific_Int_A_Envoyer := Last_In_A_Tab;
Last_In_A_Tab := Last_In_A_Tab + 1;
return Identific_Int_A_Envoyer;
end Add_Item_Tab_A;
procedure Init_Tab_B is
begin
H_Code_Tab_Liste.Initialize (B_Tab);
end Init_Tab_B;
procedure Add_Service_Tab_B (Competence : String; Ident_I : Integer) is
Liste_Lue : Liste.List;
Liste_A_Deposer : Liste.List;
Reussi : Boolean;
begin
Liste_Lue := Liste.Nil;
H_Code_Tab_Liste.Find (B_Tab, Competence, Liste_Lue, Reussi);
if Reussi = False then
Text_Io.Put_Line ("Add_service_tab_b::Creation nouvel indice>>" &
Competence & " dans table int>>" &
Integer'Image (Ident_I));
Liste_A_Deposer := Liste.Nil;
Liste_A_Deposer := Liste.Make (Ident_I, Liste_A_Deposer);
H_Code_Tab_Liste.Define (B_Tab, Competence, Liste_A_Deposer);
else
Text_Io.Put_Line
("Add_service_tab_b::Insertion ds liste non vide indice>>" &
Competence & " tableau trouve int>>" &
Integer'Image (Ident_I));
Liste_A_Deposer := Liste.Make (Ident_I, Liste_Lue);
H_Code_Tab_Liste.Define (B_Tab, Competence, Liste_A_Deposer);
end if;
Text_Io.Put_Line ("Add_service_tab_b::insertion table B finie");
end Add_Service_Tab_B;
function Return_Liste_Tab_B (Competence1 : String) return Liste.List is
Liste_Lue : Liste.List;
Reussi : Boolean;
begin
Existance_Competence := True;
Liste_Lue := Liste.Nil;
H_Code_Tab_Liste.Find (B_Tab, Competence1, Liste_Lue, Reussi);
if Reussi = True then
Text_Io.Put_Line ("return_liste_tab_b::la competence cherchee>>" &
Competence1 & " existe liste fournie");
Existance_Competence := True;
return Liste_Lue;
else
Text_Io.Put_Line ("return_liste_tab_b::la competence>>" &
Competence1 & " demandee n'existe pas");
Liste_Lue := Liste.Nil;
Existance_Competence := False;
return Liste_Lue;
end if;
end Return_Liste_Tab_B;
function Competence_Existe return Boolean is
begin
return Existance_Competence;
end Competence_Existe;
procedure Affiche_Liste (Liste_A_Afficher : Liste.List) is
Indice_Liste : Liste.Iterator;
Longueur_Liste : Natural;
begin
Longueur_Liste := Liste.Length (Liste_A_Afficher);
Liste.Init (Indice_Liste, Liste_A_Afficher);
for Indice in 1 .. Longueur_Liste loop
Text_Io.Put_Line
("indice no" & Integer'Image (Indice) & " donnee : " &
Integer'Image (Liste.Value (Indice_Liste)));
Liste.Next (Indice_Liste);
end loop;
Text_Io.Put_Line
("Afficher_liste::fini******************************************");
end Affiche_Liste;
procedure Return_Contenu_Liste_Position
(Liste_Concernee : Liste.List;
Indice : Integer;
Result : in out Integer;
Enabled : in out Boolean;
All_Seen : in out Boolean;
Competence_Found : in out Boolean) is
Indice_A_Chercher : Integer;
Indice_Liste : Liste.Iterator;
Longueur_Liste : Natural;
I : Integer;
begin
Competence_Found := True;
if Competence_Existe = False then
Competence_Found := False;
Result := 1;
Enabled := True;
All_Seen := False;
else
Indice_A_Chercher := Indice;
Longueur_Liste := Liste.Length (Liste_Concernee);
All_Seen := False;
if Indice_A_Chercher >= Integer (Longueur_Liste) then
All_Seen := True;
Indice_A_Chercher := Indice_A_Chercher mod
Integer (Longueur_Liste);
end if;
Liste.Init (Indice_Liste, Liste_Concernee);
if Indice_A_Chercher /= 0 then
for I in 1 .. Indice_A_Chercher loop
Liste.Next (Indice_Liste);
end loop;
end if;
Enabled := A_Tab (Liste.Value (Indice_Liste)).Enabled;
Result := Liste.Value (Indice_Liste);
end if;
end Return_Contenu_Liste_Position;
procedure Disable (Serveur_Id_Int : Integer) is
begin
A_Tab (Serveur_Id_Int).Enabled := False;
end Disable;
end Gestion_Table;
nblk1=a
nid=2
hdr6=e
[0x00] rec0=1d rec1=00 rec2=01 rec3=05a
[0x01] rec0=18 rec1=00 rec2=07 rec3=05e
[0x02] rec0=1b rec1=00 rec2=03 rec3=008
[0x03] rec0=15 rec1=00 rec2=04 rec3=018
[0x04] rec0=1a rec1=00 rec2=0a rec3=030
[0x05] rec0=1a rec1=00 rec2=08 rec3=078
[0x06] rec0=18 rec1=00 rec2=09 rec3=000
[0x07] rec0=1a rec1=00 rec2=06 rec3=001
[0x08] rec0=38 rec1=00 rec2=00 rec3=000
[0x09] rec0=30 rec1=00 rec2=20 rec3=000
tail 0x21762a5d287c46db518a0 0x42a00088462060003
Free Block Chain:
0x2: 0000 00 06 00 04 80 01 79 01 63 65 20 3a 20 49 6e 74 ┆ y ce : Int┆
0x6: 0000 00 05 02 cc 80 0e 41 5f 43 68 65 72 63 68 65 72 ┆ A_Chercher┆
0x5: 0000 00 00 03 fc 80 15 6c 65 64 20 3a 20 69 6e 20 6f ┆ led : in o┆