home *** CD-ROM | disk | FTP | other *** search
- From: Adam Bryant <adb@cs.bu.edu>
- Subject: v02i038: cextract - (Ver. 1.7) C prototyper/header file generator, Part00/05
- Newsgroups: comp.sources.reviewed
- Approved: csr@calvin.dgbt.doc.ca
-
- Submitted-by: Adam Bryant <adb@cs.bu.edu>
- Posting-number: Volume 2, Issue 38
- Archive-name: cextract/part00
- Supersedes: cextract: Volume 1, Issue 4-8
-
- Environment: UNIX, VMS
-
- Tested Environments:
- This Version:
- 486, Xenix Sys V 2.3.3.3
- HP9000/380, HP-UX 7.05, HP's old K&R cc.
- Sun, SunOS 4.1.1 & 4.1.2, cc & gcc 2.2
- IBM, AIX3RS 3.1
- SGI, IRIX 4.0.1
- IBM, RS/6000 530 AIX V3.2
- Mips, Mips OS 4_51
- NeXT, NeXTos 2.?
- Apollo DN10000, Domain/OS 10.2, cc 6.7.
-
- Previous Version:
- VAX/VMS
- VAX 8700/VMS
- VAX/BSD 4.3
- IBM-RT/AOS 4.3
- DECstation/Ultrix 3.1
- IBM PS-2/AIX 1.2
- MAC/AUX
- Sun 4/SunOS 4.1.1
- Sun 3/SunOS 4.0.3, 4.1.1
- SGI/IRIX 3.3
- Apollo DN10000/Domain OS 10.2.p
-
- Dates:
- Submission Received: April 23 1992
- Reviews Returned: June 9 1992
- Revised Submission Received: June 22 1992
- Reviews Returned: August 17 1992
- Revised Submission Received: September 8 1992
- Reviews Returned: October 14 1992
- Revised Submission Received: October 31 1992
- Accepted: October 31 1992
-
-
- Author's Summary:
- -----------------
-
- This package contains a C prototype extractor. It is ideal for
- generating header files for large multi-file C programs, and will
- provide an automated method for generating all of the prototypes for
- all of the functions in such a program. It may also function as a
- rudimentary documentation extractor, generating a sorted list of all
- functions and their locations.
-
- Version 1.2 was the last version posted to comp.sources.reviewed, and
- much has been changed since that release. The full history of changes
- is contained in the beginning of the parse.c file, but most important
- changes include:
-
- o It should now be more portible, although I still have not
- gotten feedback from any MS-DOS or Macintosh programmers.
-
- o The configuration files, .cextrc and the system configuration
- files , may now be generated automatically by cextract itself
- using the "build-config" command flag.
-
- o The ability to locate functions has been improved.
-
- o Errors or warnings now display a file and line number of where
- the error in file parsing occured.
-
- o The Makefile, documentation and other "support" files have
- been improved.
-
- o Output may now be much more compact using the "merge-output"
- option.
-
- o Installation and testing should now be much easier.
-
- o Control over inclusion/exclusion of "static" functions is
- greatly improved.
-
- o Command line options are more consistent.
-
- o Output may be "wrapped" using the "break-after-types" and
- "wrap-parameters" options.
-
- o C++ "//" style comments are now considered valid syntax.
-
- o The proper "#if __STDC__" enclosure is now used.
-
- o The preprocessor used by cextract may be selected at runtime.
-
- o Many other bugs and incompatiblities have been fixed.
-
-
- Reviewers' Comments:
- --------------------
-
- -------------
- This Version:
- -------------
-
- Cextract is quite a useful tool for generating function protypes from ANSI or
- K&R C code. It also functions nicely as a simple documentation extractor
- for C code. The program features many configurable options, and supports
- both system-wide and user configuration files.
-
- ------------------------------------------------------------------------------
-
- I compiled cextract on SunOS 4.1.2, HP-UX 8.0 and HP-UX 8.07 using both
- standard C and ANSI C compilers on each platform (sun4c, s300, s700,
- s800). In all cases it behaved as expected. I also verified that its
- output matched the output of another prototype extraction tool on
- 60,000+ lines of source code. The output matched in all cases.
-
-
- ------------------------------------------------------------------------------
-
- 'Cextract' is an ANSI/K&R prototype extractor. It would appear to
- work on most any Unix box and VMS (tested on SunOS 4.1 with cc and gcc 2.2).
- It is not directly installable on any other OS (some mods would be
- necessary...should be doable). Command line switches and a configuration
- file allow you to customize the output format. It includes conditional
- #if in its output so that future runs of cextract will not use its own
- prototypes (this allows you to change your function definitions
- easily). A pretty nice utility.
-
- ------------------------------------------------------------------------------
-
- Eases production of interface files by extracting prototypes and
- comments in ANSI and non-ANSI styles. Simple to use, both
- interactively and non-interactively. Speedy and has good
- documentation.
-
- ------------------------------------------------------------------------------
-
- Cextract is a useful addition to anyone's development tools. I've
- always managed to kludge my way around the header-file creation problem
- with as little effort as I can manage, but with cextract, my effort
- will be reduced to nearly nothing in comparison. It has a rich set of
- options, and it's easy to tailor the operation of the program to
- whatever project you happen to be working on. The author even allowed
- for easy compilation of function documentation. I've used prototype
- extractors before, but this is the one I'm actually going to adopt.
-
- ------------------------------------------------------------------------------
-
- I give this one a 90 out of 100. I've already recommended it to
- coworkers...I'm already using it with other projects.
-
- It was nice to see VMS help files and Unix man pages that both looked
- correct for their environments.
-
- ------------------------------------------------------------------------------
-
- `Cextract' version 1.7 contains a number of improvements over the first
- release. As with the first version, it is an efficient means of
- extracting function prototypes from C source files, and it can also
- produce documentation (in plain ASCII or roff). It contains a number
- of command-line options which make it particularly suitable for large
- projects consisting of many source files. It is also sufficiently
- flexible to cater for almost all needs (certainly all of mine).
-
- The new automatic configuration file generation is a welcome addition,
- and enables the user to get the options they want quickly.
-
-
- -----------------
- Previous Version:
- -----------------
-
- I have tested this program on a VAX running BSD 4.3, an IBM RT/PC
- running AOS 4.3, a DECstation running Ultrix 3.1, an IBM PS/2 running
- AIX 1.2, and a Mac running A/UX. It compiles and passes its test with
- no problems on all of these systems.
-
- The package provides a fast, portable method for extracting function
- declarations. The features that I find most useful include its
- ability to surround the declarations with #ifdef directives that
- control when they are used (or that prevent reuse), and its ability to
- produce both ANSI and non-ANSI declarations and to put in an #ifdef to
- cause the ANSI declarations to be used only when appropriate.
-
- ---------------------------------------------------------------
- Cextract is a nice tool, that extracts routine headers of a C program
- into an .h file. Both ANSI-C and K&R C are supported. It has many
- extra facilities, but unfortunately most of them require a C
- preprocessor which does not strip of comments like VAX-C does. I
- look forward to using it. cextract was reviewed on VAX/VMS.
-
- ---------------------------------------------------------------
-
- Cextract eases production of interface files by extracting
- prototypes in ANSI and non-ANSI styles. Can extract leading comments as
- well, and can generate the skeleton for code documentation.
-
- ---------------------------------------------------------------
- `Cextract' is an extremely useful utility for managing software
- written in C. It extracts function headings from source files
- and makes prototypes of them, to make a header file suitable for
- inclusion by other source files. The documentation option
- produces output suitable for printing. There are numerous
- switches for handling comments, ANSI/non-ANSI declarations,
- sorting of the prototypes, and so on. The `-H' option is
- particularly useful in dealing with large software projects.
-
- The program was tested on Sun, VAX, and Apollo systems, and
- performed as expected. (A note for Apollo users: the SYSFLG
- option in the Makefile should be set to -DBSD -U__STDC__, because
- the Apollo C compiler thinks that it is ANSI C - but we know
- better!)
-
- I strongly recommend the use of `cextract' for any size of
- project! (I particularly wish to praise the author for his
- speedy action in dealing with the reviewers' comments.)
-
-
- exit 0 # Just in case...
-