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

⟦226d7ab68⟧ Ada Source

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

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



package body C_File is
    function Suivant (I : Integer) return Integer is
    begin
        return (I mod Longueur_Max) + 1;
    end Suivant;

    procedure Raz (File_Attente : in out Objet) is
    begin
        File_Attente.Tete := 1;
        File_Attente.Queue := Longueur_Max;
    end Raz;

    function Est_Vide (File_Attente : Objet) return Boolean is
    begin
        if Suivant (File_Attente.Queue) = File_Attente.Tete then
            return True;
        else
            return False;
        end if;
    end Est_Vide;


    function Element_Tete (File_Attente : Objet) return Element is
    begin
        if Est_Vide (File_Attente) then
            raise File_Vide;
        else
            return File_Attente.Tableau (File_Attente.Tete);
        end if;
    end Element_Tete;

    procedure Element_Tete (File_Attente : in out Objet;
                            Car : in out Element) is
    begin
        if Est_Vide (File_Attente) = False then
            Car := File_Attente.Tableau (File_Attente.Tete);
        end if;
    end Element_Tete;

    procedure Enfiler (File_Attente : in out Objet; Elem : Element) is
    begin
        if Suivant (Suivant (File_Attente.Queue)) = File_Attente.Tete then
            raise File_Pleine;
        else
            File_Attente.Queue := Suivant (File_Attente.Queue);
            File_Attente.Tableau (File_Attente.Queue) := Elem;
        end if;

    end Enfiler;

    procedure Defiler (File_Attente : in out Objet) is
    begin
        if Est_Vide (File_Attente) then
            raise File_Vide;
        else
            File_Attente.Tete := Suivant (File_Attente.Tete);
        end if;
    end Defiler;

    procedure Extraire (File_Attente : in out Objet; Taille : out Integer) is
        I : Integer := 0;  
    begin
        while C_File.Est_Vide (File_Attente) = False loop
            I := I + 1;
            C_File.Defiler (File_Attente);
        end loop;
        Taille := I;
    end Extraire;
end C_File;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=24 rec1=00 rec2=01 rec3=042
        [0x01] rec0=1e rec1=00 rec2=04 rec3=04e
        [0x02] rec0=05 rec1=00 rec2=03 rec3=000
        [0x03] rec0=08 rec1=00 rec2=04 rec3=000
    tail 0x217652a7887d473a2ec11 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 15 80 12 56 69 64 65 20 28 46 69 6c 65  ┆      Vide (File┆