ANSI C prototypes
Tim McDaniel
mcdaniel at adi.com
Tue Nov 6 03:18:35 AEST 1990
Markku.Savela at tel.vtt.fi (Markku Savela) writes:
> Any changes in external specification shouldn't be so frequent, if
> you have the code done right.
You assume
(1) that there is a "right" way to do a module for a project;
(2) that that "right" way is determinable before it is coded;
(3) that the programmer can determine this "right" way a priori.
Assumption (2) fails at my workplace. I've done a dozen or two little
tweaks to the major module I've developed: a variable exported here,
an argument type changed there, et cetera. I didn't know that we'd
want to ship exceptions across the network. Nor did I know that
someone needed VAXC$ERRNO.
An automatic exporter tool is a great convenience, because I don't
have to worry about keeping the .h up to date with the .c. I have a
hard time just remembering to comment out the #define STANDALONE_DEBUG
before checking it in! It is particularly nice here, because the tool
does a "diff" between the new .h and the old one, and if they're the
same, deletes the new one and leaves the old one untouched.
Unnecessary makes are avoided even when you "mig *.c" to check
everything.
By the way, a compiler option to output prototypes is not useful. It
should output declarations for all external identifiers, and only
those.
--
Tim McDaniel Applied Dynamics Int'l.; Ann Arbor, Michigan, USA
Work phone: +1 313 973 1300 Home phone: +1 313 677 4386
Internet: mcdaniel at adi.com UUCP: {uunet,sharkey}!amara!mcdaniel
More information about the Comp.lang.c
mailing list