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

⟦b32cd04ef⟧ Ada Source

    Length: 13312 (0x3400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Feuille, seg_0497d4

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, Text_Io;
package body Feuille is

    function Which (Acell : in Cell) return Tcell is
    begin
        return Acell.Kind;
    end Which;

    procedure Image (Acell : in Cell) is
    begin
        Text_Io.Put ("Type du noeud : ");
        Text_Io.Put_Line (Tcell'Image (Acell.Kind));
        Text_Io.Put ("Contient :");
        case Acell.Kind is
            when Verbe | Complement | Objet | Piece_Courante |
                 Hero | Pnj | Direction | Enum =>
                Text_Io.Put_Line (Bounded_String.Image (Acell.Idattrib));
            when Iter =>
                Text_Io.Put_Line
                   (Bounded_String.Image
                       (Struct_Component.Liste_Attribut.Cellvalue (Acell.Aiter).
                        Name));
            when Iter_S =>
                Text_Io.Put_Line (Bounded_String.Image
                                     (Struct_Component.Liste_Structure.Cellvalue
                                         (Acell.Aiter_S).Name));
            when Chaine =>
                Text_Io.Put_Line (Bounded_String.Image (Acell.Phrase));  
            when Entier =>
                Text_Io.Put_Line (Natural'Image (Acell.Nbr));
            when Instruction =>
                Image (Acell.Listeinst);
                Text_Io.New_Line;
            when Booleen =>
                Text_Io.Put_Line (Boolean'Image (Acell.Bool));
            when others =>
                Text_Io.Put_Line ("");
        end case;
        if Acell.Left /= null then
            Text_Io.Put_Line ("<== Gauche.");
            Feuille.Image (Acell.Left.all);
        end if;
        if Acell.Right /= null then
            Text_Io.Put_Line ("Droite ==>");
            Feuille.Image (Acell.Right.all);
        end if;
    end Image;

    function Permute (List : in Liste_Instr.List) return Liste_Instr.List is
        Tmp_List : Liste_Instr.List;
        Iterator : Liste_Instr.Listiter;       Tmptree : Pcell;
    begin
        Iterator := Liste_Instr.Makelistiter (List);
        while (Liste_Instr.More (Iterator)) loop
            Liste_Instr.Next (Iterator, Tmptree);
            Liste_Instr.Attach (Tmptree, Tmp_List);
        end loop;
        return Tmp_List;
    end Permute;

    function Permute (List : in Liste_Instr_Locale.List)
                     return Liste_Instr_Locale.List is
        Tmp_List : Liste_Instr_Locale.List;
        Iterator : Liste_Instr_Locale.Listiter;
        Tmplocale : Instr_Locale;
    begin
        Iterator := Liste_Instr_Locale.Makelistiter (List);
        while (Liste_Instr_Locale.More (Iterator)) loop
            Liste_Instr_Locale.Next (Iterator, Tmplocale);
            Liste_Instr_Locale.Attach (Tmplocale, Tmp_List);
        end loop;
        return Tmp_List;
    end Permute;

    procedure Image (Alist : Liste_Instr.List) is
        Tmpiter : Liste_Instr.Listiter;
        Tmptree : Pcell;
    begin
        Tmpiter := Liste_Instr.Makelistiter (Alist);
        while (Liste_Instr.More (Tmpiter)) loop
            Liste_Instr.Next (Tmpiter, Tmptree);
            Image (Tmptree.all);
        end loop;  
    end Image;

    procedure Image (Alist : Liste_Instr_Locale.List) is
        Tmpiter : Liste_Instr_Locale.Listiter;
        Tmplocale : Instr_Locale;
    begin
        Tmpiter := Liste_Instr_Locale.Makelistiter (Alist);
        while (Liste_Instr_Locale.More (Tmpiter)) loop
            Text_Io.Put_Line
               ("Dans Piece : " &
                Bounded_String.Image
                   (Liste_Instr_Locale.Cellvalue (Tmpiter).Piece));
            Liste_Instr_Locale.Next (Tmpiter, Tmplocale);
            Image (Tmplocale.Liste);
        end loop;
    end Image;

    procedure Addleft (Pere : in out Cell; Fils : in Pcell) is
    begin
        Pere.Left := Fils;
    end Addleft;

    procedure Addright (Pere : in out Cell; Fils : in Pcell) is
    begin
        Pere.Right := Fils;
    end Addright;

    function Create (What : Tcell) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Abool : Boolean) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        if What = Booleen then
            Tmpcell.Bool := Abool;
        end if;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Anat : Natural) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        if What = Entier then
            Tmpcell.Nbr := Anat;
        end if;
        return Tmpcell;
    end Create;

    function Create
                (What : Tcell; Astring : String_Table.I_String) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        case What is
            when Chaine =>
                Bounded_String.Copy (Tmpcell.Phrase, Astring);
            when Objet | Direction | Piece_Courante |
                 Complement | Hero | Pnj | Verbe | Enum =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when others =>
                null;
        end case;
        return Tmpcell;
    end Create;

    function Create (What : Tcell;
                     Theiter : Struct_Component.Liste_Attribut.Listiter)
                    return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Aiter := Theiter;
        return Tmpcell;

    end Create;

    function Create (What : Tcell;
                     Theiter : Struct_Component.Liste_Structure.Listiter)
                    return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Aiter_S := Theiter;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Thelist : Liste_Instr.List) return Pcell is  
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Listeinst := Thelist;
        return Tmpcell;
    end Create;

end Feuille;

E3 Meta Data

    nblk1=c
    nid=b
    hdr6=12
        [0x00] rec0=1b rec1=00 rec2=01 rec3=036
        [0x01] rec0=1a rec1=00 rec2=07 rec3=002
        [0x02] rec0=01 rec1=00 rec2=04 rec3=012
        [0x03] rec0=1b rec1=00 rec2=0a rec3=03c
        [0x04] rec0=1d rec1=00 rec2=09 rec3=024
        [0x05] rec0=06 rec1=00 rec2=08 rec3=01a
        [0x06] rec0=21 rec1=00 rec2=06 rec3=012
        [0x07] rec0=1e rec1=00 rec2=05 rec3=06c
        [0x08] rec0=16 rec1=00 rec2=03 rec3=000
        [0x09] rec0=16 rec1=00 rec2=03 rec3=000
        [0x0a] rec0=aa rec1=18 rec2=a0 rec3=000
        [0x0b] rec0=9c rec1=80 rec2=00 rec3=000
    tail 0x2174de31a865e68b47375 0x42a00088462060003
Free Block Chain:
  0xb: 0000  00 02 00 04 80 01 20 01 02 00 00 00 00 03 78 cd  ┆              x ┆
  0x2: 0000  00 0c 03 fc 80 10 20 20 77 68 65 6e 20 6f 74 68  ┆        when oth┆
  0xc: 0000  00 00 00 3a 80 2a 64 5f 53 74 72 69 6e 67 2e 43  ┆   : *d_String.C┆