Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!aeb From: aeb@mcvax.UUCP (Andries Brouwer) Newsgroups: net.lang.c Subject: Re: Re: How to let lint check your format strings Message-ID: <595@mcvax.UUCP> Date: Thu, 11-Apr-85 15:14:24 EST Article-I.D.: mcvax.595 Posted: Thu Apr 11 15:14:24 1985 Date-Received: Sat, 13-Apr-85 05:29:49 EST References: <558@mcvax.UUCP> <1582@ukma.UUCP> <518@lll-crg.ARPA> Reply-To: aeb@mcvax.UUCP (Andries Brouwer) Organization: CWI, Amsterdam Lines: 20 In article <518@lll-crg.ARPA> brooks@lll-crg.ARPA (Eugene D. Brooks III) writes: >> Something that may not have been obvious....to turn it back off >> when the code is de-linted, have another .h file like this: >> >> #define procent_a(a) a >> #define procent_b(a) a > >The idea of having lint use constant format strings to check types and >arg counts is a great one. I have wanted to do this for many years as >argument types and counts for printf and its buddies are one of my more >frequent errors. Could we come up with a system that does not require any >includes or modifications to the code to do it? This would be great! The way I use printfck is to run my code through it, feed the result to lint and then throw all this garbage away again. Code full of procent_x() calls is good for lint but not for me when I want a nicely formatted listing. People who not only like the idea but also want to actually use it may like to know that guido@mcvax improved my version - ask him before you start polishing printfck.c.