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

⟦5afd507a9⟧ Ada Source

    Length: 20480 (0x5000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Library, pragma Module_Name 4 3921, pragma Subsystem Commands, seg_028436

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 Profile;
with Compilation;

package Library is

    subtype Name is String;
    -- Lexically and syntactically an Ada Name.

    subtype Simple_Name is String;
    -- A simple Ada name.  Basically, an identifier or operator.

    subtype Context_Name is Name;

    -- Treatment of context.  There is a current context that constitutes
    -- the assumed naming context.  Names are resolved in this context.

    -- The following characters modify the context:
    --  !   specifies the Universe context
    --  $   specifies the enclosing library for the current context.
    --  $$  specifies the enclosing world for the current context.
    --  ^   specifies the parent of the current context.
    --  @   matches any single name segment (or part thereof)
    --  ?   matches 0 or more name segments, only the last of which may be a
    --      world.
    --  ??  matches 0 or more name segments.

    -- The special stings "<IMAGE>", etc., attempt to get the designated
    -- object from the current selection/image.

    -- Note that many commands are recursive by default (they are
    -- recognizable as such by the presence of a Recursive parameter). When
    -- the Recursive parameter is true, all descendents of the specified
    -- objects partake in the operation. When Recursive is false, just the
    -- specified objects partake.

    -- The effects of the Recursive option can also be obtained using "?"
    -- wildcards, but with more writing.  In any case, an object is operated
    -- on only once whether it is introduced by an input parameter or the
    -- recursive option or both.


    Error : exception renames Profile.Error;

    -- Only the single exception Error is raised


    procedure Resolve (Name_Of : Name := "<TEXT>";
                       Target_Name : Name := "";
                       Objects_Only : Boolean := True;
                       Response : String := "<PROFILE>");

    -- Print the Full name for Name_Of.  Defaults to the current selection's
    -- text.

    procedure Enclosing_World (Levels : Positive := 1;
                               Response : String := "<PROFILE>");
    -- Enclosing_World is equivalent to Context ("^$$");

    procedure Context (To_Be : Context_Name := "$";
                       Response : String := "<PROFILE>");

    -- Set the job context to To_Be.  When To_Be is already the job context,
    -- only printing takes place.


    procedure Copy (From : Name := "<REGION>";
                    To : Name := "<IMAGE>";
                    Recursive : Boolean := True;
                    Response : String := "<PROFILE>";
                    Copy_Links : Boolean := True;
                    Options : String := "");

    -- Copy version From resulting in version To; see table below.

    -- To designates an object that will exist after the copy has
    -- completed.  For Ada objects, changing the simple name may require
    -- user intervention before installation.

    -- To is interpreted in the current context or specified full
    -- context and must be unique.

    -- The object designated by To will be the same class as From.

    -- Objects representing devices cannot be copied.

    -- Any situation that would require demoting unrelated declarations
    -- results in an error, suppressing the copy.

    -- Recursive applies to objects that contain other objects and indicates
    -- that these contained objects should be copied.

    -- If Copy_Links is true, then link packs for any worlds copied are
    -- duplicated, and any link which pointed to the source for a copy is
    -- altered to point to the destination.  If Copy_Links is false, any
    -- copied worlds will have empty link packs.

    -- If a world and its switch file are copied, then the copied unit will
    -- point to the copy of the switch file.  If the switch file is not
    -- copied, then the unit and its original will reference the same switch
    -- file.

    -- Ada units are copied as source.

    -- Copy and Move subsume the functionality of Copy_Into and Move_Into
    -- from previous releases.  Whether a Copy/Move is "to" or "into" is
    -- determined by the type of object specified by the From and To
    -- parameters.  The chart below gives the details.

    -- If wildcards/substitution characters are involved in the From and To
    -- parameters, this matrix is applied AFTER these wildcards have been
    -- expanded.  If the source is over-specified (e.g., "?" is used with
    -- the recursive switch) a source object is copied only once.

    --                            COPY/MOVE to/into matrix
    --
    --           \ TO
    --            +---------+---------+---------+--------+--------+----------
    --    FROM    | Non-Ada | Library | Subunit | World  | Drctry | No Object
    --            | Object  |  Unit   |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --    Non-Ada |         |         |         |        |        |
    --    Object  | TO (1)  |  Error  |  Error  |  INTO  |  INTO  |    TO
    --            |         |         |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --    Library |         |         |         |        |        |
    --     Unit   |  Error  |   TO    |   TO    |  INTO  |  INTO  |    TO
    --      (2)   |         |         |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --    Subunit |         |         |         |        |        |
    --      (2)   |  Error  |  INTO   |   TO    |  INTO  |  INTO  |    TO
    --            |         |         |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --    World   |         |         |         |        |        |
    --      (3)   |  Error  |  Error  |  Error  | TO (4) | TO (4) |    TO
    --            |         |         |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --    Drctry  |         |         |         |        |        |
    --      (3)   |  Error  |  Error  |  Error  | TO (4) | TO (4) |    TO
    --            |         |         |         |        |        |
    --    --------+---------+---------+---------+--------+--------+----------
    --
    --    Notes:
    --
    --    1.  User can make any "TO" an "INTO" by appending ".name" to To;
    --        Appending ".#" would yield target with same simple name as From.
    --
    --    2.  Any class mismatch is an error.
    --
    --    3.  Subunits of unit are involved if Recursive switch is set;
    --        nesting of subunits is preserved.
    --
    --    4.  Subcomponents of library are involved if Recursive switch is set;
    --        relative nesting of subcomponents is preserved.
    --
    --    5.  Contents of source library are merged with contents of
    --        target library.
    --


    procedure Move (From : Name := "<REGION>";
                    To : Name := "<IMAGE>";
                    Recursive : Boolean := True;
                    Response : String := "<PROFILE>";
                    Copy_Links : Boolean := True;
                    Options : String := "");

    -- Equivalent to Copy (Existing, ...); Delete (Existing);

    subtype Volume is Natural range 0 .. 31;
    Nil : constant Volume := Volume'First;

    type Kind is (World, Directory, Subpackage);

    procedure Create (Name : Library.Name := ">>LIBRARY NAME<<";
                      Kind : Library.Kind := Library.Directory;
                      Vol : Volume := Library.Nil;
                      Model : String := "!Model.R1000";
                      Response : String := "<PROFILE>");
    --
    -- Create a library of the specified type.  The Nil volume represents
    -- the 'best' volume (The 'best' volume does not necessarily mean the
    -- volume with the most space.  The 'best' volume calculation takes into
    -- account the percentage of a volume that is available and an estimate
    -- of the real consumption of previously allocated worlds).  Vol is
    -- ignored for Subpackages, which are not control points, and must be on
    -- the same volume as their parent.  When creating a World, links are
    -- copied from Model (unless it is "").


    procedure Rename (From : Name := "<SELECTION>";
                      To : Simple_Name := ">>NEW SIMPLE NAME<<";
                      Response : String := "<PROFILE>");

    -- Change the name of an existing library unit or managed object.
    -- References to library units are not changed -- only the actual
    -- name of the unit.  Various other restrictions apply.


    procedure Delete (Existing : Name := "<SELECTION>";
                      Limit : Compilation.Change_Limit := "<DIRECTORIES>";
                      Response : String := "<PROFILE>")
        renames Compilation.Delete;

    -- Delete versions of objects designated by Existing.  Either an object
    -- must be selected, or the name of an object supplied.


    -- Results will be reversible with Undelete, unless retention count = 0.

    procedure Destroy (Existing : Name := "<SELECTION>";
                       Threshold : Natural := 1;
                       Limit : Compilation.Change_Limit := "<DIRECTORIES>";
                       Response : String := "<PROFILE>")
        renames Compilation.Destroy;

    -- Destroy versions and associated declarations designated by Existing.
    -- Destroyed versions are expunged and cannot be undeleted.

    procedure Undelete (Existing : Name := "<CURSOR>";
                        Response : String := "<PROFILE>");

    -- Undelete an Existing version.

    -- Only a fixed number of deleted versions will be retained.  Excess
    -- versions will be automatically expunged, at which time they can no
    -- longer be undeleted.

    Default_Keep_Versions : constant := -1;

    -- Keep the default number of deleted versions.

    procedure Expunge (Existing : Name := "<IMAGE>";
                       Keep_Versions : Integer := 0;
                       Recursive : Boolean := True;
                       Response : String := "<PROFILE>");

    -- Make deletions permanent.  Recursive causes subobjects to be
    -- expunged.  Keep_Versions deleted versions will be retained.
    -- Recursive causes subobjects to be touched.  Use Recursive => false
    -- and "?" wildcard to avoid expunging nested worlds.


    procedure Set_Retention_Count
                 (Existing : Name := "<IMAGE>";
                  Keep_Versions : Integer := Library.Default_Keep_Versions;
                  Recursive : Boolean := True;
                  Response : String := "<PROFILE>");

    -- Set the default number of deleted versions of an object which are
    -- retained.  Default is the same as the object's parent.  Recursive
    -- causes subobjects to be touched.  Use Recursive => false and "?"
    -- wildcard to avoid setting retention count for nested worlds.


    procedure Freeze (Existing : Name := "<IMAGE>";
                      Recursive : Boolean := True;
                      Response : String := "<PROFILE>");

    -- Prevent further changes to an object.  Recursive causes subobjects to
    -- be frozen.  Use Recursive => false and "?" wildcard to avoid freezing
    -- nested worlds.

    procedure Unfreeze (Existing : Name := "<IMAGE>";
                        Recursive : Boolean := True;
                        Response : String := "<PROFILE>");

    -- Permit changes to an object.  Recursive causes subobjects to be
    -- unfrozen.  Use Recursive => false and "?" wildcard to avoid
    -- unfreezing nested worlds.


    procedure Default (Existing : Name := "<SELECTION>";
                       Response : String := "<PROFILE>");

    -- Set the default Version for the existing object and print the result
    -- as a message.


    procedure Set_Subclass (Existing : Name := "<SELECTION>";
                            To_Subclass : String := "";
                            Response : String := "<PROFILE>");

    -- Set the subclass of an object.  A null string for To_Subclass
    -- requests the system to set the subclass to its 'best guess'.

    type Field is (Object,       -- Ada name.
                   Version,      -- Version name.
                   Class,        -- Directory class name.
                   Subclass,     -- Subclass of the object.
                   Updater,      -- User to last update object.
                   Update_Time,  -- Time of last update.
                   Creator,      -- User who created object.
                   Create_Time,  -- Time of creation.
                   Reader,       -- User to last read object.
                   Read_Time,    -- Time of last read.
                   Size,         -- Current size of object.
                   Status,       -- Source, Installed, Coded, Elaborated, etc.
                   Frozen,       -- Is this object frozen.
                   Retain,       -- Max. number of deleted versions retained.
                   Declaration   -- Ada declaration of object.
                   );

    type Fields is array (Field) of Boolean;
    Verbose_Format : constant Fields := Fields'(Object .. Update_Time => True,
                                                Size .. Retain => True,
                                                others => False);
    Ada_Format : constant Fields :=
       Fields'(Status => True, Declaration => True, others => False);
    All_Fields : constant Fields := Fields'(others => True);
    Terse_Format : constant Fields := Fields'(Object => True, others => False);


    procedure List (Pattern : Name := "<IMAGE>@";
                    Displaying : Fields := Library.Terse_Format;
                    Sorted_By : Field := Library.Object;
                    Descending : Boolean := False;
                    Response : String := "<PROFILE>";
                    Options : String := "");

    procedure Verbose_List (Pattern : Name := "<IMAGE>{@'V(ALL)}";
                            Displaying : Fields := Library.Verbose_Format;
                            Sorted_By : Field := Library.Object;
                            Descending : Boolean := False;
                            Response : String := "<PROFILE>";
                            Options : String := "") renames List;

    procedure File_List (Pattern : Name := "<IMAGE>@'C(FILE)";
                         Displaying : Fields := Library.Verbose_Format;
                         Sorted_By : Field := Library.Object;
                         Descending : Boolean := False;
                         Response : String := "<PROFILE>";
                         Options : String := "") renames List;

    procedure Ada_List (Pattern : Name := "<IMAGE>@'C(ADA)";
                        Displaying : Fields := Library.Ada_Format;
                        Sorted_By : Field := Library.Declaration;
                        Descending : Boolean := False;
                        Response : String := "<PROFILE>";
                        Options : String := "") renames List;


    procedure Space (For_Object : Name := "<IMAGE>";
                     Levels : Positive := 2;
                     Recursive : Boolean := True;
                     Each_Object : Boolean := False;
                     Each_Version : Boolean := False;
                     Space_Types : Boolean := False;
                     Response : String := "<PROFILE>";
                     Options : String := "");

    -- Show the space utilization (in pages) for For_Object.  Also
    -- display space usage for contained libraries to depth specified
    -- by Levels.  The space includes subobjects and contained libraries,
    -- unless Recursive is false, in which case only the space for the
    -- specified object is displayed.  Thus, if Recursive is true, the
    -- space is cumulatively totalled.
    --
    -- Each_Object causes the individual space the each object to be included
    -- in the display in addition to libraries.
    --
    -- If Space_Types is true, a different display showing space broken down
    -- by category (including the object itself, code segment, attribute
    -- spaces, and list files) is displayed.  In this case, the Each_Version
    -- parameter will show information for each version of each object.
    -- Each_Version is used only if Space_Types true.  Levels is used only
    -- if Space_Types is false.



    procedure Compact_Library (Existing : Name := "<SELECTION>";
                               Response : String := "<PROFILE>");
    -- This procedure may be used to reduce the amount of storage consumed
    -- by frequently modified directories which are used to store files.

    -- Quiet forms similar to those in Library_Object_Editor, but
    -- these commands work based on the current context rather than
    -- the current image.

    procedure Create_World (Name : Library.Name := ">>WORLD NAME<<";
                            Kind : Library.Kind := Library.World;
                            Vol : Volume := Library.Nil;
                            Model : String := "!Model.R1000";
                            Response : String := "<PROFILE>") renames Create;

    procedure Create_Directory (Name : Library.Name := ">>DIRECTORY NAME<<";
                                Kind : Library.Kind := Library.Directory;
                                Vol : Volume := Library.Nil;
                                Model : String := "";
                                Response : String := "<PROFILE>")
        renames Create;

    procedure Create_Unit (Name : Library.Name := ">>ADA NAME<<";
                           Kind : Library.Kind := Library.Subpackage;
                           Vol : Volume := Library.Nil;
                           Model : String := "";
                           Response : String := "<PROFILE>") renames Create;


    procedure Display (Name : Library.Name := "[]");
    -- Display the named object in a library window.

    procedure Reformat_Image (Existing : Name := "<SELECTION>";
                              Response : String := "<PROFILE>");
    -- Cause the image for a unit to be reconstructed.

    pragma Subsystem (Commands);
    pragma Module_Name (4, 3921);
end Library;

E3 Meta Data

    nblk1=13
    nid=0
    hdr6=26
        [0x00] rec0=1c rec1=00 rec2=01 rec3=072
        [0x01] rec0=19 rec1=00 rec2=02 rec3=00c
        [0x02] rec0=18 rec1=00 rec2=03 rec3=072
        [0x03] rec0=17 rec1=00 rec2=04 rec3=016
        [0x04] rec0=14 rec1=00 rec2=05 rec3=064
        [0x05] rec0=0e rec1=00 rec2=06 rec3=03a
        [0x06] rec0=13 rec1=00 rec2=07 rec3=078
        [0x07] rec0=1a rec1=00 rec2=08 rec3=050
        [0x08] rec0=15 rec1=00 rec2=09 rec3=008
        [0x09] rec0=17 rec1=00 rec2=0a rec3=004
        [0x0a] rec0=18 rec1=00 rec2=0b rec3=01e
        [0x0b] rec0=16 rec1=00 rec2=0c rec3=02e
        [0x0c] rec0=18 rec1=00 rec2=0d rec3=028
        [0x0d] rec0=11 rec1=00 rec2=0e rec3=052
        [0x0e] rec0=14 rec1=00 rec2=0f rec3=02c
        [0x0f] rec0=14 rec1=00 rec2=10 rec3=030
        [0x10] rec0=15 rec1=00 rec2=11 rec3=016
        [0x11] rec0=12 rec1=00 rec2=12 rec3=00c
        [0x12] rec0=15 rec1=00 rec2=13 rec3=000
    tail 0x21722363e83c1727fb81a 0x42a00088462060003