09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>XENIX</strong> Programming Programming Commands<br />

ctags -<br />

Syntax<br />

Creates a tags file.<br />

ctags [ -u 1 [ -w 1 [ -x 1 name ...<br />

Description<br />

ctags makes a tags file for vi from specified C sources. A tags file gives the locations<br />

of specified objects (in this case functions) in a group of files. Each line of the tags file<br />

contains the function name, the file in which it is defined, and a scanning pattern used<br />

to find the function definition. These are given in separate fields on the line, separated<br />

by blanks or tabs. Using the tags file, vi can quickly find these function definitions.<br />

If the -x flag is given, ctags produces a list of function names, the line number and file<br />

name on which each is defined, and the text of that line, and prints this list on the<br />

standard output. This is a simple index which can be printed out as an off-line readable<br />

function index.<br />

Files with names ending in .c or .h are assumed to be C source files and are searched for<br />

C routine and macro definitions.<br />

Other options are<br />

-w Suppresses warning diagnostics.<br />

-u Causes the specified files to be updated in tags; that is, all references to them<br />

are deleted, and the new values are appended to the file. (Beware: this option<br />

is implemented in a way that is rather slow. It is usually faster to simply rebuild<br />

the tags file.)<br />

The tag main is treated specially in C programs. The tag formed is created by<br />

prepending M to the name of the file. The trailing .c, if any, is removed and leading<br />

path name components also removed. This makes use of ctags practical in directories<br />

with more than one program.<br />

Files<br />

tags Output tags file<br />

See Also<br />

ex, vi in "Commands" in the <strong>XENIX</strong> <strong>2<strong>86</strong></strong> Reference Manual<br />

B-57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!