declarations in include files: how do YOU feel?

Jeffrey W Percival jwp at larry.sal.wisc.edu
Fri May 12 03:00:29 AEST 1989


In article <11318 at bloom-beacon.MIT.EDU> scs at athena.mit.edu (Steve Summit) writes:
>In article <179 at larry.sal.wisc.edu> jwp at larry.sal.wisc.edu (Jeffrey W Percival) writes:
>>Should the lib.h file contain extern declarations for everything in lib.a?
>By all means.
>I've never worried about micro-managing global scope.
>If it's extern, it's global, so any module may call it.

Thanks for the response.  Is this the general consensus?

Another question on this style:  does one include lib.h in the
subroutine files that make up lib.a?  That is, if lib.h contains
an "extern char foo()" and foo.c includes lib.h and then goes
on to define foo, is this a problem?
-- 
Jeff Percival (jwp at larry.sal.wisc.edu)



More information about the Comp.lang.c mailing list