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

⟦7643dc1b1⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Etape, seg_03bad8

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;

package body Etape is

    package Int_Io is new Text_Io.Integer_Io (Num => Integer);



-- fonction privee : retourne l'etape suivante de l' etape courante de la liste etape

    function Etape_Suivante (E_Consultee : in P_Etape) return P_Etape is
    begin
        return E_Consultee.Suivant;
    end Etape_Suivante;


-- fonction privee : echange l'action d'une etape avec une autre action

    procedure Echange_Action (E_Modifiee : in out P_Etape;
                              Nouvelle_Action : in Action) is
    begin
        E_Modifiee.L_Action := Nouvelle_Action;
    end Echange_Action;


    -- fin des fonctions privees d'etape


-- fonction publique : creee une nouvelle cellule etape

    function Creer_Etape (Temps_E : in Temps;
                          Action_E : in Action;
                          E_Suivante : in P_Etape) return P_Etape is
        Result : P_Etape;
    begin  
        Result := new Cell_Etape;
        Result.Le_Temps := Temps_E;
        Result.L_Action := Action_E;
        Result.Suivant := E_Suivante;
        return Result;
    end Creer_Etape;



-- fonction publique : retourne le temps de l'etape

    function Temps_Etape (E_Consultee : in P_Etape) return Temps is
    begin
        return E_Consultee.Le_Temps;
    end Temps_Etape;


-- fonction publique : retourne true si l'etape est vide sinon retourne false

    function Etape_Est_Vide (E_Consultee : in P_Etape) return Boolean is
    begin
        return E_Consultee = Etape_Vide;
    end Etape_Est_Vide;



-- procedure publique : insere une etape dans la liste des etapes
--                      en classant celle-ci suivant son temps

    procedure Ajouter_Etape (E_Modifiee : in out P_Etape;
                             Temps_E : in Temps;
                             Action_E : in Action) is
        Tmp1 : P_Etape;

    begin  
        if (Etape_Est_Vide (E_Consultee => E_Modifiee)) then
            E_Modifiee := Creer_Etape (Temps_E => Temps_E,
                                       Action_E => Action_E,
                                       E_Suivante => Etape_Vide);
        else
            if (Temps_E = Temps_Etape (E_Consultee => E_Modifiee)) then  
                Echange_Action (E_Modifiee => E_Modifiee,
                                Nouvelle_Action => Action_E);
            else
                if (Temps_E > Temps_Etape (E_Consultee => E_Modifiee)) then  
                    Tmp1 := Etape_Suivante (E_Consultee => E_Modifiee);
                    Ajouter_Etape (E_Modifiee => Tmp1,
                                   Temps_E => Temps_E,
                                   Action_E => Action_E);
                    E_Modifiee.Suivant := Tmp1;
                else  
                    E_Modifiee := Creer_Etape (Temps_E => Temps_E,
                                               Action_E => Action_E,
                                               E_Suivante => E_Modifiee);
                end if;
            end if;
        end if;
    end Ajouter_Etape;



-- procedure publique : affiche l'integralite des informations contenues dans la liste etape

    procedure Affiche_Etape (E_Affichee : in P_Etape) is
        Tmp : P_Etape;
        Continu : Boolean := True;
    begin  
        Tmp := E_Affichee;
        while (Continu) loop  
            Text_Io.Put_Line ("");
            Text_Io.Put ("le temps :");
            Int_Io.Put (Tmp.Le_Temps);
            Text_Io.Put ("   l'action la valeur: ");
            Int_Io.Put (Tmp.L_Action.La_Valeur);
            if (Tmp.L_Action.La_Transition = 0) then
                Text_Io.Put ("  il n'y a pas de transition");
            else
                Text_Io.Put ("  la transition : ");
                Int_Io.Put (Tmp.L_Action.La_Transition);  
            end if;
            Tmp := Etape_Suivante (E_Consultee => Tmp);
            if (Etape_Est_Vide (E_Consultee => Tmp)) then
                Continu := False;
            end if;
        end loop;
        Text_Io.Put_Line ("");
    end Affiche_Etape;


end Etape;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=25 rec1=00 rec2=01 rec3=03a
        [0x01] rec0=23 rec1=00 rec2=02 rec3=046
        [0x02] rec0=12 rec1=00 rec2=03 rec3=028
        [0x03] rec0=1c rec1=00 rec2=04 rec3=00e
        [0x04] rec0=09 rec1=00 rec2=05 rec3=000
    tail 0x217392a2e853b71d975ba 0x42a00088462060003