QFIND CEDAR 10.0 FOR INTERNAL XEROX USE ONLY QFind -- a quick simple file search program Richard E. Sweet c Copyright 1987, 1990, 1992 Xerox Corporation. All rights reserved. Abstract: QFind is a file scanning program similar in spirit to Grep. It lacks most of the functionality of Grep, but makes up for it by being 3-4 times as fast. Created by: Richard E. Sweet Maintained by: Michael Plass:PARC:Xerox Keywords: searching XEROX Xerox Corporation Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, California 94304 For Internal Xerox Use Only QFind is a file scanning program similar in spirit to Grep. It lacks most of the functionality of Grep, but makes up for this by being 3-4 times as fast. It finds only simple text keys (no regular expressions, wild cards, etc.). QFind has the following optional switches, which must immediately follow the command name: -c be case sensitive -f list file names only -o open files successfully searched -d search the files in the Directory and Exports clauses of the named DF file -m use source version maps to supply directory information -p print file position of first match along with name (useful with -f only) -q the last option; use if your search key begins with a dash -r DF/module search -s print the short names of the files and separate the file listings -w match words only Typical usages: QFind QFind -c QFind -c -f -m QFind -fcm QFind -d QFind -d QFind -wc -r [PCedar2.0]PCedar.df ViewersWorldExtras.CallWhenWorldSet QFind -wc CallWhenWorldSet $(CitingFiles ViewersWorldExtras) QFind -wc -r $ ViewersWorldExtras.CallWhenWorldSet $(CitingFiles ViewersWorldExtras) If contains blanks, it must be enclosed in quotes ("). This is approximately equivalent to Grep -o [-c] [-w] . The number of matches reported by the two programs differs in that QFind, after printing out the line containing a match, doesn't bother to look on the rest of that line for further matches. A DF/module search is useful for answering the question: who references item X from interface Y? The key must be of the form Y.X. The DF files given with the -r switch are elaborated. Whenever a suite either defines or imports Y.mob, the source files in that suite are considered. The source files resulting from all command switches are filtered according to whether they include the token Y; those that pass are searched for X. A suite is the DFs (excluding the subsidiary suites) included in a DF whose base name either ends in "-Suite" or lacks a dash. The base name of a file name is the part of the last component before its extension. For example, [PCedar2.0]PCedar.df heads a suite, which includes a bunch of other DFs that head their own suites; there is only one DF (PCedar.df itself) in the suite headed by PCedar.df. QFind uses the Boyer-Moore sub-linear search algorithm; the longer the key, the faster the search.  QFindDoc.tioga Richard E. Sweet, December 5, 1985 10:51:45 am PST Eric Nickell, March 25, 1987 10:44:52 pm PST Bloomenthal, October 8, 1990 12:06 pm PDT Michael Plass, February 20, 1992 1:37 pm PST Last tweaked by Mike Spreitzer February 7, 1992 6:05 pm PST If needed, a ".mesa" extension is supplied before version-map lookup Same as above; switches without arguments may be combined for brevity Searches the files in the list, plus those in the Directory clauses of the named DF file Searches for uses of ViewersWorldExtras.CallWhenWorldSet in the PCedar release. Searches for uses of ViewersWorldExtras.CallWhenWorldSet in the PCedar release --- much more efficiently, since /r/PCedar.depends is consulted to find the list of candidate files. Like above, but tests in a slightly more specific way (the file must contain the token "ViewersWorldExtras" as well as "CallWhenWorldSet"). This command assumes there's no DF "$". LNewlineDelimiter (cedardoc) styleMark LastEditedJ LastEdited22J LastEdited,Icode LastEdited)K LastEdited,K LastEdited;J LastEditedIunleaded centerHeadersL centerFooter sy)ItitleIsubtitle%%IauthorsIabstractmsDEPb P P 'P PI boilerplate CharProps%Postfix0.667 1.0 1.0 textColor qo boxIblockRR ZR R"R% 1KD -KER$ 4KXX JJKOO <