CFLOW(1)
π 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 formatNAME. valid names aredot(DOT language),gnu(the default) andposix.-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--verboseoptions.
π§Έ 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β (VERSIONis 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β addDIRat 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 fileNAME.cfoin 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 filedefault.cfo, located in the search path. unless the-qoption 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]β predefineNAMEas a macro.-I,--include-dir=DIRβ add the directoryDIRto the list of directories to be searched for header files.-p,--pushdown=NUMBERβ set initial token stack size toNUMBER.--preprocess[=COMMAND],--cpp[=COMMAND]β run the specified preprocessor command.--no-preprocess,--no-cppβ disable preprocessing.-s,--symbol=SYMBOL:[=]TYPEβ registerSYMBOLwith givenTYPE, or define an alias (if:=is used). valid types are:keyword(orkw),modifier,qualifier,identifier,type,wrapper, anddeclaration. 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 ofNAME.
π 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 frommain().- 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. β¨
- output consists of separate flow graphs for each top-level function defined in the program. these graphs will be placed after the graph for
-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--emacsoption.-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 isNAME. 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 themainfunction, 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 π
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
- alpine 3.24: cflow-doc 1.8-r0 Β· GPL-3.0-or-later
- fedora 43: cflow 1.8-1.fc43 Β· GPL-2.0-or-later
- fedora 44: cflow 1.8-3.fc44 Β· GPL-2.0-or-later
- nixos 26.05: cflow 1.8
- nixpkgs unstable: cflow 1.8
- ubuntu questing: cflow 1:1.8-1
- ubuntu resolute: cflow 1:1.8-1build1 Β· GPL-3.0-or-later
- ubuntu stonking: cflow 1:1.8-1build1 Β· GPL-3.0-or-later
- Copyright (C) 2014-2025 Sergey Poznyakoff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms