home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / reviewed / volume02 / cextract / part00 < prev    next >
Encoding:
Internet Message Format  |  1992-11-02  |  8.5 KB

  1. From: Adam Bryant <adb@cs.bu.edu>
  2. Subject: v02i038: cextract - (Ver. 1.7) C prototyper/header file generator, Part00/05
  3. Newsgroups: comp.sources.reviewed
  4. Approved: csr@calvin.dgbt.doc.ca
  5.  
  6. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  7. Posting-number: Volume 2, Issue 38
  8. Archive-name: cextract/part00
  9. Supersedes: cextract: Volume 1, Issue 4-8
  10.  
  11. Environment: UNIX, VMS
  12.  
  13. Tested Environments: 
  14.     This Version:
  15.         486, Xenix Sys V 2.3.3.3
  16.         HP9000/380, HP-UX 7.05, HP's old K&R cc.
  17.         Sun, SunOS 4.1.1 & 4.1.2, cc & gcc 2.2
  18.         IBM, AIX3RS 3.1 
  19.         SGI, IRIX 4.0.1 
  20.         IBM, RS/6000 530 AIX V3.2
  21.         Mips, Mips OS 4_51
  22.         NeXT, NeXTos 2.?
  23.         Apollo DN10000, Domain/OS 10.2, cc 6.7.
  24.  
  25.     Previous Version:
  26.         VAX/VMS
  27.         VAX 8700/VMS
  28.         VAX/BSD 4.3
  29.         IBM-RT/AOS 4.3
  30.         DECstation/Ultrix 3.1
  31.         IBM PS-2/AIX 1.2
  32.         MAC/AUX
  33.         Sun 4/SunOS 4.1.1
  34.         Sun 3/SunOS 4.0.3, 4.1.1
  35.         SGI/IRIX 3.3
  36.         Apollo DN10000/Domain OS 10.2.p
  37.  
  38. Dates:
  39.     Submission Received: April 23 1992
  40.     Reviews Returned: June 9 1992
  41.     Revised Submission Received: June 22 1992
  42.     Reviews Returned: August 17 1992
  43.     Revised Submission Received: September 8 1992
  44.     Reviews Returned: October 14 1992
  45.     Revised Submission Received: October 31 1992
  46.     Accepted: October 31 1992
  47.  
  48.  
  49. Author's Summary:
  50. -----------------
  51.  
  52. This package contains a C prototype extractor.  It is ideal for
  53. generating header files for large multi-file C programs, and will
  54. provide an automated method for generating all of the prototypes for
  55. all of the functions in such a program.  It may also function as a
  56. rudimentary documentation extractor, generating a sorted list of all
  57. functions and their locations.
  58.  
  59. Version 1.2 was the last version posted to comp.sources.reviewed, and
  60. much has been changed since that release.  The full history of changes
  61. is contained in the beginning of the parse.c file, but most important
  62. changes include:
  63.  
  64.      o  It should now be more portible, although I still have not
  65.     gotten feedback from any MS-DOS or Macintosh programmers.
  66.  
  67.      o  The configuration files, .cextrc and the system configuration
  68.     files , may now be generated automatically by cextract itself
  69.     using the "build-config" command flag.
  70.  
  71.      o  The ability to locate functions has been improved.
  72.  
  73.      o  Errors or warnings now display a file and line number of where
  74.     the error in file parsing occured.
  75.  
  76.      o  The Makefile, documentation and other "support" files have
  77.     been improved.
  78.  
  79.      o  Output may now be much more compact using the "merge-output"
  80.     option.
  81.  
  82.      o  Installation and testing should now be much easier.
  83.  
  84.      o  Control over inclusion/exclusion of "static" functions is
  85.     greatly improved.
  86.  
  87.      o  Command line options are more consistent.
  88.  
  89.      o  Output may be "wrapped" using the "break-after-types" and
  90.     "wrap-parameters" options.
  91.  
  92.      o  C++ "//" style comments are now considered valid syntax.
  93.  
  94.      o  The proper "#if __STDC__" enclosure is now used.
  95.  
  96.      o  The preprocessor used by cextract may be selected at runtime.
  97.  
  98.      o  Many other bugs and incompatiblities have been fixed.
  99.  
  100.  
  101. Reviewers' Comments:
  102. --------------------
  103.  
  104.   -------------
  105.   This Version:
  106.   -------------
  107.  
  108. Cextract is quite a useful tool for generating function protypes from ANSI or
  109. K&R C code.  It also functions nicely as a simple documentation extractor
  110. for C code.  The program features many configurable options, and supports
  111. both system-wide and user configuration files.
  112.  
  113. ------------------------------------------------------------------------------
  114.  
  115. I compiled cextract on SunOS 4.1.2, HP-UX 8.0 and HP-UX 8.07 using both
  116. standard C and ANSI C compilers on each platform (sun4c, s300, s700,
  117. s800).  In all cases it behaved as expected.  I also verified that its
  118. output matched the output of another prototype extraction tool on
  119. 60,000+ lines of source code.  The output matched in all cases.
  120.  
  121.  
  122. ------------------------------------------------------------------------------
  123.  
  124. 'Cextract' is an ANSI/K&R prototype extractor.  It would appear to
  125. work on most any Unix box and VMS (tested on SunOS 4.1 with cc and gcc 2.2).
  126. It is not directly installable on any other OS (some mods would be
  127. necessary...should be doable).  Command line switches and a configuration
  128. file allow you to customize the output format.  It includes conditional
  129. #if in its output so that future runs of cextract will not use its own
  130. prototypes (this allows you to change your function definitions
  131. easily).  A pretty nice utility.
  132.  
  133. ------------------------------------------------------------------------------
  134.  
  135. Eases production of interface files by extracting prototypes and
  136. comments in ANSI and non-ANSI styles.  Simple to use, both
  137. interactively and non-interactively.  Speedy and has good
  138. documentation.
  139.  
  140. ------------------------------------------------------------------------------
  141.  
  142. Cextract is a useful addition to anyone's development tools.  I've
  143. always managed to kludge my way around the header-file creation problem
  144. with as little effort as I can manage, but with cextract, my effort
  145. will be reduced to nearly nothing in comparison.  It has a rich set of
  146. options, and it's easy to tailor the operation of the program to
  147. whatever project you happen to be working on.  The author even allowed
  148. for easy compilation of function documentation.  I've used prototype
  149. extractors before, but this is the one I'm actually going to adopt.
  150.  
  151. ------------------------------------------------------------------------------
  152.  
  153. I give this one a 90 out of 100.  I've already recommended it to
  154. coworkers...I'm already using it with other projects.
  155.  
  156. It was nice to see VMS help files and Unix man pages that both looked
  157. correct for their environments.
  158.  
  159. ------------------------------------------------------------------------------
  160.  
  161. `Cextract' version 1.7 contains a number of improvements over the first
  162. release.  As with the first version, it is an efficient means of
  163. extracting function prototypes from C source files, and it can also
  164. produce documentation (in plain ASCII or roff).  It contains a number
  165. of command-line options which make it particularly suitable for large
  166. projects consisting of many source files.  It is also sufficiently
  167. flexible to cater for almost all needs (certainly all of mine).
  168.  
  169. The new automatic configuration file generation is a welcome addition,
  170. and enables the user to get the options they want quickly.
  171.  
  172.  
  173.   -----------------
  174.   Previous Version:
  175.   -----------------
  176.   
  177.   I have tested this program on a VAX running BSD 4.3, an IBM RT/PC
  178. running AOS 4.3, a DECstation running Ultrix 3.1, an IBM PS/2 running
  179. AIX 1.2, and a Mac running A/UX.  It compiles and passes its test with
  180. no problems on all of these systems.
  181.  
  182.   The package provides a fast, portable method for extracting function
  183. declarations.  The features that I find most useful include its
  184. ability to surround the declarations with #ifdef directives that
  185. control when they are used (or that prevent reuse), and its ability to
  186. produce both ANSI and non-ANSI declarations and to put in an #ifdef to
  187. cause the ANSI declarations to be used only when appropriate.
  188.  
  189.     ---------------------------------------------------------------
  190. Cextract is a nice tool, that extracts routine headers of a C program
  191. into an .h file.  Both ANSI-C and K&R C are supported.  It has many
  192. extra facilities, but unfortunately most of them require a C
  193. preprocessor which does not strip of comments like VAX-C does.  I
  194. look forward to using it.  cextract was reviewed on VAX/VMS.
  195.  
  196.     ---------------------------------------------------------------
  197.  
  198.     Cextract eases production of interface files by extracting
  199. prototypes in ANSI and non-ANSI styles.  Can extract leading comments as
  200. well, and can generate the skeleton for code documentation.
  201.  
  202.     ---------------------------------------------------------------
  203. `Cextract' is an extremely useful utility for managing software
  204. written in C.  It extracts function headings from source files
  205. and makes prototypes of them, to make a header file suitable for
  206. inclusion by other source files.  The documentation option
  207. produces output suitable for printing.  There are numerous
  208. switches for handling comments, ANSI/non-ANSI declarations,
  209. sorting of the prototypes, and so on.  The `-H' option is
  210. particularly useful in dealing with large software projects.
  211.  
  212. The program was tested on Sun, VAX, and Apollo systems, and
  213. performed as expected.  (A note for Apollo users:  the SYSFLG
  214. option in the Makefile should be set to -DBSD -U__STDC__, because
  215. the Apollo C compiler thinks that it is ANSI C - but we know
  216. better!)
  217.  
  218. I strongly recommend the use of `cextract' for any size of
  219. project!  (I particularly wish to praise the author for his
  220. speedy action in dealing with the reviewers' comments.)
  221.  
  222.  
  223. exit 0 # Just in case...
  224.