lid
: Querying an ID Database by TokenThe `lid' program accepts patterns on the command line which it matches against the tokens stored in an ID database. The interpretation of a pattern is determined by the makeup of the pattern string itself, or can be overridden by command-line options. If a pattern contains regular expression meta-characters, it is used to perform a regular-expression substring search. If no such meta-characters are present, pattern is used to perform a literal word search. (By default, all searches are sensitive to alphabetic case.) If no pattern is supplied on the command line, `lid' lists every entry in the ID database.
`lid' reads the ID database, therefore it accepts the `--file' option, and consults the `IDPATH' environment variable, as described in section Options for Programs that Read ID Databases. `lid' lists file names, therefore it accepts the `--separator' option, as described in section Options for Programs that List File Names.
In addition, lid
accepts the following command-line options:
$ lid --key=token '^dest.' destaddr libsys/memcpy.c destination libsys/regex.c destlst libsys/rx.c destpos libsys/rx.c destset libsys/rx.h libsys/rx.c $ lid --key=pattern '^dest.' ^dest. libsys/rx.h libsys/{memcpy,regex,rx}.c $ lid --key=none '^dest.' libsys/rx.h libsys/{memcpy,regex,rx}.cWhen `--key' is either `token' or `pattern', the first column of output is a token or pattern, respectively. When `--key' is `none', neither of these is printed, and the file name list begins immediately. The default is `token'.
eid
: Invoking an Editor on Query Results). When
style is `none', the file names are not processed in any way.
This can be useful if you wish to see what tokens match a pattern,
but don't care about where they reside.
..
m. Either limit of the range may be omitted (e.g.,
..
m, or n....
). If the lower limit n is
omitted, it defaults to 1
. If the upper limit is omitted, it
defaults in the present implementation to 65535
, the maximum
value of an unsigned 16-bit integer.
Particularly useful queries are `lid -F1', which helps locate
identifiers that are defined but never used, or are used but never
defined. Similarly, lid -F2
can help find functions that possess
a prototype declaration and a definition, but are never called.
Go to the first, previous, next, last section, table of contents.