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

⟦3cdc72ef5⟧ Ada Source

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

Derivation

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

E3 Source Code



with Conversion;
package body Byte_Utility is



    function "&" (Tableau1, Tableau2 : System.Byte_String)
                 return System.Byte_String is

        Tableau : System.Byte_String (0 ..
                                         Tableau1'Length + Tableau2'Length - 1);

    begin
        for I in Tableau1'Range loop
            Tableau (I) := Tableau1 (I);
        end loop;

        for I in Tableau2'Range loop
            Tableau (I + Tableau1'Length) := Tableau2 (I);
        end loop;

        return (Tableau);
    end "&";

--****************************************************************************

    function Compare (Tableau1, Tableau2 : System.Byte_String) return Boolean is

    begin
        if Tableau1'Length /= Tableau2'Length then
            return (False);
        end if;
        for I in Tableau1'Range loop
            if (Conversion.Byte_Integer (Tableau1 (I)) /=
                (Conversion.Byte_Integer (Tableau2 (I)))) then
                return (False);
            end if;
        end loop;  
        return (True);
    end Compare;

--***************************************************************************

    function Extraire (Tableau1 : in System.Byte_String;
                       La_Position, La_Taille : Integer)
                      return System.Byte_String is

        Tableau : System.Byte_String (0 .. La_Taille - 1);

    begin

        for I in Tableau'Range loop
            Tableau (I) := Tableau1 (I + La_Position);
        end loop;
        return (Tableau);

    end Extraire;

--***************************************************************************

    function Detruire_Byte_String_1a
                (N : Integer; Tableau1 : System.Byte_String)
                return System.Byte_String is

        La_Taille : Integer := (Tableau1'Length - N);
        Tableau : System.Byte_String (0 .. La_Taille - 1);

    begin
        for I in Tableau'Range loop
            Tableau (I) := Tableau1 (I + N);
        end loop;  
        return (Tableau);
    end Detruire_Byte_String_1a;

--***************************************************************************

end Byte_Utility;


E3 Meta Data

    nblk1=4
    nid=4
    hdr6=6
        [0x00] rec0=23 rec1=00 rec2=01 rec3=058
        [0x01] rec0=21 rec1=00 rec2=03 rec3=012
        [0x02] rec0=0b rec1=00 rec2=02 rec3=000
        [0x03] rec0=0a rec1=00 rec2=03 rec3=000
    tail 0x2153b77dc86125c13303c 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 00 ee 80 26 20 20 20 20 20 20 54 61 62 6c  ┆     &      Tabl┆