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

⟦674fd76ab⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Find_Renames, seg_00440f

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 Log;
with Profile;
with Common;
with Add_Hyper_Table;
with Create_Null_Document;
with Lrm_Renames;
use Lrm_Renames;
with Directory_Renames;
use Directory_Renames;
with Errors;
with Simple_Status;
with Compilation_Units;
with Lrm_Utilities;
package body Find_Renames is

    procedure Add (Units       :        String := "";
                   To_Document : in out Abstract_Document.Handle;
                   Response    :        String := "<PROFILE>") is

        Units_Iter : Object.Iterator := Naming.Resolution (Units);

        type Columns is (Renamed_Unit, New_Name, Parent_Containing_Rename);

        function Is_Integer_Column (C : Columns) return Boolean is
        begin
            return False;
        end Is_Integer_Column;

        function Included (Elem : Ada.Element) return Boolean is
        begin
            case Decls.Kind (Elem) is
                when Decls.A_Function_Rename_Declaration =>
                    if not (Decls.Is_Operator_Definition (Elem)) and then
                       Lrm_Utilities.Is_Actual_Declaration (Elem) then
                        return True;
                    else
                        return False;
                    end if;
                when others =>
                    return Decls.Is_Renaming_Declaration (Elem);
            end case;
        end Included;

        function Explanation (C : Columns; Elem : Ada.Element) return String is
        begin
            case C is
                when Renamed_Unit =>
                    return "Unit that is renamed";
                when Parent_Containing_Rename =>
                    return "Parent unit containing the rename";
                when New_Name =>
                    return "Local name introduced by the rename";
            end case;
        end Explanation;

        function Image (C : Columns; Elem : Ada.Element) return String is
        begin
            case C is
                when Renamed_Unit =>
                    return Decls.Name (Decls.Renamed_Declaration (Elem));
                when Parent_Containing_Rename =>
                    return Decls.Name
                              (Compilation_Units.Unit_Declaration
                                  (Compilation_Units.Parent_Compilation_Unit
                                      (Elem)));
                when New_Name =>
                    return Decls.Name (Elem);
            end case;
        end Image;

        procedure Linkage (C                :     Columns;
                           Elem             :     Ada.Element;
                           Linkage_Element  : out Ada.Element;
                           Linkage_Elements : out Ada.Element_List) is
        begin
            -- default values changed within the case statement as necessary
            Linkage_Elements := Ada.Nil_List;

            case C is
                when Renamed_Unit =>
                    Linkage_Element := Decls.Renamed_Declaration (Elem);
                when Parent_Containing_Rename =>
                    Linkage_Element :=
                       Ada.Value (Decls.Identifiers
                                     (Compilation_Units.Unit_Declaration
                                         (Compilation_Units.
                                          Parent_Compilation_Unit (Elem))));
                when New_Name =>
                    Linkage_Element := Elem;
            end case;
        end Linkage;

        procedure Add_Hyper_Table_To_Doc is
           new Add_Hyper_Table (Included,  
                                Columns,  
                                Is_Integer_Column, Image, Explanation, Linkage,  
                                Table_Title => "RENAMING DECLARATIONS");
    begin
        if Object.Is_Bad (Units_Iter) then
            Log.Put_Line (Units & " is not a valid pathname",
                          Profile.Error_Msg);
        else
            Add_Hyper_Table_To_Doc (Units_Iter, To_Document);
        end if;
    end Add;

    procedure Display (Units             : String := "";
                       To_Preview_Object : String := "Renames_Info";
                       Response          : String := "<PROFILE>") is
        Document  : Abstract_Document.Handle;
        Condition : Errors.Condition;
    begin

        Create_Null_Document (Named           => To_Preview_Object,
                              Error_Info      => Condition,
                              Document_Handle => Document);

        case Errors.Severity (Condition) is
            when Simple_Status.Problem | Simple_Status.Fatal =>
                Log.Put_Line ("Problem creating object " & To_Preview_Object &
                              ".  " & Errors.Info (Condition),
                              Profile.Error_Msg);
            when others =>

                Add (Units, Document, Response);
               Abstract_Document.Close (Document);
                Common.Definition (To_Preview_Object);

        end case;
    end Display;
end Find_Renames;

E3 Meta Data

    nblk1=6
    nid=0
    hdr6=c
        [0x00] rec0=22 rec1=00 rec2=01 rec3=036
        [0x01] rec0=1a rec1=00 rec2=02 rec3=008
        [0x02] rec0=16 rec1=00 rec2=03 rec3=01c
        [0x03] rec0=14 rec1=00 rec2=04 rec3=058
        [0x04] rec0=1a rec1=00 rec2=05 rec3=002
        [0x05] rec0=06 rec1=00 rec2=06 rec3=000
    tail 0x2170016dc815c639db359 0x42a00088462061e03