DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦0eb6fa3be⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Gestion_Table, seg_05518e

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Liste;
with H_Code_Tab_Liste;
with Text_Io;
with V_String;
package body Gestion_Table is
    A_Tab : Tab1 (1 .. 14);
    Last_In_A_Tab : Integer := A_Tab'First;
    B_Tab : H_Code_Tab_Liste.Map;


    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
        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");
            return Liste_Lue;
        else
            Text_Io.Put_Line ("return_liste_tab_b::la competence>>" &
                              Competence1 & " demandee n'existe pas");
            Liste_Lue := Liste.Nil;
            return Liste_Lue;
        end if;
    end Return_Liste_Tab_B;

    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) is
        Indice_A_Chercher : Integer;
        Indice_Liste : Liste.Iterator;
        Longueur_Liste : Natural;
        I : Integer;
    begin
        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 Return_Contenu_Liste_Position;

    procedure Disable (Serveur_Id_Int : Integer) is
    begin
        A_Tab (Serveur_Id_Int).Enabled := False;
    end Disable;
end Gestion_Table;


E3 Meta Data

    nblk1=8
    nid=8
    hdr6=e
        [0x00] rec0=1c rec1=00 rec2=01 rec3=028
        [0x01] rec0=1c rec1=00 rec2=02 rec3=00c
        [0x02] rec0=01 rec1=00 rec2=07 rec3=026
        [0x03] rec0=14 rec1=00 rec2=03 rec3=044
        [0x04] rec0=19 rec1=00 rec2=04 rec3=042
        [0x05] rec0=16 rec1=00 rec2=05 rec3=00c
        [0x06] rec0=1a rec1=00 rec2=06 rec3=000
        [0x07] rec0=02 rec1=40 rec2=01 rec3=381
    tail 0x2175ec26e87bc5047efb6 0x42a00088462060003
Free Block Chain:
  0x8: 0000  00 00 00 04 80 01 20 01 02 00 00 00 00 04 5f ff  ┆              _ ┆