dg@lakart.UUCP (David Goodenough) (09/28/89)
Consider a pair of source files: main() { frobozz(2, a, b); foobar(); } /* VARARGS1 */ frobozz(n, args) { } and foobar() { frobozz(1, c); frobozz(3, x, y, z); } Now, when linting these two together, everything is just fine: lint sees the VARARGS attached to frobozz, and doesn't complain about the useages in foo. But if I lint the second source on it's own, how do I tell lint that frobozz is external, and VARARGS ?? /* VARARGS */ extern frobozz(); just above foobar doesn't work. I'd like to keep this to constructive suggestions, in case you hadn't figured it, our cc is: 1. old 2. unable to deal with prototypes 3. extremely unlikely to be replaced. Any suggestions people? Thanks in advance, -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+
flaps@dgp.toronto.edu (Alan J Rosenthal) (10/01/89)
dg@lakart.UUCP (David Goodenough) writes: >Now, when linting these two together, everything is just fine ... >But if I lint the second source on it's own, how do I tell lint ... >I'd like to keep this to constructive suggestions ... Well, this is not a solution to your problem, but I think it is an answer to your question. I think you are not following the model of lint. Lint's phase one is applied to files individually, but lint's phase two is applied to all files being linked together. You must specify all files and libraries used if you want the phase two output to be meaningful. Possibly your problem could be solved by use of lint libraries. The method for creating these is machine-specific, but man lint should tell you. A lint library is just the phase two input from a bunch of files. If the reason you want to lint them separately is for speed or for source license questions, this should solve your problem. ajr -- Vs encr vf n xvaq bs frk, gura n chapu va gur zbhgu vf n xvaq bs gnyxvat.