home *** CD-ROM | disk | FTP | other *** search
- UnNum utility - remove line sequence numbers
- ----------------------------------------------
-
- This application is a specialised utility which removes standard
- line numbers from files which have been downloaded from IBM
- mainframes.
-
- If you use !EDIT or TWIN, it is normally easier to edit these
- files without the line numbers, since they make for longer lines
- which can be too wide to fit on a single line in the edit window.
- In many cases, these line sequence numbers are not actually
- required and the files only become sequenced in the first place
- because the mainframe editor automatically inserts the numbers.
-
- The line numbers could, of course, be removed before downloading
- from the mainframe, but this is often overlooked (at least I
- often overlook them - hence this utility).
-
- UnNum can be used from the desktop (by means of an application
- using a BootA front-end) or from the command line.
-
- To use it from the desktop, simply double click on the !UnNum
- icon to install the application on the icon bar. Then drag files
- you want unnumbered to the icon to process them. Any special
- options can be set via the "CmdOpts" choice in the menu (see
- below for an explanation of these options).
-
- To use from the command line, copy the "UnNum" application from
- the !UnNum application directory to your Library directory, and
- then issue the "UnNum" command with suitable arguments as
- described below.
-
- UnNum distinguishes automatically between two different types of
- files:
-
- (1) Card-image files, which have a fixed line length of 80
- characters and are sequenced in columns 73-80. These are
- unnumbered by deleting these columns and by further deleting
- any trailing blanks.
-
- (2) Other files which have variable line lengths and are
- sequenced in columns 1-8. These are unnumbered by deleting
- these columns plus any trailing blanks.
-
- To be eligible for unnumbering the following conditions must be
- met:
-
- - the file type must be TEXT (hex FFF)
- - each line must have valid decimal digits (with leading
- zeros) in the appropriate sequence number columns
- - the remain columns must contain only printable characters.
-
- Any file which does not meet these conditions will be rejected.
-
- UnNum will also convert any DOS standard CR/LF (hex 0d0a) end-of-
- line character combinations it encounters in the input file to
- standard Archimedes newline characters (i.e. just LF (hex 0A))
- and will truncate the file if it comes across a DOS CTRL-Z (hex
- 1A) EOF character.
-
- UnNum can process multiple files in one command. It will accept
- as an argument:
-
- - a single file name
- - a directory name
- - a wildcarded file or directory name.
- - recursively (i.e. all text files in the specified directory
- and all subordinate directories) if required.
-
- It only processes files with a file-type of "text" (hex FFF).
- Using the desktop !UnNum application (with BootA assisted front-
- end), you can drag a text file or a directory to the !UnNum icon
- on the icon bar to process, respectively, the single file or all
- the text files in the directory.
-
- If you are using UnNum as a command (without the !UnNum front-
- end) you specify the text file, directory or wild-carded name as
- an argument:
-
- e.g. *UnNum myfile
- *UnNum mydir
- *UnNum myfil*
-
- If you specify a wildcarded name it will process all text files
- that match the name, or if there are no matching files it will
- treat the name as a wildcarded directory name and process the
- first matching directory. If the recursion option is specified
- (see below), then all matching text files are processed plus all
- the text files in any matching directories plus all their
- subordinate directories.
-
- Four options can also be specified as arguments (via the CMDOPTS
- option of the !UnNum menu):
-
- (1) The OVERWRITE option (specified as "-o") which causes the
- unnumbered file to be written back to disk with the same
- name as the original input file (otherwise the output file
- is written back to disk with a name formed by adding a
- prefix to the front of the input file name).
-
- (2) The PREFIX option (specified as "-p") which sets the prefix
- that will be added to the front of the input file name to
- form the output file name (when OVERWRITE not in effect).
- The prefix can be one or more characters and must follow
- the "-p" in the arguments:
-
- e.g. set CMDOPTS to "-p X"
- or "-p outdir."
-
- The prefix string cannot begin with "-". If not specified a
- prefix of "_" is used.
-
- (3) The RECURSION option (specified as "-r") which causes all
- subdirectories to be processed. If you use the !UnNum
- application from the desktop and set CmdOpts to "-r", then
- dragging a directory to the !UnNum icon will unnumber all
- text files in that directory and any subdirectories. If you
- are using UnNum from the command line, then the effect is
- similar:
-
- e.g. *UnNum mydirect -r
-
- (4) The TEST option (specified as "-t") which stops the output
- file being written and can be used to check what files would
- be converted if you specify a directory name or a wildcarded
- filename.
-
- The default choices for these options can be set via the !CmdOpts
- file in the !UnNum application directory.
-
- When specifying more than one option at the same time, separate
- the option letters (and any following values) by spaces:
-
- e.g. set CMDOPTS to "-l ram:list -p X -r"
-
- For a summary of the syntax of the *UnNum command, either issue
- the command without any arguments, or click on the !UnNum icon
- after installing it on the icon bar. To cause the output from
- this to be written to a disk file, use redirection:
-
- e.g. *UnNum >listfile
-
- or set "CMDOPTS" on the !UnNum icon menu to "{ > listfile }".
-
- UnNum will also convert any DOS standard CR/LF (hex 0d0a) end-of-
- line character combinations it encounters in the input file to
- standard Archimedes newline characters (i.e. just LF (hex 0A))
- and will truncate the file if it comes across a DOS CTRL-Z (hex
- 1A) EOF character.
-
- UnNum was written in C and compiled with the AcornSoft ANSI C
- Compiler Version 4. It requires the Acorn Floating Pointer
- Emulator and Shared C Library relocatable modules to be
- installed. See the !RunA file in the !UnNum application directory
- for specific version details.
-
- Copyright notice
- ----------------
-
- UnNum is subject to Copyright.
-
- Permission is granted by the author to any recipient of this
- material to use and make/disseminate copies of the application
- provided that no charges are made for doing so (other than to
- cover any cost of media or postage) and that this notice is
- included with all copies.
-
- Paul Witheridge - 04 December 1991.
-
-