home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
c
/
cug236.arc
/
CFLOW.DOC
< prev
next >
Wrap
Text File
|
1980-01-02
|
2KB
|
68 lines
/*
HEADER: CUG000.00;
TITLE: Documentation for Function Abstractor;
DATE: 04/19/1987;
VERSION: 3.0;
FILENAME: CFLOW.DOC;
SEE-ALSO: CFLOW.C;
AUTHORS: W. C. Colley III, Mark Ellington;
*/
CFLOW --
a program to reveal C program structure
by Mark Ellington
In exploring the many C programs available in the public
domain you may discover that many are poorly commented
(if at all) and use difficult to decipher program structure
It may be hard to remember how your own programs work when
they are not fresh in your mind. If you want to change a
module what will happen to other functions that use it,
and which ones are they?
This program, CFLOW, accepts a C source file as input
and generates as output to STDOUT a roughly structured
listing of module (function) declarations and the function
calls within them.
The listing is vertically structured according to sequence,
with each module call encountered (i.e. printf(---)) listed
on a new line. The horizontal structuring is strictly in
accordance with the level of open braces "{" at the time
the module call is read, and is developed by sending one
horizontal tab for each open level at the time the function
call is read. A function declaration (where the function
and its variables are declared) will always be at braces
level 0 and will be at the left margin. For convenience
the module declarations are preceded by "**" on the line
above and include their variable declarations.
Nesting without braces, as within a multiple level "if"
construct, is not revealed by CFLOW. Include files are
ignored as are "#define" macros.
To use cflow, simply type in:
"CFLOW FILENAME.EXT"
Use the complete filename (drive and extension). The
structure listing will be sent to the screen. To get a
printed listing, use the host operating system's (or
compiler's) I/O redirection facilities to redirect stdout
to your printer. Under MSDOS, it goes like this:
"CFLOW FILENAME.EXT >PRN"
Under CP/M or MSDOS, you can use control-P (also control-
PrtSc under MSDOS) and send to the console as usual. To
route the listing to a disk file type:
"CFLOW FILENAME.EXT >LISTFILE.EXT"
M.S.E.
05/27/84
Edited by WCC3
04/19/87
iables are declared) will always be at braces
level 0 and will be at the left margin. For c