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

⟦2de23d311⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package File_Utilities, pragma Module_Name 4 3929, pragma Subsystem Os_Commands, seg_001b70

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



package File_Utilities is

    subtype Name is String;
    Current_Output : constant Name := "";

    procedure Difference (File_1            : Name    := "<REGION>";
                          File_2            : Name    := "<IMAGE>";
                          Result            : Name    := "";
                          Compressed_Output : Boolean := False;
                          Subobjects        : Boolean := False);
    -- Find differences between two versions of an object.
    -- If Subobjects is True, subobjects are compared as well.
    -- Compressed output omits lines that are the same in both objects.
    -- Non-compressed output shows every line from both objects,
    -- only showing common lines once.

    procedure Merge (Original : Name := "";
                     File_1   : Name := "";
                     File_2   : Name := "";
                     Result   : Name := "");
    -- merge two variants of the same object into new version with all changes
    -- Result defaults to Current_Output = ""

    procedure Strip (Source : Name := "<SELECTION>"; Target : Name := "");
    -- take the output of Merge or Difference and create a clean file

    procedure Compare (File_1      : Name    := "<REGION>";
                       File_2      : Name    := "<IMAGE>";
                       Subobjects  : Boolean := False;
                       Ignore_Case : Boolean := False;
                       Options     : String  := "");
    -- find the first difference between two objects
    -- Subobjects=true causes subunits or units in a library to be compared
    -- as well as the named units.
    -- Ignore_Case=true causes upper and lower case to be treated as
    -- equivalent.
    -- Options include: Ignore_Blank_Lines:   causes only on-blank lines
    --                                        to be considered in the compare
    --                  File_2_Has_Wildcards: Interpret characters in File_2
    --                                        as possible Wildcards.  Wildcard
    --                                        characters include:
    --                                          ^ - negate next char
    --                                          ? - match any char
    --                                          % - match any Ada ident char
    --                                          $ - match any Ada delimiter
    --                                          \ - quotes next char
    --                                          { - beginning of line
    --                                          } - end of line
    --                                          [ - start of class
    --                                          ] - end of class
    --                                          * - zero or more of prev item
    --
    -- Use of Ignore_Case or Ignore_Blank_Lines slows the compare operation
    -- moderately with respect to a straight compare.  File_2_Has_Wildcards
    -- slows the compare dramatically and should only be used if you have
    -- a lot of time to wait.  The wildcard compare is conducted on a line-
    -- by-line basis.

    function Equal (File_1      : Name    := "<REGION>";
                    File_2      : Name    := "<IMAGE>";
                    Subobjects  : Boolean := False;
                    Ignore_Case : Boolean := False;
                    Options     : String  := "") return Boolean;
    -- Indicates whether the two files are the same
    -- See notes under Compare, above.

    procedure Find  (Pattern     : String  := "";
                     File        : Name    := "<IMAGE>";
                     Wildcards   : Boolean := False;
                     Ignore_Case : Boolean := True;
                     Result      : Name    := "");
    function  Found (Pattern     : String  := "";
                     File        : Name    := "<IMAGE>";
                     Wildcards   : Boolean := False;
                     Ignore_Case : Boolean := True) return Natural;
    -- find instances of Pattern in File, optionally using Wildcards

    procedure Append (Source : Name := ""; Target : Name := "<SELECTION>");
    -- append the contents of one file to another


    procedure Dump (File        : Name     := "<SELECTION>";
                    Page_Number : Natural  := 0;
                    Word_Number : Natural  := 0;
                    Word_Count  : Positive := 64);
    -- display a hex dump of the file.  A "word" is 16 bytes.
    -- Defaults dump the first page of the file.

    procedure Sort (File   : Name   := "<IMAGE>";
                    Result : Name   := "";
                    Key_1  : String := "";
                    Key_2  : String := "";
                    Key_3  : String := "");
    --
    -- Sort File using Key_n as sort keys.
    --
    -- Key_1 is most signficant.  Key_2 is ignored if Key_1 not specified, etc.
    -- No keys cause ascending Ascii sort on full-line compare.
    --
    -- Key_n follow form parameter syntax, parameters are first-character
    -- unique, so any prefix of the names is sufficient.
    --
    --     FIELD => number
    --
    --         Field is a field on the line.  Fields are non-blank characters
    --         separated by blanks.  Field 1 is the first field.  Field 1
    --         always includes column 1, even if blank.  If no field is given,
    --         the entire line, blanks included is the field.
    --
    --     START_COLUMN => number (default is 1)
    --
    --         The starting column relative to the start of the field.
    --
    --     END_COLUMN => number (default is Integer'Last)
    --
    --         The ending column relative to the start of the field.
    --
    --     REVERSE => true | FALSE
    --
    --         True implies sort descending for this key.
    --
    --     NUMERIC => true | FALSE
    --
    --         Perform the sort on the numeric value of the field represented
    --         as a Long_Integer.
    --
    -- Examples:
    --
    --     "F=2, S=5, E=7, R, N" will sort the field 2, columns 5 through 7,
    --     descending (reversed) using a numeric comparison.  Fully specified,
    --     "Field => 2, Start_Column => 5, End_Column => 7, Reversed, Numeric"
    --
    --     "S=10, E=>15" will sort using Ascii ordering columns 10 through 15
    --     of the entire line.


    pragma Subsystem (Os_Commands);
    pragma Module_Name (4, 3929);

end File_Utilities;

E3 Meta Data

    nblk1=8
    nid=0
    hdr6=10
        [0x00] rec0=16 rec1=00 rec2=01 rec3=092
        [0x01] rec0=13 rec1=00 rec2=02 rec3=024
        [0x02] rec0=0e rec1=00 rec2=03 rec3=096
        [0x03] rec0=15 rec1=00 rec2=04 rec3=00e
        [0x04] rec0=00 rec1=00 rec2=08 rec3=012
        [0x05] rec0=17 rec1=00 rec2=05 rec3=04e
        [0x06] rec0=1a rec1=00 rec2=06 rec3=04a
        [0x07] rec0=11 rec1=00 rec2=07 rec3=000
    tail 0x20100ef9c7da18d3f80c9 0x42a00088462065003