Path: utzoo!yunexus!geac!orcisi!michael From: michael@orcisi.UUCP (Michael Herman) Newsgroups: comp.unix.questions Subject: Re: I need to create ANSI C function prototypes. Message-ID: <1183@orcisi.UUCP> Date: 13 Feb 88 17:34:35 GMT Article-I.D.: orcisi.1183 Posted: Sat Feb 13 12:34:35 1988 References: <201@fxgrp.UUCP> <2273@cognos.UUCP> <445@spectrix.UUCP> Organization: Optical Recording Corporation, Toronto, Ontario Lines: 21 > Take the lint shell file. Make a copy. Modify it so that it saves > the output of the "lint1" pass. Delete the lint2 pass. Run it on > the sources you want to have lint libraries for. Viola! The stuff > you saved is the lint library. Only one idiosyncrasy: if any of the > library routines have lint errors, you'll see these lint errors on > every invocation lint you use these new lint libraries on. And, I > expect that the libraries would be bigger than they could be. As I remember, this would work for simple/basic types but fails for typedefs and structs because the lint parser (usually the same code used in the C compiler) doesn't keep the typedef names around. To compound matters, lint1 passes the length of structs and not their names. You have to internally modify lint1 and lint2 to pass the actual names. The easiest way of checking all this out is to turn on lint's internal debug option (-m or -d or -z or somesuch). This will give you a very good idea of what lint is really (not) doing. Under MS-DOS, the MS C compiler has a -Zg option which writes the prototypes of the supplied source file to stdout.