Path: utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!targon!andre From: andre@targon.UUCP (andre) Newsgroups: comp.lang.c Subject: Re: declarations in include files: how do YOU feel? Keywords: declarations include Message-ID: <547@targon.UUCP> Date: 12 May 89 11:26:13 GMT References: <179@larry.sal.wisc.edu> <11318@bloom-beacon.MIT.EDU> <180@larry.sal.wisc.edu> Reply-To: andre@targon.UUCP (andre) Organization: Nixdorf Computer BV., OSP, P.O. Box 29,Vianen, The Netherlands Lines: 16 In article <180@larry.sal.wisc.edu> jwp@larry.sal.wisc.edu.UUCP (Jeffrey W Percival) writes: >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? No problem, it is just what you want, if the global prototype is used in the file where the function is defined, the compiler will complain when the prototype and the definition mismatch, thus by including lib.h in the lib.a modules you let the compiler check all your prototypes for you. -- ~----~ |m AAA DDDD It's not the kill, but the thrill of the chase. ~|d1|~@-- AA AAvv vvDD DD Segment registers are for worms. ~----~ & AAAAAAAvv vvDD DD ~~~~~~ -- AAA AAAvvvDDDDDD Andre van Dalen, uunet!mcvax!targon!andre