REF.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:4k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH REF 1
- .SH NAME
- ref - Display a C function header
- .SH SYNOPSIS
- fBreffR [-t] [-c fIclassfR]... [-f fIfilefR]... fItagfR
- .SH DESCRIPTION
- fIreffP quickly locates and displays the header of a function.
- To do this, fIreffR
- 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.
- .SH "SEARCH METHOD"
- .PP
- fIreffR uses a fairly sophisticated tag look-up algorithm.
- If you supply a filename via fB-ffR fIfilefR, 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.
- .PP
- If you supply a classname via fB-cfR fIclassfR, 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 fITAGPATHfR,
- and fIreffR will search through the "tags" file in each directory until it finds
- a tag in the desired class.
- .PP
- If that fails, fIreffR will then try to look up an ordinary global tag.
- This search checks all of the directories listed in fITAGPATHfR, too.
- .PP
- If you've given the fB-tfR flag, then fIreffR will simply output the tag line that
- it found, and then exit.
- Without fB-tfR, though, fIreffR 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 fIreffR will try to open
- a file called "fIrefsfR" in that directory.
- Either way, fIreffR will try to locate the tag, and display whatever it finds.
- .SH "INTERACTION WITH ELVIS"
- .PP
- fIreffP is used by fIelvisfR' shift-K command.
- If the cursor is located on a word such as "splat", in the file "foo.c",
- then fIelvisfR will invoke fIreffR with the command "ref -f foo.c splat".
- .PP
- If fIelvisfR has been compiled with the -DEXTERNAL_TAGS flag, then fIelvisfR will
- use fIreffR fBfRto scan the tags files.
- This is slower than the built-in tag searching, but it allows fIelvisfR to access
- the more sophisticated tag lookup provided by fIreffR.
- Other than that, external tags should act exactly like internal tags.
- .SH OPTIONS
- .IP fB-tfR
- Output tag info, instead of the function header.
- .IP "fB-ffR fIfilefR"
- The tag might be a static function in fIfilefR.
- You can use several -f flags to have fIreffR consider static tags from more than one file.
- .IP "fB-cfR fIclassfR"
- The tag might be a member of class fIclassfR.
- You can use several -c flags to have fIreffR consider tags from more than one class.
- .SH FILES
- .IP fBtagsfR
- List of function names and their locations, generated by fIctagsfR.
- .IP fBrefsfR
- Function headers extracted from source files (optional).
- .SH ENVIRONMENT
- .IP fBTAGPATHfR
- 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, fIreffR has a built-in default which is probably
- adequate.
- .SH NOTES
- .PP
- You might want to generate a "tags" file the directory that contains the
- source code for standard C library on your system.
- If licensing restrictions prevent you from making the library source readable
- by everybody, then you can have fIctagsfR generate a "refs" file,
- and make "refs" readable by everybody.
- .PP
- If your system doesn't come with the library source code, then perhaps you
- can produce something workable from the fIlintfR libraries.
- .SH "SEE ALSO"
- elvis(1), ctags(1)
- .SH AUTHOR
- .nf
- Steve Kirkendall
- kirkenda@cs.pdx.edu
- .fi