NAME

extproto - Extract documentation from specially-commented C files

SYNOPSIS

extproto [ -v ] [ --version ] [ -d ] [ --debug ] [ -a ] [ --ANSI ] [ -k ] [ --KR ] [ --toANSI ] [ --polis ] [ package.h ] [ packageInt.h ] [ packageFile.c ]

DESCRIPTION

Extproto extracts function prototypes from C source files and places them in in either the C file itself (for static functions), an internal header file (packageInt.h), or an external header file (package.h ). Additionally, it can convert K&R-style function declarations into ANSI-style declarations using the --toANSI switch.

A backup of each modified file is made by placing a tilde (~) at the end of its name.

OPTIONS

-v
--version
Print version information and exit.

-d
--debug
Enable debugging mode. This prints an enormous amount of cryptic information about what extproto is doing.

-a
--ANSI
Look for ANSI-style function declarations. This is the default. This should not be used with the --KR or --toANSI options.

-k
--KR
Look for K&R-style function declarations. This should not be used with the --ANSI or --toANSI options.

--toANSI
Look for K&R-style function declarations and write ANSI-style function declarations. For this option to work correctly, all declarations must be in K&R form. In particular, using the --toANSI option on a C source file partially or totally in ANSI form will damage it. This should not be used with the --ANSI or --KR options.

--polis
Use the polis file/function naming rules.

EXAMPLES

Add static function prototypes to the C source file example.c:
example% extproto example.c
Place internal function prototypes from all C files named tbl*.c and place them in the internal header file tblInt.h:
example% extproto tblInt.h
Extract externally-visible functions declared in K&R-style from all C files named tbl*.c and place them in the C header file tbl.h:
example% extproto --KR tbl.h
Convert all the C files in the directory, whose declarations are all in K&R-style to ANSI:
example% extproto --toANSI *.c

FILES

packageFile.c C source file
package.h Externally-visible header file
packageInt.h Internal header file

SEE ALSO

extdoc, extindex, Documentation on Packages and File Structure, Documentation on Naming Conventions, The Ext System

AUTHOR

Stephen Edwards
sedwards@alumni.caltech.edu