DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦a87db3c73⟧ TextFile

    Length: 5390 (0x150e)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Object_Set;
with Directory_Tools;
with Context_Tools;
with Io;
with Directory;

procedure Analyze_With_Clauses (For_Unit : String := "") is

    package Dir renames Directory;
    package Naming renames Directory_Tools.Dir.Naming;
    package Simple_Text_Io renames Io;


    Context_Set : Object_Set.Set;
    Use_Set : Object_Set.Set;
    Body_Set : Object_Set.Set;
    Subunits_Set : Object_Set.Set;

    Context_Iter : Object_Set.Iterator;
    Use_Iter : Object_Set.Iterator;
    Body_Iter : Object_Set.Iterator;
    Subunits_Iter : Object_Set.Iterator;

    package Sio renames Simple_Text_Io;

    Object_Iter : Naming.Iterator;
    Status : Naming.Name_Status;
    An_Object : Directory_Tools.Dir.Object;
    E_Status : Directory_Tools.Dir.Error_Status;
    Dir_Status : Dir.Error_Status;
    Version : Dir.Version;

begin
    Naming.Resolve (Object_Iter, For_Unit, Status);

    while not Naming.Done (Object_Iter) loop
        Naming.Get_Object (Object_Iter, An_Object, E_Status);

        Dir.Traversal.Get_Version (An_Object, Version, Dir_Status);

        if not Dir."=" (Dir_Status, Dir.Successful) then
            Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                             (An_Object));
            Sio.Put_Line
               ("*** Warning: Object has no versions so can not be analyzed.");
            Sio.New_Line;
        elsif not Dir.Declaration_Operations.Is_Installed (Version) then
            Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                             (An_Object));
            Sio.Put_Line
               ("*** Warning: Object not installed so will not be analyzed.");
            Sio.New_Line;
        else
            Context_Tools.Filter_Context_Clauses
               (An_Object, Context_Set, Use_Set, Body_Set, Subunits_Set);

            if Object_Set.Is_Empty (Context_Set) and
               Object_Set.Is_Empty (Use_Set) and
               Object_Set.Is_Empty (Body_Set) and
               Object_Set.Is_Empty (Subunits_Set) then
                null;
--    Sio.Put_Line
--         (directory_Tools.Dir.Naming.Unique_Full_Name (An_Object));
--    Sio.Put_Line ("   No changes required.");
--    Sio.New_Line;
            else


                if not Object_Set.Is_Empty (Context_Set) then
                    Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                                     (An_Object));
                    Sio.Put_Line ("  Context clauses not required:");
                    Object_Set.Init (Context_Iter, Context_Set);

                    while not Object_Set.Done (Context_Iter) loop
                        Sio.Put_Line ("    " &
                                      Directory_Tools.Dir.Naming.Get_Simple_Name
                                         (Object_Set.Value (Context_Iter)));
                        Object_Set.Next (Context_Iter);
                    end loop;

                    Sio.New_Line;
                end if;

                if not Object_Set.Is_Empty (Use_Set) then
                    Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                                     (An_Object));
                    Sio.Put_Line
                       ("  Context clauses required only for use clause:");
                    Object_Set.Init (Use_Iter, Use_Set);

                    while not Object_Set.Done (Use_Iter) loop
                        Sio.Put_Line ("    " &
                                      Directory_Tools.Dir.Naming.Get_Simple_Name
                                         (Object_Set.Value (Use_Iter)));
                        Object_Set.Next (Use_Iter);
                    end loop;

                    Sio.New_Line;
                end if;

                if not Object_Set.Is_Empty (Body_Set) then
                    Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                                     (An_Object));

                    Sio.Put_Line
                       ("  Context clauses required only in the body:");
                    Object_Set.Init (Body_Iter, Body_Set);

                    while not Object_Set.Done (Body_Iter) loop
                        Sio.Put_Line ("    " &
                                      Directory_Tools.Dir.Naming.Get_Simple_Name
                                         (Object_Set.Value (Body_Iter)));
                        Object_Set.Next (Body_Iter);
                    end loop;

                    Sio.New_Line;
                end if;

                if not Object_Set.Is_Empty (Subunits_Set) then
                    Sio.Put_Line (Directory_Tools.Dir.Naming.Unique_Full_Name
                                     (An_Object));

                    Sio.Put_Line
                       ("  Context clauses required only in the subunits:");
                    Object_Set.Init (Subunits_Iter, Subunits_Set);

                    while not Object_Set.Done (Subunits_Iter) loop
                        Sio.Put_Line ("    " &
                                      Directory_Tools.Dir.Naming.Get_Simple_Name
                                         (Object_Set.Value (Subunits_Iter)));
                        Object_Set.Next (Subunits_Iter);
                    end loop;

                    Sio.New_Line;
                end if;
            end if;
        end if;

        Naming.Next (Object_Iter);
    end loop;
end Analyze_With_Clauses;