home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 185_01 / cflow.doc < prev    next >
Text File  |  1985-08-21  |  2KB  |  61 lines

  1.  
  2.     CFLOW --
  3.         a program to reveal C program structure 
  4.                    by Mark Ellington
  5.  
  6.     In exploring the many C programs available in the public
  7.     domain you may discover that many are poorly commented
  8.     (if at all) and use difficult to decipher program structure
  9.     It may be hard to remember how your own programs work when
  10.     they are not fresh in your mind.  If you want to change a 
  11.     module what will happen to other functions that use it, 
  12.     and which ones are they? 
  13.  
  14.     This program, CFLOW, accepts a C source file as input
  15.     and generates as output to STDOUT a roughly structured
  16.     listing of module (function) declarations and the function
  17.     calls within them.
  18.  
  19.     The listing is vertically structured according to sequence,
  20.     with each module call encountered (i.e. printf(---)) listed
  21.     on a new line.  The horizontal structuring is strictly in
  22.     accordance with the level of open braces "{" at the time
  23.     the module call is read, and is developed by sending one
  24.     horizontal tab for each open level at the time the function
  25.     call is read.  A function declaration (where the function
  26.     and its variables are declared) will always be at braces 
  27.     level 0 and will be at the left margin.  For convenience
  28.     the module declarations are preceded by "**" on the line
  29.     above and include their variable declarations.
  30.     
  31.     Nesting without braces, as within a multiple level "if"
  32.     construct, is not revealed by CFLOW.  Include files are
  33.     ignored as are "#define" macros.  
  34.  
  35.     To use cflow, simply type in:
  36.  
  37.          "CFLOW FILENAME.EXT"  
  38.  
  39.     Use the complete filename (drive and extension).  The 
  40.     structure listing will be sent to the screen.  The cflow.obj 
  41.     file in this release was compiled with C/80 so it supports 
  42.     i/o redirection -- to get a printed listing type:
  43.  
  44.         "CFLOW FILENAME.EXT >LST:"
  45.  
  46.     Or you can use control-P and send to the console as usual.
  47.         To route the listing to a disk file type:
  48.  
  49.         "CFLOW FILENAME.EXT >LISTFILE.EXT"
  50.  
  51.     If you want to change and compile CFLOW.C using BDS you
  52.     should uninclude "cflolib.c80" and use the BDS library
  53.     calls instead.  You will also have to change "fopen" and
  54.     "fclose"(?) and use the BDS i/o library for redirection if
  55.     you want it.
  56.  
  57.                         M.S.E.
  58.                         05/27/84
  59.  
  60.  
  61.