Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!osu-cis!att!cbnewsc!tjr From: tjr@cbnewsc.ATT.COM (thomas.j.roberts) Newsgroups: comp.lang.c Subject: Re: where do you put prototype declarations? Message-ID: <126@cbnewsc.ATT.COM> Date: 3 Feb 89 18:44:32 GMT References: <372@serene.UUCP> Organization: AT&T Bell Laboratories Lines: 18 From article <372@serene.UUCP>, by rfarris@serene.UUCP (Rick Farris): > In article <3449@sdsu.UUCP> roetzhei@sdsu.UCSD.EDU (William Roetzheim) writes: > >> I may be the only one, but I like to put all of my function >> prototypes in one include file which contains only function >> prototypes. . . I do this, too, but use a tool to pull out all of the declarations from the files containing the definitions. This tool puts "/* foo.c */" ahead of the prototypes from file foo.c, so it serves as a (crude) index to functions. I do NOT make the object files depend upon this header file (called "proto.h"), nor do I automatically re-create proto.h whenever any .c files are modified; I need to explicitly re-create proto.h whenever I change the definition of, or add any functions. Tom Roberts AT&T Bell Laboratories att!ihnet!tjr