Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cflow(1) [ultrix man page]

cflow(1)						      General Commands Manual							  cflow(1)

       cflow - generate C flow graph

       cflow [-r] [-ix] [-i_] [-dnum] files

       The  command  analyzes a collection of C, YACC, LEX, assembler, and object files and attempts to build a graph charting the external refer-
       ences.  Files suffixed in .y, .l, .c, and .i are YACC'd, LEX'd, and C-preprocessed (bypassed for .i files)  as  appropriate  and  then  run
       through	the  first pass of The -I, -D, and -U options of the C-preprocessor are also understood.  Files suffixed with .s are assembled and
       information is extracted from the symbol table.	The output of all this non-trivial processing is collected and	turned	into  a  graph	of
       external references which is displayed upon the standard output.

       Each  line  of  output begins with a reference, or line, number, followed by a suitable number of tabs indicating the level.  Following the
       reference number is the name of the global, a colon, and the global's definition.  (See the option for information on names that begin with
       an  underscore.)   For  information extracted from C source, the definition consists of an abstract type declaration (for example, char *),
       and, the name of the source file and the line number where the definition was found.  The name of the source file and the line  number  are
       delimited  by  angel  brackets.	Definitions extracted from object files indicate the file name and location counter under which the symbol
       appeared (for example, text).  Leading underscores in C-style external names are deleted.

       Once a definition of a name has been printed, subsequent references to that name contain only the reference number of the  line	where  the
       definition may be found.  For undefined references, only <> is printed.

       The following is an example in file.c:
       int  i;


	    i = h();
       The command
       cflow -ix file.c
       produces the following output:
       1    main: int(), <file.c 4>
       2	 f: int(), <file.c 11>
       3	      h: <>
       4	      i: int, <file.c 1>
       5	 g: <>

       When the nesting level becomes too deep, the -e option of can be used to compress the tab expansion to something less than every eight spa-

       -dnum		   The num decimal integer indicates the depth at which the flow graph is cut off.  By default this is a very  large  num-
			   ber.  Attempts to set the cutoff depth to a nonpositive integer will be met with contempt.

       -i_		   Includes names that begin with an underscore. The default is to exclude these functions (and data if -ix is used).

       -ix		   Includes external and static data symbols. The default is to include only functions in the flow graph.

       -r		   Reverse  the  ``caller:callee''  relationship  producing an inverted listing showing the callers of each function.  The
			   listing is also sorted in lexicographical order by callee.

       Files produced by and cause the reordering of line number declarations which can confuse To get proper results, feed the or input.

       Complains about bad options.  Complains about multiple definitions and only believes the first.	Other messages may come from  the  various
       programs used (for example, the C-preprocessor).

See Also
       as(1), cc(1), lex(1), lint(1), nm(1), pr(1), yacc(1)


Check Out this Related Man Page

cxref(1)						      General Commands Manual							  cxref(1)

cxref - Creates a C program cross-reference listing SYNOPSIS
cxref [-cFlstV] [-o file] [-w [number] | [-L cols] ] [-D name[=def]]... [-I dir]... [-U name]... [-Ndnumber] [-Nlnumber] [-Nnnumber] [-Ntnumber] file... The token -- (double-dash) is accepted as a delimiter indicating the end of options. Any following arguments are treated as operands, even if they begin with the - character. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: cxref: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
The following options are included in XCU5.0: Displays a combined listing of the cross-references in all input files. Defines name, as if by a C-language #define directive. If no =def is given, a value of 1 is used. Adds the directory specified by dir to the list of directo- ries in which the lint program searches for #include files. Directs the output to the specified file. Does not display the input file- names. Removes any initial definition of name, where name is a reserved symbol that is predefined by the particular preprocessor. Formats the output no wider than number (decimal) columns. This option defaults to 80 if number is unspecified or is less than 51. The following options are not included in XCU5.0. They are included in a System V specification or are proprietary. [Tru64 UNIX] Prints the full path of the referenced file names. By default, only the last component of the full path is printed. [Tru64 UNIX] Specifies the maximum number of columns that can be printed in the LINE field to the cols argument. The default is five columns for this field. [Tru64 UNIX] Suppresses printing of local variables. Only global variables and file scope statistics are printed. [Tru64 UNIX] Changes the dimension table size to number. The default is 2000. [Tru64 UNIX] Changes the number of type nodes to number. The default is 8000. [Tru64 UNIX] Changes the symbol table size to number. The default is 1500. [Tru64 UNIX] Changes the number of tree nodes to number. The default is 1000. [Tru64 UNIX] Makes the listing 80 bytes wide. [SVID3] Prints the version number information for the cxref command to standard error. DESCRIPTION
The cxref command analyzes C program files and creates a cross-reference table, using a version of the cpp macro preprocessor to include #define directives in its symbol table. The cxref command writes to standard output a listing of all symbols in each file processed, either separately or in combination (see the -c option). [Tru64 UNIX] Function prototypes are handled in a special way: for an old-style function declaration, the function prototype name is listed, but the optional prototype identifiers are not. The formal parameters in a function definition are always listed, whether or not the prototype is an old-style function definition. When a reference to a symbol is that symbol's declaration, an asterisk (*) precedes it. EXAMPLES
To provide a combined cross-reference listing of stdin1.c and stdin2.c, making the output 60 columns wide, enter: cxref -c -w 60 stdin1.c stdin2.c > output ENVIRONMENT VARIABLES
The following environment variables affect the behavior of cxref: Provides a default value for the locale category variables that are not set or null. If set, overrides the values of all other locale variables. Determines the order in which output is sorted for the -x option. Determines the locale for the interpretation of byte sequences as characters (single-byte or multibyte) in input parameters and files. Determines the locale used to affect the format and contents of diagnostic messages displayed by the command. Determines the loca- tion of message catalogs for processing of LC_MESSAGES. FILES
Special version of C preprocessor. SEE ALSO
Commands: cc(1), c89(1) Standards: standards(5) cxref(1)
Man Page