home *** CD-ROM | disk | FTP | other *** search
- ;
- UNJUST.COM
-
- Size (recs) CRC Version Author/Latest Issue Disk
- 4k (27) 0D9B 1.3 Gene Pizzetta 11/90 Z3COM23
-
- 1- Syntax/Options 2- Usage 3- Configuration 4- Notes
-
-
- UNJUST is a ZCPR3 utility that replaces multiple white-space character
- strings in text files with a single space. It removes all soft spaces and tab
- characters. It enforces two spaces after periods and removes all white-space
- at the beginning and (optionally) end of lines. Under ZDDOS and ZSDOS create
- date stamps are preserved. Vs 1.0 (9/22/90) by Gene Pizzetta.
- :1
- Syntax UNJUST {dir:}infile {dir:}{outfile} {{/}options}
-
- An infile name is required. If no outfile name is given, it will have the
- same name as the infile. If a file exists with the same name as the outfile,
- it will be renamed to filetype of BAK. Filenames beginning with a slash must
- be preceded by a DU specification.
-
- Options A preceding slash is necessary only if a second file
- specification is not given.
-
- Q Toggles quiet mode. Quiet mode is set by the ZCPR3
- quiet flag or by a configuration byte (see
- Configuration). Option Q toggles the current mode.
-
- T Leaves a single trailing space (except two spaces after
- a period, question mark, or exclamation point) at the
- end of lines that have existing trailing spaces.
- :2
- Usage - 1/2
-
- UNJUST replaces strings of hard and soft spaces and tabs with a single hard
- space (20h), except that white-space strings after a period, question marks,
- and exclamation points are reduced to two hard spaces. (If those punctuation
- marks had no space after them in the original file, no space will be added.)
- Leading spaces on a line are eliminated completely. Trailing spaces are
- eliminated by default, but the T option allows leaving spaces at the end of
- the line (which is desirable for ZDE and WordStar document files).
-
- Blocks of text delimited by a special tag character will be copied without
- changes. The tag character, as distributed, is ^P, but it can be changed (see
- Configuration section).
-
- Under ZDDOS and ZSDOS file create dates are preserved. If the input file
- has no create date, the old modification date will become the create date of
- the output file. If the input file has neither a create nor a modification
- date, the output file will have the current date.
- Usage - 2/2
-
- To unjustify a document, first scan the document with your favorite text
- editor to see if there are any sections, such as charts and tables, in which
- you want the spacing preserved. Mark the beginning and end of those sections
- with the tag character (^P, unless you change it). Then run the file through
- UNJUST. UNJUST will automatically remove the tag characters, but the text
- between them will be unchanged.
-
- You may then edit the file with WordStar. You will have to re-center
- titles and you will still have to remove hard carriage returns with ^^.
-
- On error UNJUST will set the program error flag to standard codes as listed
- in Z34ERR.LIB and invoke the error handler, if one is running.
- :3
- Configuration
-
- UNJUST is configured using the accompanying UNJUSTnn.CFG file and the ZCNFG
- utility. Do not rename the CFG file, so ZCNFG will always be able to find it,
- even if you change the name of UNJUST.
-
- UNJUST will run fine "out of the box", but if you wish you can use ZCNFG to
- make quiet mode the default, to preserve trailing spaces as the default, and
- to select a new tag character. The current quiet mode and trailing space
- status, and the tag character are reflected on the usage screen.
- :4
- UNJUST Notes - 1/2
-
- a. Vs 1.3 updates (11/28/90, Gene Pizzetta):
- - Corrected bug which caused UNJUST to occasionally try to rename the
- output file in the wrong directory.
-
- b. Vs 1.2 updates (11/23/90, Gene Pizzetta):
- - Increased size of input buffer and made several other changes to speed
- up processing.
- - Now removes trailing spaces.
- - T option allows leaving a single trailing space on lines where
- trailing spaces already exist (for ZDE compatibility).
- - Also now enforces two spaces after question marks and exclamation
- points.
- - Now properly handles files that do not end with a ^Z.
- - Corrected bug that caused two sectors of ^Z's to be added to a file if
- it ended exactly on a sector boundary.
- - Implemented several suggestions to improve the code.
- UNJUST Notes - 2/2
-
- b. Vs 1.1 updates (10/5/90, Gene Pizzetta):
- - Corrected bugs that caused unpredictable destination for outfile if no
- filespec was given and a jump to the wrong error routine if the input
- file was not found.
- - Now checks for sufficient TPA space.
- - Several other code optimizations