home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / CFLOW / CFLOW.DOC < prev    next >
Text File  |  1993-12-01  |  3KB  |  91 lines

  1.  
  2.     CFLOW --
  3.         a program to reveal C program structure 
  4.                    by Mark Ellington
  5.  
  6. |        as modified for MS-DOS 2 and C86
  7. |                  by Larry Steeger
  8.  
  9.     In exploring the many C programs available in the public
  10.     domain you may discover that many are poorly commented
  11. |    (if at all) and use difficult to decipher program structure.
  12.     It may be hard to remember how your own programs work when
  13.     they are not fresh in your mind.  If you want to change a 
  14.     module what will happen to other functions that use it, 
  15.     and which ones are they? 
  16.  
  17. |    This program, CFLOW, accepts C source files as input
  18.     and generates as output to STDOUT a roughly structured
  19.     listing of module (function) declarations and the function
  20.     calls within them.
  21.  
  22.     The listing is vertically structured according to sequence,
  23.     with each module call encountered (i.e. printf(---)) listed
  24.     on a new line.  The horizontal structuring is strictly in
  25.     accordance with the level of open braces "{" at the time
  26. |    the module call is read, and is developed by sending 4 spaces
  27. |    for each open level at the time the function call is read.
  28. |    A function declaration (where the function and its variables
  29. |    are declared) will always be at braces level 0 and will be
  30. |    at the left margin.  For convenience the module declarations
  31. |    are preceded by "**" and include their variable declarations
  32. |    preceded by " *".
  33.     
  34.     Nesting without braces, as within a multiple level "if"
  35.     construct, is not revealed by CFLOW.  Include files are
  36. |    supported as are #define macros.
  37.  
  38.     To use CFLOW, simply type in:
  39.  
  40.          "CFLOW FILENAME.EXT"  
  41.  
  42. |    Use the complete filename (drive:\pathname and extension).
  43. |    The structure listing will be sent to the console.
  44.  
  45. |    Output redirection is supported -- to get a printed listing type:
  46.  
  47. |        "CFLOW FILENAME.EXT >PRT:"
  48.  
  49.     or you can use control-P and send to the console as usual.
  50.  
  51.         To route the listing to a disk file type:
  52.  
  53.         "CFLOW FILENAME.EXT >LISTFILE.EXT"
  54.  
  55. |
  56.  
  57.                         M.S.E.
  58.                         05/27/84
  59.  
  60. |    Addenda for MS-DOS 2/C86 version:
  61. |
  62. |        MS-DOS 2 pathnames may be prefixed to any command line/#include
  63. |        file names.  The '*' and '?' wildcard characters are also
  64. |        supported in command line input file names.
  65. |
  66. |    Example:    "CFLOW \C\*.C"    will generate a CFLOW for all
  67. |                    files in the \C directory on
  68. |                    the current default drive
  69. |                    which have a ".C" file extension.
  70. |
  71. |        Several flags have been added in the CI-C86 version:
  72. |
  73. |        -l            prefix each line with its source
  74. |                    file line number
  75. |
  76. |        -f            prefix each line with its source
  77. |                    file name
  78. |
  79. |        -hsystem[,project]    prefix[es] for #include file names
  80. |                    (same as C86 v2.20H flag)
  81. |
  82. |        -t            use '\t' rather than 4 spaces
  83. |                    for indentation
  84. |
  85. |        -x            generate input for CFLOWX utility
  86. |
  87. |                            L.R.S.
  88. |                            05/29/85
  89.  
  90. |    <end of cflow.doc>
  91.