Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: declarations in include files:  how do YOU feel?
Message-ID: <1989May11.201546.824@utzoo.uucp>
Organization: U of Toronto Zoology
References: <179@larry.sal.wisc.edu>
Date: Thu, 11 May 89 20:15:46 GMT

In article <179@larry.sal.wisc.edu> jwp@larry.sal.wisc.edu (Jeffrey W Percival) writes:
>The situation is, suppose I have a bunch of routines that are packaged
>into a lib.a, and there is an associated include file "lib.h" that
>users need to include.  Should the lib.h file contain extern declarations
>for everything in lib.a, or not?

Yes.  It's more convenient to the user to have all the declarations gotten
right for him (especially significant when ANSI prototypes become common)
than to have to do them himself, even though this theoretically allows him
to conserve name space.  Having to type such things in yourself almost
invariably leads to shortcuts and sloppiness, too.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
