CFLOW(1)

πŸ“¦
version 1.8 Β· 2 versions
, in alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– CFLOW(1) β€” bestie edition πŸ’–

okay so. GNU cflow?? it's giving flowgraph realness. this is the General Commands Manual page for it and we're about to go through it together, no skimming, no skipping. every flag. every default. every path. periodt. πŸŽ€


✨ NAME ✨

cflow β€” generate a C-language flowgraph πŸ¦‹


🌸 SYNOPSIS 🌸

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

and also, for when you just wanna ask it stuff:


πŸ‘‘ NOTE πŸ‘‘

ok so this manpage is a short description of GNU cflow. like, the appetizer. for the detailed discussion β€” examples, usage recommendations, the whole main-character arc β€” you want the GNU Cflow Manual, which lives in texinfo format. if the info reader and the cflow docs are properly installed on your system, this command:

info cflow

should give you access to the complete manual. slay. 🫢

you can also read it via the info mode in emacs(1), or find it in various formats online at:

http://www.gnu.org/software/cflow/manual
⚠️ real talk: if any discrepancies occur between this manpage and the GNU Cflow Manual, the latter shall be considered the authoritative source. this page is the vibe, the manual is the truth. no cap.

πŸ’œ 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. that's it, that's the whole glow-up: it maps out who calls whom. πŸ”₯


✨ OPTIONS ✨

🧁 General-purpose options

  • -d, --depth=NUMBER β€” set the depth at which the flowgraph is cut off. by default the depth is not limited, so she will go as deep as she wants bestie.
  • --debug[=NUMBER] β€” set debugging level.
  • -f, --format=NAME β€” use given output format NAME. valid names are dot (DOT language), gnu (the default) and posix.
  • -i, --include=CLASSES β€” 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.
    • s β€” static symbols.
    • t β€” typedefs (for cross-references only).
    • x β€” all data symbols, both external and static.
  • -o, --output=FILE β€” set output file name (default is -, meaning stdout).
  • -r, --[no-]reverse β€” print (don't print) reverse call tree.
  • -x, --xref β€” produce cross-reference listing only.
  • -v, --verbose β€” enable verbose error diagnostics.
  • --no-verbose β€” cancel effect of any prior --verbose options.

🧸 Program initialization

so these options manipulate cflow profiles. a profile is a set of cflow options intended to be applied together. profiles are used, among others, to provide settings for specific versions of the C language. πŸ’…

each profile is given a unique name and stored in a file named NAME.cfo located in profile search path. the default search path is determined at compile time, and normally consists of the following directories:

  • ~/.cflow.d β€” (~/ stands for the user home directory)
  • /usr/share/cflow/site-init
  • /usr/share/cflow/VERSION β€” (VERSION is the version of cflow)

examine the output of the cflow --help command, to obtain the search path used by your version of cflow. (iykyk β€” it's compile-time, so it might not be the same as mine 🫠)

  • -P, --prepend-path=DIR β€” add DIR at the beginning of the profile search path.
  • --profile=NAME β€” read options from the named profile. a profile is a text file containing a set of cflow options. this option causes lookup of the file NAME.cfo in profile search path. the file is read, and all options from it processed as though they appeared in that point of the command line.
  • -q β€” don't load default profile. the default profile is stored in file default.cfo, located in the search path. unless the -q option is given, that file is processed at startup.

🧚 Parser control

  • -a, --ansi β€” accept only sources in ANSI C.
  • --no-ansi β€” don't assume input files are written in ANSI C.
  • -D, --define=NAME[=DEFN] β€” predefine NAME as a macro.
  • -I, --include-dir=DIR β€” add the directory DIR to the list of directories to be searched for header files.
  • -p, --pushdown=NUMBER β€” set initial token stack size to NUMBER.
  • --preprocess[=COMMAND], --cpp[=COMMAND] β€” run the specified preprocessor command.
  • --no-preprocess, --no-cpp β€” disable preprocessing.
  • -s, --symbol=SYMBOL:[=]TYPE β€” register SYMBOL with given TYPE, or define an alias (if := is used). valid types are: keyword (or kw), modifier, qualifier, identifier, type, wrapper, and declaration. any unambiguous abbreviation of the above is also accepted.
  • -S, --use-indentation β€” rely on indentation to solve suspicious constructs.
  • --no-use-indentation β€” don't use indentation in parsing (default).
  • --target=NAME β€” show only graphs leading from start symbols to this function; multiple options are allowed.
  • -U, --undefine=NAME β€” cancel any previous definition of NAME.

🌈 Output control

  • -A, --all β€” produce graphs for all global functions in the program. use this option if your program contains functions which are not directly reachable from main().
    • output consists 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. ✨
  • -b, --brief β€” brief output.
  • --no-brief β€” disable brief output.
  • --emacs β€” format output for use with GNU Emacs.
  • --no-emacs β€” disable the effect of the previous --emacs option.
  • -l, --print-level β€” print nesting level along with the call tree.
  • --no-print-level β€” don't print nesting level.
  • --level-indent=ELEMENT β€” control graph appearance.
  • -m, --main=NAME β€” assume main function is NAME. this option can be given multiple times. a separate graph will be drawn for each function given as its argument.
  • --no-main β€” 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.
  • -n, --number β€” print line numbers.
  • --no-number β€” don't print line numbers.
  • --omit-arguments β€” do not print argument lists in function declarations.
  • --no-omit-arguments β€” print argument lists in function declarations (the default).
  • --omit-symbol-names β€” do not print symbol names in declaration strings.
  • --no-omit-symbol-names β€” print symbol names in declaration strings (the default).
  • -T, --tree β€” draw ASCII art tree. 🌳 iconic honestly.
  • --no-tree β€” disable tree output.

πŸ’« Informational options

these options instruct the program to output the requested piece of information and exit. (so like, they're the "just tell me one thing and leave" options 😌)

  • -?, --help β€” print a short help summary.
  • --usage β€” print a summary of available options.
  • -V, --version β€” 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 <gray@gnu.org>.


πŸ’€ BUG REPORTS πŸ’€

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


Copyright Β© 2014-2025 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.

⚠️ like, genuinely: NO WARRANTY, to the extent permitted by law. it's free software so you're free to change and redistribute it, but nobody's covering you if it goes sideways. 🫢

and that's the page bestie!! πŸŽ‰ this was CFLOW(1) from the General Commands Manual, dated May 10, 2025 β€” ok bye, go read the texinfo manual for the deep lore πŸ’…βœ¨

πŸ“¦ where this page comes from