1CFLOW(1) General Commands Manual CFLOW(1)
2
3
4
6 cflow - generate a C-language flowgraph
7
9 cflow [-ASTrxablnv] [-d NUMBER] [-f NAME] [-i CLASSES] [-o FILE] [-D
10 NAME[=DEFN]] [-I DIR] [-m NAME] [-p NUMBER] [-s SYMBOL:[=]TYPE] [-U
11 NAME] [--all] [--depth=NUMBER] [--format=NAME] [--include=CLASSES]
12 [--output=FILE] [--reverse] [--xref] [--ansi] [--define=NAME[=DEFN]]
13 [--include-dir=DIR] [--main=NAME] [--no-main] [--pushdown=NUMBER]
14 [--preprocess[=COMMAND]] [--cpp[=COMMAND]] [--symbol=SYMBOL:[=]TYPE]
15 [--use-indentation] [--undefine=NAME] [--brief] [--emacs]
16 [--print-level] [--level-indent=ELEMENT] [--number] [--omit-arguments]
17 [--omit-symbol-names] [--tree] [--debug[=NUMBER]] [--verbose] FILE...
18
19 cflow [-?V] [--help] [--usage] [--version]
20
22 This manpage is a short description of GNU cflow. For a detailed dis‐
23 cussion, including examples and usage recommendations, refer to the GNU
24 Cflow Manual available in texinfo format. If the info reader and the
25 cflow documentation are properly installed on your system, the command
26
27 info cflow
28
29 should give you access to the complete manual.
30
31 You can also view the manual using the info mode in emacs(1), or find
32 it in various formats online at
33
34 http://www.gnu.org/software/cflow/manual
35
36 If any discrepancies occur between this manpage and the GNU Cflow Manu‐
37 al, the later shall be considered the authoritative source.
38
40 Cflow analyzes a collection of input files written in C programming
41 language and writes to standard output a graph charting dependencies
42 between various functions.
43
45 General-purpose options
46 -d, --depth=NUMBER
47 Set the depth at which the flowgraph is cut off. By default the
48 depth is not limited.
49
50 --debug[=NUMBER]
51 Set debugging level.
52
53 -f, --format=NAME
54 Use given output format NAME. Valid names are gnu (the default)
55 and posix.
56
57 -i, --include=CLASSES
58 Include specified classes of symbols. The ^or- symbol excludes
59 the classes that follow it. Valid classes are:
60
61 _(underscore)
62 Symbols whose names begin with an underscore.
63
64 s Static symbols
65
66 t Typedefs (for cross-references only).
67
68 x All data symbols, both external and static
69
70 -o, --output=FILE
71 Set output file name (default is -, meaning stdout).
72
73 -r, --reverse
74 Print reverse call tree.
75
76 --no-reverse
77 Disable the effect of the previous --reverse option.
78
79 -x, --xref
80 Produce cross-reference listing only.
81
82 -v, --verbose
83 Enable verbose error diagnostics.
84
85 Parser control
86 -a, --ansi
87 Accept only sources in ANSI C.
88
89 --no-ansi
90 Don't assume input files are written in ANSI C.
91
92 -D, --define=NAME[=DEFN]
93 Predefine NAME as a macro.
94
95 -I, --include-dir=DIR
96 Add the directory DIR to the list of directories to be searched
97 for header files.
98
99 -m, --main=NAME
100 Assume main function is NAME
101
102 --no-main
103 Assume there's no main function in the program. This option has
104 the same effect as --all, except that, if the program do define
105 the main function, it will be treated as any other functions,
106 i.e. it will not be placed at the top of output, but in its
107 place as per the lexicographic ordering of function names. See
108 also the description of --all.
109
110 -p, --pushdown=NUMBER
111 Set initial token stack size to NUMBER.
112
113 --preprocess[=COMMAND], --cpp[=COMMAND]
114 Run the specified preprocessor command.
115
116 --no-preprocess, --no-cpp
117 Disable preprocessing.
118
119 -s, --symbol=SYMBOL:[=]TYPE
120 Register SYMBOL with given TYPE, or define an alias (if := is
121 used). Valid types are: keyword(orkw), modifier, qualifier,
122 identifier, type, and wrapper. Any unambiguous abbreviation of
123 the above is also accepted.
124
125 -S, --use-indentation
126 Rely on indentation to solve suspicious constructs.
127
128 --no-use-indentation
129 Don't use indentation in parsing (default).
130
131 -U, --undefine=NAME
132 Cancel any previous definition of NAME.
133
134 Output control
135 -A, --all
136 Produce graphs for all global functions in the program. Use
137 this option if your program contains functions which are not di‐
138 rectly reachable from main().
139
140 The output consist of separate flow graphs for each top-level
141 function defined in the program. These graphs will be placed
142 after the graph for main() (if it exists), and will be ordered
143 lexicographically by the function name.
144
145 If used twice, graphs for all global functions (whether top-lev‐
146 el or not) will be displayed.
147
148 -b, --brief
149 Brief output.
150
151 --no-brief
152 Disable brief output.
153
154 --emacs
155 Format output for use with GNU Emacs.
156
157 --no-emacs
158 Disable the effect of the previous --emacs option.
159
160 -l, --print-level
161 Print nesting level along with the call tree.
162
163 --no-print-level
164 Don't print nesting level.
165
166 --level-indent=ELEMENT
167 Control graph appearance.
168
169 -n, --number
170 Print line numbers.
171
172 --no-number
173 Don't print line numbers.
174
175 --omit-arguments
176 Do not print argument lists in function declarations.
177
178 --no-omit-arguments
179 Print argument lists in function declarations (the default).
180
181 --omit-symbol-names
182 Do not print symbol names in declaration strings.
183
184 --no-omit-symbol-names
185 Print symbol names in declaration strings (the default).
186
187 -T, --tree
188 Draw ASCII art tree.
189
190 --no-tree
191 Disable tree output.
192
193 Informational options
194 These options instruct the program to output the requested piece of in‐
195 formation and exit.
196
197 -?, --help
198 Print a short help summary.
199
200 --usage
201 Print a summary of available options.
202
203 -V, --version
204 Print program version.
205
207 0 Successful completion.
208
209 1 Fatal error occurred.
210
211 2 Some input files cannot be read or parsed.
212
213 3 Command line usage error.
214
216 Online copies of GNU cflow documentation in various formats can be
217 found at:
218
219 http://www.gnu.org/software/cflow/manual
220
222 Sergey Poznyakoff
223
225 Report bugs to <bug-cflow@gnu.org>.
226
228 Copyright © 2014-2021 Sergey Poznyakoff
229 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licens‐
230 es/gpl.html>
231 This is free software: you are free to change and redistribute it.
232 There is NO WARRANTY, to the extent permitted by law.
233
234
235
236
237CFLOW February 10, 2019 CFLOW(1)