FF (Find File) Version 2.4 01/19/90 FF finds all files matching a list of file specs on all drives, a specific drive, or a list of drives. All file specs are automatically made wild (that is, "A.B" becomes "A*.B*"). ================================================================= U S A G E ================================================================= FF [D: or DIR:]afn[,afn]... [d...][/o...] Options (d) before the slash: List of drives to scan Options (o) after the slash: E Exact matches only (no auto wildcarding). P No Paging of output. S Toggle inclusion of System files based on default configuration (see below). System files are never included unless the Wheel byte is set. The program error flag set to 0ffh if no matching files are found, or to 1 if the program is aborted by the user. The number of matching files found is put in a register. (By default register 0 is used, but the register to be used can be configured. See below.) If a drive or drive list is not included on the command line, the drives set in the drive vector are automatically scanned. The first drive, DU:, or DIR: reference in the list of files to seek restricts the search to that drive only. Others, including the optional drive list, are ignored. The drive specification may be part of ANY of the file specifications and is NOT limited to being part of the first file listed as implied by the Syntax description. (version 2.4) The '/' before the non-drive options may be preceded by spaces, and may be replaced with a space. Spaces may also be present around the non-drive options. ================================================================= C O N F I G U R A T I O N ================================================================= FF24 is configurable with ZCNFG V1.7. Defaults for the three command line non-drive options may be configured. The command line options then toggle these defaults for the duration of a single execution of FF. The list of drives (drive vector) is also configurable with ZCNFG, a major improvement over the former patching method. Two new default drive search vectors may be configured, one based on the currently logged drives and the second based on drives represented by entries in the current NDR (named directories). The use of named directories may be subject to wheel byte status. These configuration options are useful for ensuring system security in a RAS environment, and for helping to prevent access to empty floppy drives. Help screens in the configuration file give more details of the options and their configuration. ================================================================= * * * I M P O R T A N T N O T E * * * ================================================================= This program is copyright 1987 by NAOG/ZSIG. It may be copied and modified freely for personal use but may not be sold or distributed for a fee. Modified versions must be submitted to and approved by NAOG/ZSIG before they may be distributed. See the file ZSIGPOL1.DOC on Z-Nodes for the ZSIG policy on signing out and modifying programs. ================================================================= R E V I S I O N H I S T O R Y ================================================================= FF was derived from FINDF version 26. FINDF was originally created by Richard Conn. See the history in FINDF for a chronology of contributions by others, including Howard Goldstein, Joe Wright, Al Hawley, Rick Peterson, and Bruce Morgen. I have given this program the new name FF so that it can develop in different directions without interfering with Echelon's need to support the utilities it provides with its commercial versions of Z-System. Jay Sage, 1987 Version 2.4x3 -- 19 Jan 91, by Al Hawley Added configuration option to restrict search to named directories for non-wheels and within drive map constraints. Passworded directories are not searched. Modified pagination algorithm so that the 'more' message is not issued when there is no more to display. This happened in previous versions when the display exactly filled the screen. Added option to remove display of "DISC --" title lines. Revised drive select option logic for functional modularity and logical conciseness. Revised memory allocation so that the FN table and the ORDER table are dynamically sized to minimize memory usage. Replaced filename parsing code in GETFN with a call to ZFNAME from Z3LIB. Removed unneccessary code and optimized code in a number of places. Moved all code for console display from other routines into the PRFILES routine. Simplified memory allocation by using Z3LIBs GZMTOP routine. Version 2.4x2 -- 3 Jan 91 Joe Wright Provided code for Type 1 or Type 3 header. Removed code to save/restore current drive (not needed). Use ANDHD and ORHD from SYSLIB in a couple of places. Help screen to show drives like AB_D_. instead of ABD. Version 2.4x1 -- Al Hawley, 12/30/90 (x1 means Beta version 1) FF24 has been made configurable with ZCNFG, per Howard's prompting. The current configuration option settings are reflected in the HELP screen. Changed the drive vector back to the structure used by BDOS and the ZCPR3x extended env. The 'human' oriented structure is no longer needed now that ZCNFG makes it easy and natural to modify the drive vector. Most of the sorting code has been removed and replaced with calls to the sort routines in SYSLIB4C. These new syslib routines are MUCH faster than the old ones. The source has been extensively edited, with a view toward better readability. Archaic comments were removed, and some new ones added where comprehension could be enhanced. The command line syntax has been relaxed a bit to allow white space AFTER the drive list, and the '/' before the option field may be replaced with white space. Included Z3PLUS code optimization from the unreleased version 2.3 which deletes unnecessary BIOS selects. Version 2.3 -- Never released Version 2.2 -- Howard Goldstein, January 12, 1990 Modified exit logic so that the number of files found is placed in the regiter even when the program is aborted by the user. The error flag is set to 1 on user abort. Rewrote Gene Pizzetta's fixes from version 2.1 to get the COM file back down to 3k. Fixed logic to allow one more line on first screen of paged output. Version 2.1 -- Gene Pizzetta, December 30, 1989 Added configuration byte (SYSF label in first record) to include or exclude SYStem files as the default. A non-zero value causes system files to be included, but the byte will be ignored if the wheel byte is off. "S" option now toggles current default. Help screen modified to reflect default setting. Created quick and dirty doc file from source code header and history (mainly so source code would fit into memory under ZDE). Version 2.0 -- Howard Goldstein, November 26, 1989 Fixed a bug which caused duplicate listing of files larger than 32 extents. Version 1.9 -- Carson Wilson, March 18, 1989 Release version. Cleaned up code. Carson Wilson may be reached at Antelope Freeway RAS, 312-764-5162, Chicago, where he is SYSOP. Version 1.8 -- Carson Wilson, March 9, 1989 Corrected check against the MAXDRV byte in the environment descriptor. Previous code allowed one drive beyond MAXDRV. Extracted new MASK routine from INIT so that it can be called after any drive options are processed. This enforces the valid drive vector from the environment descriptor regardless of the setting of the MAXDRV byte. Thanks to Howard Goldstein for discovering both of these faults. Version 1.7 -- Carson Wilson, March 4, 1989 Fixed up bug created in version 1.6 which caused "FF /" command to list all files. Also made help command more restrictive: only "FF" or "FF//" (exactly) now give help - other commands (e.g., "FF /" or "FF // ") are interpreted as filespecs. Planned enhancements: Make the drive vector into a word for easier coding. Create a .CFG file to allow use of Al Hawley's ZCNFG menu-driven installer with FF. Version 1.6 -- Carson Wilson, March 2, 1989 Following Bridger Mitchell's suggestion, Help is no longer generated by a single slash as a parameter, allowing files beginning with the slash character to be searched for. Also changed page prompt to reflect multiple abort keys (says "RETURN=page" instead of "OTHER=page"). Version 1.5 -- Carson Wilson, February 26, 1989 Added "REG#" ASCII pointer to the patch byte controlling which register is used to store the number of matches found. The default is register zero. Change the register by substituting a BINARY value from 1 to 9 at this storage location. Following Howard's suggestion, FF now allows all abort characters for all abort tests, instead of just the interpage abort test. Version 1.4 -- Carson Wilson, February 23, 1989 Now allows abort with ^C, c, C, ^K, k, K, ^X, x, or X between pages of paged output. Version 1.41x -- Howard Goldstein, February 18, 1989 Fixed use of system valid drive vector. It is now logically ANDed with the table in the program. Version 1.3 -- Bridger Mitchell, July 4, 1988 Exit with BIOS, then BDOS drive-select. Version 1.2 -- Bridger Mitchell, February 29, 1988 Added extended environment valid-drive vector. Version 1.1 -- Bridger Mitchell, November 14, 1987 Added CP/M 3 compatibility. Converted directory searches to BDOS calls, for compatibility with DosDisk and other BDOS emulators. Removed IX register use, for compatibility with BIOS/DOS systems that mistakenly fail to preserve z80 registers. Added check for presence of external environment. Uses full TPA if CCP is protected. Search every valid BIOS drives whose bit is set in the DRVTBL; previous versions aborted on the first invalid drive. Version 1.0 -- Jay Sage, March 14, 1987 Added the DRVTBL configuration word at the beginning of the code. This word contains a bit for each possible drive in a system. When the user has not indicated a specific drive to scan, each drive is checked against this table and skipped if the bit is not set. This allows FF to work in systems with holes (e.g., drives A, B, and F) in which the BIOS hangs when a drive is accessed that does not exist or has no disk in it. As distributed, FF has FFFFH in this word so that all drives up to the max drive specified in the environment will be scanned. Added more flexibility to output paging. The output can be paged a line at a time by hitting the space bar or can be aborted at a page break by hitting control-C. Enhanced syntax to allow specifying a list of drives to be scanned in the option field. Added code to set program error flag if no files found and to clear the flag if files were found. The number of files found is stored in a configurable user register. If the number is more than 255, the value 255 is stored. As distrubuted, register 0 is used. Added code to treat all file specs as ambiguous. Thus, "FF A" is equivalent to "FF A*.*" and "FF A.B" is equivalent to "FF A*.B*". This feature can be disabled with the E option.