[comp.sources.d] Lint like util for printf and friends

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) (09/07/90)

	Does anyone know of a lint like tool that will check the matchup of
the format string of printf (or any varargs function /w a format string) to
it's arguments?  I'd like to get ahold of such a utilitiy.

	Thanks.

	- Scott

--
Scott Presnell				        +1 (415) 476-9890
Pharm. Chem., S-926				Internet: srp@cgl.ucsf.edu
University of California			UUCP: ...ucbvax!ucsfcgl!srp
San Francisco, CA. 94143-0446			Bitnet: srp@ucsfcgl.bitnet

jhpb@granjon.UUCP (Joseph H. Buehler) (09/07/90)

Please post it if it exists.  I'm sure a lot of people would like to
have it.
--
Joe Buehler

hansen@pegasus.ATT.COM (Tony L. Hansen) (09/08/90)

< Does anyone know of a lint like tool that will check the matchup of the
< format string of printf (or any varargs function /w a format string) to
< it's arguments?  I'd like to get ahold of such a utilitiy.

The System V release 4 version of lint knows about printf and scanf formats.
It also provides a /*PRINTFLIKEn*/ and /*SCANFLIKEn*/ lint pragma so that
you can indicate other functions which also accept printf formats.

					Tony Hansen
				att!pegasus!hansen, attmail!tony
				    hansen@pegasus.att.com

moraes@cs.toronto.edu (Mark Moraes) (09/08/90)

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) writes:
>	Does anyone know of a lint like tool that will check the matchup of
>the format string of printf (or any varargs function /w a format string) to
>it's arguments?  I'd like to get ahold of such a utilitiy.

comp.sources.unix (then mod.sources), Volume6, Issue 21 was printfck2
which is probably what you're looking for.  Get it by anon.  ftp or
uucp from your friendly neighbourhood c.s.u archive site
(uunet.uu.net, osu-cis, gatekeeper.dec.com, ...)

[That version was an enhancement by liam@cs.qmc.ac.uk (William Roberts)
from the earlier version in v.4 from guido@mcvax.UUCP (Guido van
Rossum), which was an enhancement of the original from aeb@mcvax.UUCP
(Andries Brouwer) in net.sources, April 85.  I mention this because
Andries' name seems to have gotten lost in the mists of time --
printfck2 just bears his initials, so Ed may as well archive this
trivia for posterity :-]

A version of the net.sources program, modified by Ian Darwin, can be
found in nutshell/lint/printfck.tar.Z -- he refers to it in his
Nutshell book on lint.

	Mark

moraes@cs.toronto.edu (Mark Moraes) (09/10/90)

I wrote:
>A version of the net.sources program, modified by Ian Darwin, can be
>found in nutshell/lint/printfck.tar.Z -- he refers to it in his
>Nutshell book on lint.

That should have been nutshell/lint/printfck.tar.Z on uunet.uu.net.

harrison@necssd.NEC.COM (Mark Harrison) (09/11/90)

In article <srp.652646060@babar.mmwb.ucsf.edu>, srp@babar.mmwb.ucsf.edu (Scott R. Presnell) writes:

> 	Does anyone know of a lint like tool that will check the matchup of
> the format string of printf (or any varargs function /w a format string) to
> it's arguments?  I'd like to get ahold of such a utilitiy.

Gimpel's PC-Lint and Flexe-Lint do this.
-- 
Mark Harrison             harrison@necssd.NEC.COM
(214)518-5050             {necntc, cs.utexas.edu}!necssd!harrison
standard disclaimers apply...