SYNOPSIS
ctags
[
DESCRIPTION
By default, ctags generates a file named tags in the current directory which summarizes the locations of various objects in the C or FORTRAN sourcefiles named on the command line. All files with a .c or .h suffix are treated as C source files, while files with a .f suffix are treated as FORTRAN source files. For C source code, ctags summarizes function, macro and typedef definitions. For FORTRAN source code, it summarizes function and subroutine definitions. See tags for a description of the format of the tags file.
You can access the tags file with the
:tag \fIname\fP
:t\fIname\fP
in more. The idea is that you tell the utility which function you want to look at and it checks the tags file to determine which source file contains the function.
ctags makes special provision for the function
ctags uses sort to sort the file by tag name, according to the POSIX locale's collation sequence.
Options
-a -
appends output to the existing tags file rather than overwriting the file.
-B -
produces a tags file that searches backward from the current position to find the pattern matching the tag.
-F -
searches for tag patterns in the forward direction (default).
-f tagfile-
generates a file named tagfile rather than the default tags.
-w -
suppresses warning messages.
-x -
produces a human-readable report on the standard output. The report gives the definition name, the line number of where it appears in the file, the name of the file in which it appears and the text of that line. ctags arranges this output in columns and sorts it in order by tag name according to the current locale's collation sequence. This option does not produce a tags file.
FILES
DIAGNOSTICS
Possible exit status values are:
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. 4.2 BSD UNIX and up. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
The
NOTE
Recognizing a function definition in C source code can be somewhat difficult. Since ctags does not know which C preprocessor symbols are defined, there may be some misplaced function definition information if sections of code within #if...#endif are not complete blocks.
ctags invokes the sort command internally. Be sure that ctags does not access the Windows sort command instead of the sort provided with PTC MKS Toolkit; otherwise, ctags fails. Modify your path search rules if you have this problem.
AVAILABILITY
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- File Formats:
- tags
PTC MKS Toolkit 10.5 Documentation Build 40.