CFLOW(1,C) AIX Commands Reference CFLOW(1,C) ------------------------------------------------------------------------------- cflow PURPOSE Generates a C flow graph of external references. SYNTAX +------------+ cflow ---| +--------+ |--- file ---| +-| -d num |-+ ^ | ^| -r || +--------+ || -i_ || || -ix || |+--------+| +----------+ Note: This command is for the PS/2 only. Note: This command does not have MBCS support. DESCRIPTION The cflow command analyzes C, yacc, lex, assembler, and object files and writes a chart of their external references to standard output. The cflow command sends files with .y, .l, and .c suffixes to the yacc, lex, and cpp commands for the appropriate processing. This step is bypassed for .i files. The command then runs the output of this processing through the first pass of the lint command. It assembles files which end in .s, extracting information from the symbol table (as it does with .o files). From this output, the cflow command produces a graph of external references, which it writes to standard output. Each line of output begins with a line number followed by sufficient tabs to indicate the level of nesting. Then comes the name of the global, a colon, and its definition. This name is normally a function not defined as external and not beginning with an underline character (see the -i_ inclusion flag on p. 2). For information extracted from C source files, the definition consists of an abstract type declaration (for example, "char*"), the name of the source file (surrounded by angle brackets), and the line number on which the definition was found. Definitions extracted from object files contain the file name and location counter under which the symbol appeared. The cflow command deletes leading underline characters in C-style external names. Processed November 8, 1990 CFLOW(1,C) 1 CFLOW(1,C) AIX Commands Reference CFLOW(1,C) Once the cflow command displays the definition of a name, later references to it contain only the cflow line number where the definition may be found. For undefined references, the cflow command displays only <>. If the nesting level becomes too deep to display in available space, pipe the output from the cflow command to the pr command, using the -e flag to compress the tab expansion to something less than every eight spaces. Note: Files produced by the lex and yacc command cause the reordering of line number declarations which can confuse the cflow command. To get proper results, provide the cflow command with yacc or lex command input. FLAGS The cflow command recognizes the following flags: -dnum Sets to decimal integer num the depth at which the flow graph is cut off. By default, num is a very large number. Do not set the cutoff depth to a negative integer. -ix Includes external and static data symbols. The default includes only functions. -i_ Includes names that begin with an underline character. The default excludes these functions (and corresponding data if the -ix flag is used). -r Produces an inverted listing, which shows the callers of each function, sorted by called function. In addition to these flags, the cflow command recognizes the -I, -D, and -U flags of the cpp command. RELATED INFORMATION See the following commands: "as," "cc," "lex," "lint," "nm," "pr," and "yacc." See the discussion of the cflow programming tool in AIX Operating System Programming Tools and Interfaces. Processed November 8, 1990 CFLOW(1,C) 2