⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctags.html

📁 posix标准英文,html格式
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2004 IEEE and The Open Group, All Rights Reserved --><title>ctags</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="ctags"></a> <a name="tag_04_30"></a><!-- ctags --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright &copy; 2001-2004 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_30_01"></a>NAME</h4><blockquote>ctags - create a tags file (<b>DEVELOPMENT</b>, <b>FORTRAN</b>)</blockquote><h4><a name="tag_04_30_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> ctags</tt> <b>[</b><tt>-a</tt><b>][</b><tt>-f</tt> <i>tagsfile</i><b>]</b> <i>pathname</i> <tt>...<br><br> ctags -x</tt> <i>pathname</i> <tt>... <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><tt><br></tt></blockquote><h4><a name="tag_04_30_03"></a>DESCRIPTION</h4><blockquote><p>The <i>ctags</i> utility shall be provided on systems that support the User Portability Utilities option, the SoftwareDevelopment Utilities option, and either or both of the C-Language Development Utilities option and FORTRAN Development Utilitiesoption. On other systems, it is optional.</p><p>The <i>ctags</i> utility shall write a <i>tagsfile</i> or an index of objects from C-language or FORTRAN source files specifiedby the <i>pathname</i> operands. The <i>tagsfile</i> shall list the locators of language-specific objects within the source files.A locator consists of a name, pathname, and either a search pattern or a line number that can be used in searching for the objectdefinition. The objects that shall be recognized are specified in the EXTENDED DESCRIPTION section.</p></blockquote><h4><a name="tag_04_30_04"></a>OPTIONS</h4><blockquote><p>The <i>ctags</i> utility shall conform to the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported:</p><dl compact><dt><b>-a</b></dt><dd>Append to <i>tagsfile</i>.</dd><dt><b>-f&nbsp;</b> <i>tagsfile</i></dt><dd>Write the object locator lists into <i>tagsfile</i> instead of the default file named <b>tags</b> in the currentdirectory.</dd><dt><b>-x</b></dt><dd>Produce a list of object names, the line number, and filename in which each is defined, as well as the text of that line, andwrite this to the standard output. A <i>tagsfile</i> shall not be created when <b>-x</b> is specified.</dd></dl></blockquote><h4><a name="tag_04_30_05"></a>OPERANDS</h4><blockquote><p>The following <i>pathname</i> operands are supported:</p><dl compact><dt><i>file</i><b>.c</b></dt><dd>Files with basenames ending with the <b>.c</b> suffix shall be treated as C-language source code. Such files that are not validinput to <a href="../utilities/c99.html"><i>c99</i></a> produce unspecified results.</dd><dt><i>file</i><b>.h</b></dt><dd>Files with basenames ending with the <b>.h</b> suffix shall be treated as C-language source code. Such files that are not validinput to <a href="../utilities/c99.html"><i>c99</i></a> produce unspecified results.</dd><dt><i>file</i><b>.f</b></dt><dd>Files with basenames ending with the <b>.f</b> suffix shall be treated as FORTRAN-language source code. Such files that are notvalid input to <a href="../utilities/fort77.html"><i>fort77</i></a> produce unspecified results.</dd></dl><p>The handling of other files is implementation-defined.</p></blockquote><h4><a name="tag_04_30_06"></a>STDIN</h4><blockquote><p>See the INPUT FILES section.</p></blockquote><h4><a name="tag_04_30_07"></a>INPUT FILES</h4><blockquote><p>The input files shall be text files containing source code in the language indicated by the operand filename suffixes.</p></blockquote><h4><a name="tag_04_30_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>ctags</i>:</p><dl compact><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_COLLATE</i></dt><dd>Determine the order in which output is sorted for the <b>-x</b> option. The POSIX locale determines the order in which the<i>tagsfile</i> is written.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments and input files). When processing C-language source code, if the locale is notcompatible with the C locale described by the ISO&nbsp;C standard, the results are unspecified.</dd><dt><i>LC_MESSAGES</i></dt><dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standarderror.</dd><dt><i>NLSPATH</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></blockquote><h4><a name="tag_04_30_09"></a>ASYNCHRONOUS EVENTS</h4><blockquote><p>Default.</p></blockquote><h4><a name="tag_04_30_10"></a>STDOUT</h4><blockquote><p>The list of object name information produced by the <b>-x</b> option shall be written to standard output in the followingformat:</p><pre><tt>"%s %d %s %s", &lt;</tt><i>object-name</i><tt>&gt;, &lt;</tt><i>line-number</i><tt>&gt;, &lt;</tt><i>filename</i><tt>&gt;, &lt;</tt><i>text</i><tt>&gt;</tt></pre><p>where &lt;<i>text</i>&gt; is the text of line &lt;<i>line-number</i>&gt; of file &lt;<i>filename</i>&gt;.</p></blockquote><h4><a name="tag_04_30_11"></a>STDERR</h4><blockquote><p>The standard error shall be used only for diagnostic messages.</p></blockquote><h4><a name="tag_04_30_12"></a>OUTPUT FILES</h4><blockquote><p>When the <b>-x</b> option is not specified, the format of the output file shall be:</p><pre><tt>"%s\t%s\t/%s/\n", &lt;</tt><i>identifier</i><tt>&gt;, &lt;</tt><i>filename</i><tt>&gt;, &lt;</tt><i>pattern</i><tt>&gt;</tt></pre><p>where &lt;<i>pattern</i>&gt; is a search pattern that could be used by an editor to find the defining instance of&lt;<i>identifier</i>&gt; in &lt;<i>filename</i>&gt; (where <i>defining instance</i> is indicated by the declarations listed in theEXTENDED DESCRIPTION).</p><p>An optional circumflex ( <tt>'^'</tt> ) can be added as a prefix to &lt;<i>pattern</i>&gt;, and an optional dollar sign can beappended to &lt;<i>pattern</i>&gt; to indicate that the pattern is anchored to the beginning (end) of a line of text. Any slash orbackslash characters in &lt;<i>pattern</i>&gt; shall be preceded by a backslash character. The anchoring circumflex, dollar sign,and escaping backslash characters shall not be considered part of the search pattern. All other characters in the search patternshall be considered literal characters.<br></p><p>An alternative format is:</p><pre><tt>"%s\t%s\t?%s?\n", &lt;</tt><i>identifier</i><tt>&gt;, &lt;</tt><i>filename</i><tt>&gt;, &lt;</tt><i>pattern</i><tt>&gt;</tt></pre><p>which is identical to the first format except that slashes in &lt;<i>pattern</i>&gt; shall not be preceded by escaping backslashcharacters, and question mark characters in &lt;<i>pattern</i>&gt; shall be preceded by backslash characters.</p><p>A second alternative format is:</p><pre><tt>"%s\t%s\t%d\n", &lt;</tt><i>identifier</i><tt>&gt;, &lt;</tt><i>filename</i><tt>&gt;, &lt;</tt><i>lineno</i><tt>&gt;</tt></pre><p>where &lt;<i>lineno</i>&gt; is a decimal line number that could be used by an editor to find &lt;<i>identifier</i>&gt; in&lt;<i>filename</i>&gt;.</p><p>Neither alternative format shall be produced by <i>ctags</i> when it is used as described by IEEE&nbsp;Std&nbsp;1003.1-2001, butthe standard utilities that process tags files shall be able to process those formats as well as the first format.</p><p>In any of these formats, the file shall be sorted by identifier, based on the collation sequence in the POSIX locale.</p></blockquote><h4><a name="tag_04_30_13"></a>EXTENDED DESCRIPTION</h4><blockquote><p>If the operand identifies C-language source, the <i>ctags</i> utility shall attempt to produce an output line for each of thefollowing objects:</p><ul><li><p>Function definitions</p></li>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -