Path: utzoo!attcan!uunet!husc6!think!ames!xanth!mcnc!thorin!zeta!leech From: leech@zeta.cs.unc.edu (Jonathan Leech) Newsgroups: comp.lang.c Subject: Re: Wanted - Auto function prototype generator Message-ID: <6338@thorin.cs.unc.edu> Date: 24 Jan 89 20:22:31 GMT References: <1989Jan18.092522.14499@gpu.utcs.toronto.edu> <943@ubu.warwick.UUCP> Sender: news@thorin.cs.unc.edu Reply-To: leech@zeta.UUCP (Jonathan Leech) Organization: University Of North Carolina, Chapel Hill Lines: 15 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <943@ubu.warwick.UUCP> geoff@emerald.UUCP (Geoff Rimmer) writes: >The program should scan thru a set of C source files, checking each >function definition. If the function is extern, it should place a >function prototype in the relevant header file (if it was in foo.c, >put the proto in foo.h). If the function is static, it should place a >prototype at the top of that .c file. I hacked up BSD lint to generate prototypes, this was posted in comp.sources.misc a few months ago (as 'proto'). A little work with shell scripts and sed on top of this would do what you want. If you don't have BSD lint sources available, this is no help. -- Jon Leech (leech@cs.unc.edu) __@/ "Enhanced 386... Runs Unit, Zenix, 0s/s & DOS..." - Competitive Computer Components Ad, Computer Shopper 1/89