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

⟦9ca6ef716⟧ Ada Source

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

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

package body Ip_Name is  
    procedure Convert (Source : in out Com_Defs.V_String;
                       Target : in out Com_Defs.V_String) is

        Tampon : Com_Defs.V_String;
        I : Natural := 0;
        J : Natural := 0;
        Position_Source : Positive := 1;  
        Position_Dest : Positive := 1;
        Car : Character;
        Simple_Car_To_Ad : constant Character := '0';
        Double_Car_To_Ad : constant String := "00";
    begin  
        Bounded_String.Append (Bounded_String.Variable_String (Source), '.');
        while I < 4 loop
            Car := Bounded_String.Char_At
                      (Bounded_String.Variable_String (Source),
                       Position_Source);
            Position_Source := Position_Source + 1;
            if Car /= '.' then
                Bounded_String.Append
                   (Bounded_String.Variable_String (Tampon), Car);
                Position_Dest := Position_Dest + 1;
                J := J + 1;
            else
                case J is
                    when 3 =>
                        begin
                            J := 0;
                        end;
                    when 2 =>
                        begin
                            Position_Dest := Position_Dest - 2;
                            Bounded_String.Insert
                               (Bounded_String.Variable_String (Tampon),
                                Position_Dest, Simple_Car_To_Ad);
                            Position_Dest := Position_Dest + 3;
                            J := 0;
                        end;  
                    when 1 =>
                        begin
                            Position_Dest := Position_Dest - 1;
                            Bounded_String.Insert
                               (Bounded_String.Variable_String (Tampon),
                                Position_Dest, Double_Car_To_Ad);
                            Position_Dest := Position_Dest + 3;
                            J := 0;
                        end;

                    when others =>  
                        Text_Io.Put_Line ("error case convert");  
                end case;  
                I := I + 1;
            end if;  
        end loop;  
        Bounded_String.Copy (Bounded_String.Variable_String (Target),
                             Bounded_String.Variable_String (Tampon));
    end Convert;  
end Ip_Name;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1a rec1=00 rec2=01 rec3=04c
        [0x01] rec0=00 rec1=00 rec2=04 rec3=006
        [0x02] rec0=17 rec1=00 rec2=03 rec3=00e
        [0x03] rec0=0e rec1=00 rec2=02 rec3=000
    tail 0x2175f9fae87bd4c3e7f8a 0x42a00088462060003