ANSI C prototypes

Peter da Silva peter at ficc.ferranti.com
Sun Nov 4 05:04:28 AEST 1990


In article <1990Nov3.122432.24738 at ccu.umanitoba.ca> salomon at ccu.umanitoba.ca (Dan Salomon) writes:
> Actually, include files aren't quite the same as a library of function
> prototypes.  The distinction is the same as between an object library,
> and a file full of object modules.

True, there is an efficiency consideration. I don't tend to have a single
module or collection of modules that require more than a handful  of files,
so this hasn't been a problem.

Plus, who says include files have to be stored in files? The C standard
doesn't. This is an implementation detail. :-> Yeh, it's a problem, but
it's not a show stopper.

> In addition to the problem of
> keeping the include files up to date,

That is the real problem. You need a tool to extract the prototypes from
a file. Beyond that, make will do the rest.

> Processing all the prototypes in an include file is slower than a search
> for and processing of only the ones actually needed.

Precompiled include files. Some compilers have 'em. I've never had to use
'em myself, but my home machine has plenty of MIPs and IoStones.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com



More information about the Comp.lang.c mailing list