DETAB-Z Version 1.4 Gene Pizzetta November 28, 1990 DETAB-Z replaces ASCII tabs in text files with the correct number of spaces. No other characters are affected: control characters are not removed, high-bits are not reset. Under ZSDOS create file stamps are preserved. For ZCPR3 only. USAGE: DETABZ {dir:}infile {dir:}{outfile} {{/}options} If no DU or DIR is given, the current default drive/user is assumed. 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 a filetype of BAK. Filenames beginning with a slash must be preceded by a DU specification. OPTIONS: A leading slash is not required if an output file specification is given. n Increment for tab expansion. n must be between 1 and 255. The default is 8, as used by CP/M and MS-DOS, unless configured for another default value. Q Toggles current quiet mode setting. Quiet mode is set by the ZCPR3 quiet flag or by a configuration option. The quiet flag is given priority, if it is set. Option Q toggles the current mode. DATE STAMPING: If the original file has a create file stamp, then the stamp will be transferred to the new file. Unlike some other utilities, a blank create stamp will not be transferred. In that case, if the original file has a modification date, that modification date will become the create date of the new file. Otherwise, the new file's create stamp will be the current date. Date stamp transfer will work only under ZSDOS and ZDDOS. ERRORS: If "//" or a null command tail is given, DETAB-Z will display a brief usage message. All other errors will cause invocation of the error handler, if one is installed. In addition, the program error flag will be set to standard ZCPR 3.4 error codes: 2, invalid directory; 8, ambiguous or missing filename; 9, bad numerical expression; 10, source file not found; 11, disk full; 12, insufficient memory; 19, invalid option; or 4, any other error. CONFIGURATION: DETAB-Z may be configured to default to quiet mode using ZCNFG and the configuration file, DETABZnn.CFG. The default tab increment of 8 may also be changed, although the vast majority of users will want to leave it as is for CP/M and MS-DOS compatibility. Do not change the name of the CFG file or ZCNFG will not be able to find it automatically. HISTORY: There are times that I'm editing an ASCII file under WordStar when I realize that the file contains tab characters. Unfortunately, many filter programs -- like FILT7 -- reset high bits and remove control characters, messing up the editing already done. To solve that problem I wrote DETAB-Z, which also uses the full facilities of the Z-system. Version 1.4 -- November 28, 1990 -- Gene Pizzetta Increased size of input buffer and made several other changes to speed up processing. 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 from Howard Goldstein to improve the code. Version 1.3 -- October 5, 1990 -- 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, mostly at the suggestion of Howard Goldstein. (Thanks, Howard.) Version 1.2 -- September 22, 1990 -- Gene Pizzetta Corrected bug that caused incorrect error messages to be displayed under some circumstances. Version 1.1 -- September 1, 1990 -- Gene Pizzetta If source file has a modify date, but no create date, the original modify date will become the create date of the new file. Version 1.0 -- August 25, 1990 -- Gene Pizzetta Initial release. Gene Pizzetta 481 Revere Street Revere, MA 02151 Newton Centre Z-Node: (617) 965-7259 Ladera Z-Node Central: (213) 670-9465 GEnie: E.PIZZETTA Voice: (617) 284-0891