1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
MKID(1) General Commands Manual MKID(1)
NAME
mkid - make an id database
SYNOPSIS
mkid [-v] [-fout-file] [-sdirectory] [-rdirectory] [-Sscanarg] [-aarg-file] [-] [-u]
[files...]
DESCRIPTION
Mkid builds a database that stores numbers and identifier names, as well as the names of
the files in which they occur. Mkid is particularly useful with large programs spread out
across multiple source files. It serves as an aid for program maintenance and as a guide
for perusing a program.
The following options are recognized:
-v Verbose. Report mkid's progress in building the database. The output comes on
standard error.
-fout-file
Write the finished database into out-file. ID is the default. Normally the
names of the files scanned are written to the database as specified in the argu-
ment list. If the database sepcified with -f is not located in the current di-
rectory, then the file names are adjusted so that they are relative to the di-
rectory that the database is located in.
-sdirectory
-rdirectory
If mkid's attempt to open a source-file fails, it will try to checkout the cor-
responding SCCS or RCS file if present. The -s option tells mkid which direc-
tory holds the SCCS file. Similarly, the -r option tells mkid which directory
holds the RCS file. If neither the RCS or SCCS directories are specified, mkid
will first look for an SCCS file in the current directory, then in sccs, and fi-
nally in SCCS. It will then look for an RCS file in the current directory, and
finally in RCS.
-aarg-file
Open and read arg-file in order to obtain a list of source file arguments.
Source file names must appear one to a line. -S, -r, and -s arguments may also
be placed one per line in file. They are distinguished from source file names
by their leading `-'. If a file name begins with `-', it can be distinguished
from an argument by explicitly prepending the current directory string: `./'.
- This operates in the same manner as the -a option described above, but reads
from the standard input instead of a file.
-u Update an existing database. Only those files that have been modified since the
database was built will be rescanned. This is a significant time-saver for up-
dating large databases where few sources have changed.
files... If neither the -a, -, nor -u, arguments have been specified, take file names
from the command line.
-Sscanarg Mkid scans source files in order to obtain numbers and identifier names. Since
the lexical rules of languages differ, mkid applies a different scanning func-
tion to each language in order to conform to that language's lexical rules.
Mkid determines the source file's language by examining its filename suffix
which commonly occurs after a dot (`.'). The -S argument is a way of passing
language specific arguments to the scanner for that language. This argument
takes a number of forms:
-S<suffix>=<language>
-S<language>-<arg>
+S-<arg>
-S<lang>/<lang>/<filter>
The first form associates a suffix with a language. For example -S.c=vhil would
cause all .c files to be scanned as though they were language vhil rather than
c. You may find out which suffixes are defined for which languages with the
following options: `-S<suffix>=?' tells which language is bound to <suffix>,
`-S?=<language>' tells which suffixes are bound to <language>, and `-S?=?' re-
ports all bindings between suffixes and languages.
The second form passes an argument for processing by the scanner for a specific language.
The third form passes an argument to all scanners.
Finally, the <lang>/<lang>/<filter> form defines a shell command to filter the file with.
This can be used to run an arbitrary program to filter the contents of a file before it is
passed to one of the existing language scanners. It is typically used in conjunction with
the plain text scanner. The first <lang> defines a new language, the second <lang> speci-
fies an existing language whose scanner will be used, and the remaining <filter> is an ar-
bitrary shell command.
You may get a brief summary of the scanner-specific options for a language by supplying
the following option: `-S<language>?'.
Here is a brief summary of the options for the `asm' (assembler) language.
The -u option controls whether or not the assembler scanner should strip off a leading un-
derscore (`_') character. If your assembler prepends an underscore to external symbols,
then you should tell the scanner to strip it off, so that references to the same symbol
from assembly and from a high-level language will look the same.
The -c<cc> option supplies the character(s) used to begin a comment that extends to the
end of the line.
The -a<cc> option indicates character(s) that are legal in names, in addition to the al-
pha-numeric characters. If the option appears as `-a', names that contain these charac-
ters are ignored. If it appears as `+a', these names are added to the database.
BUGS
This manual page needs to be more complete about the scanner-specific arguments.
At the moment, the only scanners implemented are for C, assembly language, and plain text.
There ought to be scanners for Ada, Pascal, Fortran, and Lisp.
SEE ALSO
lid(1), deroff(1), detex(1).
MKID(1)
|