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 - download
Index: ┃ T V

⟦8de86403f⟧ TextFile

    Length: 6239 (0x185f)
    Types: TextFile
    Names: »V«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦9b46a407a⟧ 
            └─⟦12c68c704⟧ 
                └─⟦this⟧ 
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS 
    └─ ⟦91c658230⟧ »DATA« 
        └─⟦458657fb6⟧ 
            └─⟦220843204⟧ 
                └─⟦this⟧ 

TextFile

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;