Scroll to navigation

CFLOW(1) General Commands Manual CFLOW(1)

NAME

cflow - generate a C-language flowgraph

SYNOPSIS

cflow [-ASTrxablnv] [-d NUMBER] [-f NAME] [-i CLASSES] [-o FILE] [-D NAME[=DEFN]] [-I DIR] [-m NAME] [-p NUMBER] [-s SYMBOL:[=]TYPE] [-U NAME] [--all] [--depth=NUMBER] [--format=NAME] [--include=CLASSES] [--output=FILE] [--reverse] [--xref] [--ansi] [--define=NAME[=DEFN]] [--include-dir=DIR] [--main=NAME] [--no-main] [--pushdown=NUMBER] [--preprocess[=COMMAND]] [--cpp[=COMMAND]] [--symbol=SYMBOL:[=]TYPE] [--use-indentation] [--undefine=NAME] [--brief] [--emacs] [--print-level] [--level-indent=ELEMENT] [--number] [--omit-arguments] [--omit-symbol-names] [--tree] [--debug[=NUMBER]] [--verbose] FILE...

cflow [-?V] [--help] [--usage] [--version]

NOTE

This manpage is a short description of GNU cflow. For a detailed discussion, including examples and usage recommendations, refer to the GNU Cflow Manual available in texinfo format. If the info reader and the cflow documentation are properly installed on your system, the command

info cflow

should give you access to the complete manual.

You can also view the manual using the info mode in emacs(1), or find it in various formats online at

If any discrepancies occur between this manpage and the GNU Cflow Manual, the later shall be considered the authoritative source.

DESCRIPTION

Cflow analyzes a collection of input files written in C programming language and writes to standard output a graph charting dependencies between various functions.

OPTIONS

General-purpose options

Set the depth at which the flowgraph is cut off. By default the depth is not limited.
Set debugging level.
Use given output format NAME. Valid names are gnu (the default) and posix.
Include specified classes of symbols. The ^or- symbol excludes the classes that follow it. Valid classes are:
_(underscore)
Symbols whose names begin with an underscore.
Static symbols
Typedefs (for cross-references only).
All data symbols, both external and static
Set output file name (default is -, meaning stdout).
Print reverse call tree.
Disable the effect of the previous --reverse option.
-x, --xref
Produce cross-reference listing only.
Enable verbose error diagnostics.

Parser control

Accept only sources in ANSI C.
Don't assume input files are written in ANSI C.
Predefine NAME as a macro.
Add the directory DIR to the list of directories to be searched for header files.
Assume main function is NAME
Assume there's no main function in the program. This option has the same effect as --all, except that, if the program do define the main function, it will be treated as any other functions, i.e. it will not be placed at the top of output, but in its place as per the lexicographic ordering of function names. See also the description of --all.
Set initial token stack size to NUMBER.
Run the specified preprocessor command.
Disable preprocessing.
-s, --symbol=SYMBOL:[=]TYPE
Register SYMBOL with given TYPE, or define an alias (if := is used). Valid types are: keyword(orkw), modifier, qualifier, identifier, type, and wrapper. Any unambiguous abbreviation of the above is also accepted.
Rely on indentation to solve suspicious constructs.
Don't use indentation in parsing (default).
Cancel any previous definition of NAME.

Output control

Produce graphs for all global functions in the program. Use this option if your program contains functions which are not directly reachable from main().

The output consist of separate flow graphs for each top-level function defined in the program. These graphs will be placed after the graph for main() (if it exists), and will be ordered lexicographically by the function name.

If used twice, graphs for all global functions (whether top-level or not) will be displayed.

Brief output.
Disable brief output.
Format output for use with GNU Emacs.
Disable the effect of the previous --emacs option.
Print nesting level along with the call tree.
Don't print nesting level.
Control graph appearance.
Print line numbers.
Don't print line numbers.
Do not print argument lists in function declarations.
Print argument lists in function declarations (the default).
Do not print symbol names in declaration strings.
Print symbol names in declaration strings (the default).
Draw ASCII art tree.
Disable tree output.

Informational options

These options instruct the program to output the requested piece of information and exit.

-?, --help
Print a short help summary.
Print a summary of available options.
Print program version.

RETURN VALUE

0
Successful completion.
1
Fatal error occurred.
2
Some input files cannot be read or parsed.
3
Command line usage error.

SEE ALSO

Online copies of GNU cflow documentation in various formats can be found at:


http://www.gnu.org/software/cflow/manual

AUTHORS

Sergey Poznyakoff

BUG REPORTS

Report bugs to <bug-cflow@gnu.org>.

COPYRIGHT

Copyright © 2014-2021 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

February 10, 2019 CFLOW