home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
editor
/
elvis
/
ref.doc
< prev
next >
Wrap
Text File
|
1994-01-30
|
5KB
|
133 lines
REF(1) UNIX Programmer's Manual REF(1)
NNNNAAAAMMMMEEEE
ref - Display a C function header
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
rrrreeeeffff [-t] [-c _c_l_a_s_s]... [-f _f_i_l_e]... _t_a_g
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_r_e_f quickly locates and displays the header of a function.
To do this, _r_e_f looks in the "tags" file for the line that
describes the function, and then scans the source file for
the function. When it locates the function, it displays an
introductory comment (if there is one), the function's
declaration, and the declarations of all arguments.
SSSSEEEEAAAARRRRCCCCHHHH MMMMEEEETTTTHHHHOOOODDDD
_r_e_f uses a fairly sophisticated tag look-up algorithm. If
you supply a filename via ----ffff _f_i_l_e, then elvis first scans
the tags file for a static tag from that file. This search
is limited to the tags file in the current directory.
If you supply a classname via ----cccc _c_l_a_s_s, then elvis searches
for a tag from that class. This search is not limited to
the current directory; You can supply a list of directories
in the environment variable _T_A_G_P_A_T_H, and _r_e_f will search
through the "tags" file in each directory until it finds a
tag in the desired class.
If that fails, _r_e_f will then try to look up an ordinary glo-
bal tag. This search checks all of the directories listed
in _T_A_G_P_A_T_H, too.
If you've given the ----tttt flag, then _r_e_f will simply output the
tag line that it found, and then exit. Without ----tttt, though,
_r_e_f will search for the tag line. It will try to open the
source file, which should be in the same directory as the
tags file where the tag was discovered. If the source file
doesn't exist, or is unreadable, then _r_e_f will try to open a
file called "_r_e_f_s" in that directory. Either way, _r_e_f will
try to locate the tag, and display whatever it finds.
IIIINNNNTTTTEEEERRRRAAAACCCCTTTTIIIIOOOONNNN WWWWIIIITTTTHHHH EEEELLLLVVVVIIIISSSS
_r_e_f is used by _e_l_v_i_s' shift-K command. If the cursor is
located on a word such as "splat", in the file "foo.c", then
_e_l_v_i_s will invoke _r_e_f with the command "ref -f foo.c splat".
If _e_l_v_i_s has been compiled with the -DEXTERNAL_TAGS flag,
then _e_l_v_i_s will use _r_e_f to scan the tags files. This is
slower than the built-in tag searching, but it allows _e_l_v_i_s
to access the more sophisticated tag lookup provided by _r_e_f.
Other than that, external tags should act exactly like
internal tags.
Printed 6/13/92 1
REF(1) UNIX Programmer's Manual REF(1)
OOOOPPPPTTTTIIIIOOOONNNNSSSS
----tttt Output tag info, instead of the function header.
----ffff _f_i_l_e
The tag might be a static function in _f_i_l_e. You can
use several -f flags to have _r_e_f consider static tags
from more than one file.
----cccc _c_l_a_s_s
The tag might be a member of class _c_l_a_s_s. You can use
several -c flags to have _r_e_f consider tags from more
than one class.
FFFFIIIILLLLEEEESSSS
ttttaaaaggggssss List of function names and their locations, generated
by _c_t_a_g_s.
rrrreeeeffffssss Function headers extracted from source files
(optional).
EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
TTTTAAAAGGGGPPPPAAAATTTTHHHH
List of directories to be searched. The elements in
the list are separated by either semicolons (for MS-
DOS, Atari TOS, and AmigaDos), or by colons (every
other operating system). For each operating system,
_r_e_f has a built-in default which is probably adequate.
NNNNOOOOTTTTEEEESSSS
You might want to generate a "tags" file the directory that
contains the source code for standard C library on your sys-
tem. If licensing restrictions prevent you from making the
library source readable by everybody, then you can have
_c_t_a_g_s generate a "refs" file, and make "refs" readable by
everybody.
If your system doesn't come with the library source code,
then perhaps you can produce something workable from the
_l_i_n_t libraries.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
elvis(1), ctags(1)
AAAAUUUUTTTTHHHHOOOORRRR
Steve Kirkendall
kirkenda@cs.pdx.edu
Printed 6/13/92 2