SYNOPSIS

cproto generates function prototypes for functions defined in the specified C source files to the standard output. The function definitions may be in K&R or ANSI C style, or in lint-library form. cproto can also convert function definitions in the specified files from the K&R style to the ANSI C style.

HISTORY

This was written (and is maintained) by Chin Huang <cthuang@io.org>. I added the logic to support lint libraries (my main purpose), wrote the configure script, designed regression tests and ported to VAX/VMS.

Some time before working on cproto, I had hand-built lint-libraries for X11 on SunOS. The vendor did not distribute usable lint-libraries: the corresponding ".ln" files were zero-length, and there were no text-files to match. Moreover, X11 did not build lint-libraries that matched the sources (many functions were missing or had different parameters). Since the llib-* text files are basically the ".c" files with the function-bodies emptied, it was possible to edit them and produce correct lint library source.

But that is very time-consuming, and not something that I would do more than once. Modifying cproto was a better solution; I used the resulting lint-libraries for several years.

Currently I use cproto to generate lint-libraries for ncurses. I also make occasional fixes, generally as a branch, e.g., "4.7a". See the changelog for details.


Download: The source (gzip'd tar)