C function prototyping and large projects
Doug Gwyn
gwyn at smoke.ARPA
Sat Sep 17 00:43:33 AEST 1988
In article <24 at motto.UUCP> russ at motto.UUCP (Russell Crook) writes:
>Are there conventions about where prototypes are stored -
>do you put them in '.h' files, or right in the source file, or
>somewhere else?
Prototypes don't change the recommended C practice, namely use
header files to define/declare all interface information. The
best approach is to use separate headers (and separate source
files) for each group of functionally related capabilities.
For example, "parse.h" would declare the parsing function(s)
that are of use to other parts of the application, and it would
also define any manifest constants, data types, etc. that are
specific to parsing. Other headers would cover other functional
areas. And of course, a Makefile or equivalent compilation
specification could be used to limit recompilation to just the
affected sources when a change has been made.
More information about the Comp.std.c
mailing list