Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
cflow.html (12968B)
1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved --> 2 <!DOCTYPE HTML> 3 <html lang="en"> 4 <head> 5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0"> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 --> 8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved --> 9 <title>cflow</title> 10 </head> 11 <body bgcolor="white"> 12 <div class="NAVHEADER"> 13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 14 <tr class="nav"> 15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/cd.html" accesskey="P"><<< 16 Previous</a></td> 17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/chgrp.html" accesskey="N">Next 19 >>></a></td> 20 </tr> 21 </table> 22 <hr align="left" width="100%"></div> 23 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> 24 <center><font size="2">The Open Group Base Specifications Issue 8<br> 25 IEEE Std 1003.1-2024<br> 26 Copyright © 2001-2024 The IEEE and The Open Group</font></center> 27 <hr size="2" noshade> 28 <a name="top" id="top"></a> <a name="cflow" id="cflow"></a> <a name="tag_20_15" id="tag_20_15"></a><!-- cflow --> 29 <h4 class="mansect"><a name="tag_20_15_01" id="tag_20_15_01"></a>NAME</h4> 30 <blockquote>cflow — generate a C-language flowgraph (<b>DEVELOPMENT</b>)</blockquote> 31 <h4 class="mansect"><a name="tag_20_15_02" id="tag_20_15_02"></a>SYNOPSIS</h4> 32 <blockquote class="synopsis"> 33 <div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt= 34 "[Option Start]" border="0"> cflow</tt> <b>[</b><tt>-r</tt><b>] [</b><tt>-d</tt> <i>num</i><b>] [</b><tt>-D</tt> 35 <i>name</i><b>[</b><tt>=</tt><i>def</i><b>]]</b><tt>...</tt> <b>[</b><tt>-i</tt> <i>incl</i><b>] [</b><tt>-I</tt> 36 <i>dir</i><b>]</b><tt>...<br> 37 </tt> <b>[</b><tt>-U</tt> <i>dir</i><b>]</b><tt>...</tt> <i>file</i><tt>... <img src= 38 "../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div> 39 </blockquote> 40 <h4 class="mansect"><a name="tag_20_15_03" id="tag_20_15_03"></a>DESCRIPTION</h4> 41 <blockquote> 42 <p>The <i>cflow</i> utility shall analyze a collection of object files or assembler, C-language, <a href= 43 "../utilities/lex.html"><i>lex</i></a>, or <a href="../utilities/yacc.html"><i>yacc</i></a> source files, and attempt to build a 44 graph, written to standard output, charting the external references.</p> 45 </blockquote> 46 <h4 class="mansect"><a name="tag_20_15_04" id="tag_20_15_04"></a>OPTIONS</h4> 47 <blockquote> 48 <p>The <i>cflow</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax 49 Guidelines</i></a> , except that the order of the <b>-D</b>, <b>-I</b>, and <b>-U</b> options (which are identical to their 50 interpretation by <a href="../utilities/c17.html"><i>c17</i></a>) is significant.</p> 51 <p>The following options shall be supported:</p> 52 <dl compact> 53 <dd></dd> 54 <dt><b>-d </b><i>num</i></dt> 55 <dd>Indicate the depth at which the flowgraph is cut off. The application shall ensure that the argument <i>num</i> is a decimal 56 integer. By default this is a very large number (typically greater than 32000). Attempts to set the cut-off depth to a non-positive 57 integer shall be ignored.</dd> 58 <dt><b>-i </b><i>incl</i></dt> 59 <dd>Increase the number of included symbols. The <i>incl</i> option-argument is one of the following characters: 60 <dl compact> 61 <dd></dd> 62 <dt><i>x</i></dt> 63 <dd>Include external and static data symbols. The default shall be to include only functions in the flowgraph.</dd> 64 <dt><tt>_</tt></dt> 65 <dd>(Underscore) Include names that begin with an <underscore>. The default shall be to exclude these functions (and data if 66 <b>-i x</b> is used).</dd> 67 </dl> 68 </dd> 69 <dt><b>-r</b></dt> 70 <dd>Reverse the caller:callee relationship, producing an inverted listing showing the callers of each function. The listing shall 71 also be sorted in lexicographical order by callee.</dd> 72 </dl> 73 </blockquote> 74 <h4 class="mansect"><a name="tag_20_15_05" id="tag_20_15_05"></a>OPERANDS</h4> 75 <blockquote> 76 <p>The following operand is supported:</p> 77 <dl compact> 78 <dd></dd> 79 <dt><i>file</i></dt> 80 <dd>The pathname of a file for which a graph is to be generated. Filenames suffixed by <b>.l</b> shall shall be taken to be 81 <a href="../utilities/lex.html"><i>lex</i></a> input, <b>.y</b> as <a href="../utilities/yacc.html"><i>yacc</i></a> input, 82 <b>.c</b> as <a href="../utilities/c17.html"><i>c17</i></a> input, and <b>.i</b> as the output of <a href= 83 "../utilities/c17.html"><i>c17</i></a> <b>-E</b>. Such files shall be processed as appropriate, determined by their suffix. 84 <p>Files suffixed by <b>.s</b> (conventionally assembler source) may have more limited information extracted from them.</p> 85 </dd> 86 </dl> 87 </blockquote> 88 <h4 class="mansect"><a name="tag_20_15_06" id="tag_20_15_06"></a>STDIN</h4> 89 <blockquote> 90 <p>Not used.</p> 91 </blockquote> 92 <h4 class="mansect"><a name="tag_20_15_07" id="tag_20_15_07"></a>INPUT FILES</h4> 93 <blockquote> 94 <p>The input files shall be object files or assembler, C-language, <a href="../utilities/lex.html"><i>lex</i></a>, or <a href= 95 "../utilities/yacc.html"><i>yacc</i></a> source files.</p> 96 </blockquote> 97 <h4 class="mansect"><a name="tag_20_15_08" id="tag_20_15_08"></a>ENVIRONMENT VARIABLES</h4> 98 <blockquote> 99 <p>The following environment variables shall affect the execution of <i>cflow</i>:</p> 100 <dl compact> 101 <dd></dd> 102 <dt><i>LANG</i></dt> 103 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 104 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 105 variables used to determine the values of locale categories.)</dd> 106 <dt><i>LC_ALL</i></dt> 107 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 108 <dt><i>LC_COLLATE</i></dt> 109 <dd><br> 110 Determine the locale for the ordering of the output when the <b>-r</b> option is used.</dd> 111 <dt><i>LC_CTYPE</i></dt> 112 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 113 opposed to multi-byte characters in arguments and input files).</dd> 114 <dt><i>LC_MESSAGES</i></dt> 115 <dd><br> 116 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 117 <dt><i>NLSPATH</i></dt> 118 <dd>Determine the location of messages objects and message catalogs.</dd> 119 </dl> 120 </blockquote> 121 <h4 class="mansect"><a name="tag_20_15_09" id="tag_20_15_09"></a>ASYNCHRONOUS EVENTS</h4> 122 <blockquote> 123 <p>Default.</p> 124 </blockquote> 125 <h4 class="mansect"><a name="tag_20_15_10" id="tag_20_15_10"></a>STDOUT</h4> 126 <blockquote> 127 <p>The flowgraph written to standard output shall be formatted as follows:</p> 128 <pre> 129 <tt>"%d %s:%s\n", <</tt><i>reference number</i><tt>>, <</tt><i>global</i><tt>>, <</tt><i>definition</i><tt>> 130 </tt></pre> 131 <p>Each line of output begins with a reference (that is, line) number, followed by indentation of at least one column position per 132 level. This is followed by the name of the global, a <colon>, and its definition. Normally globals are only functions not 133 defined as an external or beginning with an <underscore>; see the OPTIONS section for the <b>-i</b> inclusion option. For 134 information extracted from C-language source, the definition consists of an abstract type declaration (for example, <b>char *</b>) 135 and, delimited by angle brackets, the name of the source file and the line number where the definition was found. Definitions 136 extracted from object files indicate the filename and location counter under which the symbol appeared (for example, 137 <i>text</i>).</p> 138 <p>Once a definition of a name has been written, subsequent references to that name contain only the reference number of the line 139 where the definition can be found. For undefined references, only <tt>"<>"</tt> shall be written.</p> 140 </blockquote> 141 <h4 class="mansect"><a name="tag_20_15_11" id="tag_20_15_11"></a>STDERR</h4> 142 <blockquote> 143 <p>The standard error shall be used only for diagnostic messages.</p> 144 </blockquote> 145 <h4 class="mansect"><a name="tag_20_15_12" id="tag_20_15_12"></a>OUTPUT FILES</h4> 146 <blockquote> 147 <p>None.</p> 148 </blockquote> 149 <h4 class="mansect"><a name="tag_20_15_13" id="tag_20_15_13"></a>EXTENDED DESCRIPTION</h4> 150 <blockquote> 151 <p>None.</p> 152 </blockquote> 153 <h4 class="mansect"><a name="tag_20_15_14" id="tag_20_15_14"></a>EXIT STATUS</h4> 154 <blockquote> 155 <p>The following exit values shall be returned:</p> 156 <dl compact> 157 <dd></dd> 158 <dt> 0</dt> 159 <dd>Successful completion.</dd> 160 <dt>>0</dt> 161 <dd>An error occurred.</dd> 162 </dl> 163 </blockquote> 164 <h4 class="mansect"><a name="tag_20_15_15" id="tag_20_15_15"></a>CONSEQUENCES OF ERRORS</h4> 165 <blockquote> 166 <p>Default.</p> 167 </blockquote> 168 <hr> 169 <div class="box"><em>The following sections are informative.</em></div> 170 <h4 class="mansect"><a name="tag_20_15_16" id="tag_20_15_16"></a>APPLICATION USAGE</h4> 171 <blockquote> 172 <p>Files produced by <a href="../utilities/lex.html"><i>lex</i></a> and <a href="../utilities/yacc.html"><i>yacc</i></a> cause the 173 reordering of line number declarations, and this can confuse <i>cflow</i>. To obtain proper results, the input of <a href= 174 "../utilities/yacc.html"><i>yacc</i></a> or <a href="../utilities/lex.html"><i>lex</i></a> must be directed to <i>cflow</i>.</p> 175 </blockquote> 176 <h4 class="mansect"><a name="tag_20_15_17" id="tag_20_15_17"></a>EXAMPLES</h4> 177 <blockquote> 178 <p>Given the following in <b>file.c</b>:</p> 179 <pre> 180 <tt>int i; 181 int f(); 182 int g(); 183 int h(); 184 int 185 main(void) 186 { 187 f(); 188 g(); 189 f(); 190 } 191 int 192 f() 193 { 194 i = h(); 195 } 196 </tt></pre> 197 <p>The command:</p> 198 <pre> 199 <tt>cflow -i x file.c 200 </tt></pre> 201 <p>produces the output:</p> 202 <pre> 203 <tt>1 main: int(), <file.c 6> 204 2 f: int(), <file.c 13> 205 3 h: <> 206 4 i: int, <file.c 1> 207 5 g: <> 208 </tt></pre></blockquote> 209 <h4 class="mansect"><a name="tag_20_15_18" id="tag_20_15_18"></a>RATIONALE</h4> 210 <blockquote> 211 <p>None.</p> 212 </blockquote> 213 <h4 class="mansect"><a name="tag_20_15_19" id="tag_20_15_19"></a>FUTURE DIRECTIONS</h4> 214 <blockquote> 215 <p>None.</p> 216 </blockquote> 217 <h4 class="mansect"><a name="tag_20_15_20" id="tag_20_15_20"></a>SEE ALSO</h4> 218 <blockquote> 219 <p><a href="../utilities/c17.html#"><i>c17</i></a> , <a href="../utilities/lex.html#"><i>lex</i></a> , <a href= 220 "../utilities/yacc.html#"><i>yacc</i></a></p> 221 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 222 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 223 </blockquote> 224 <h4 class="mansect"><a name="tag_20_15_21" id="tag_20_15_21"></a>CHANGE HISTORY</h4> 225 <blockquote> 226 <p>First released in Issue 2.</p> 227 </blockquote> 228 <h4 class="mansect"><a name="tag_20_15_22" id="tag_20_15_22"></a>Issue 6</h4> 229 <blockquote> 230 <p>The normative text is reworded to avoid use of the term "must" for application requirements.</p> 231 </blockquote> 232 <h4 class="mansect"><a name="tag_20_15_23" id="tag_20_15_23"></a>Issue 7</h4> 233 <blockquote> 234 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p> 235 </blockquote> 236 <h4 class="mansect"><a name="tag_20_15_24" id="tag_20_15_24"></a>Issue 8</h4> 237 <blockquote> 238 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 239 <p>Austin Group Defect 1195 is applied, changing "<tt>main()</tt>" to "<tt>main(void)</tt>".</p> 240 </blockquote> 241 <div class="box"><em>End of informative text.</em></div> 242 <hr> 243 <p> </p> 244 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 245 <hr size="2" noshade> 246 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 247 POSIX™ is a Trademark of The IEEE.<br> 248 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 249 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 250 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 251 ]</font></center> 252 <hr size="2" noshade> 253 <div class="NAVHEADER"> 254 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 255 <tr class="nav"> 256 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/cd.html" accesskey="P"><<< 257 Previous</a></td> 258 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 259 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/chgrp.html" accesskey="N">Next 260 >>></a></td> 261 </tr> 262 </table> 263 <hr align="left" width="100%"></div> 264 </body> 265 </html>