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

⟦7c443aad9⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Sub_Registration, seg_054f5e

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 Bounded_String;

package body Sub_Registration is

    function Is_Registration (Mess : Message.Tmessage) return Boolean is
        Comm : Message.Command_Type;
    begin
        Message.Unfill_Command (Mess, Comm);
        if Message.Command_Type'Image (Comm) =
           Message.Command_Type'Image (Message.Registration) then
            return True;
        else
            return False;
        end if;
    end Is_Registration;

    function Is_Unregistration (Mess : Message.Tmessage) return Boolean is
        Comm : Message.Command_Type;
    begin
        Message.Unfill_Command (Mess, Comm);
        if Message.Command_Type'Image (Comm) =
           Message.Command_Type'Image (Message.Unregistration) then
            return True;
        else
            return False;
        end if;  
    end Is_Unregistration;

    procedure Extract_Host_And_Name_And_Sock
                 (From : Message.Content_String;
                  Host : in out Message.Content_String;
                  Name : in out Message.Content_String;
                  Sock : in out Message.Content_String) is
        I : Natural := 1;  
        J : Natural := 1;
    begin
        loop
            exit when Bounded_String.Extract (From, J, J) = ":";
            J := J + 1;  
        end loop;
        Bounded_String.Copy
           (Source => Bounded_String.Extract (From, I, J - 1), Target => Sock);
        J := J + 1;
        I := J;
        loop
            exit when Bounded_String.Extract (From, J, J) = ":";
            J := J + 1;  
        end loop;
        Bounded_String.Copy
           (Source => Bounded_String.Extract (From, I, J - 1), Target => Host);
        J := J + 1;
        I := J;
        loop
            exit when Bounded_String.Extract (From, J, J) = ":";
            J := J + 1;  
        end loop;
        Bounded_String.Copy
           (Source => Bounded_String.Extract (From, I, J - 1), Target => Name);
    end Extract_Host_And_Name_And_Sock;

    procedure Alloc_Ident (Mess : in out Message.Tmessage;
                           Ident : in out Identification.Tclient_Id) is
        Id : Identification.Tclient_Id;  
        Description : Identification.Tdescription;
    begin
        Extract_Host_And_Name_And_Sock (Mess.Content, Description.Host,
                                        Description.Name, Description.Sock);
        Identification.Enter_New_Object (Id, Description);  
        Ident := Id;
    end Alloc_Ident;

    procedure Desalloc_Ident (Ident : in Identification.Tclient_Id) is
    begin
        Identification.Delete_Object (Ident);
    end Desalloc_Ident;

end Sub_Registration;


E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=20 rec1=00 rec2=01 rec3=038
        [0x01] rec0=00 rec1=00 rec2=03 rec3=034
        [0x02] rec0=1c rec1=00 rec2=02 rec3=024
        [0x03] rec0=14 rec1=00 rec2=04 rec3=000
    tail 0x2175e5de687b97c85fa85 0x42a00088462060003