Re: fmtcheck.c
Re: fmtcheck.c
- Subject: Re: fmtcheck.c
- From: email@hidden (Peter Seebach)
- Date: Fri, 01 Jul 2005 21:36:47 -0500
In message <email@hidden>, Steve Chec
koway writes:
>I was using fmtcheck(3) in some code and I noticed that it choked on
>any format specifier that includes positional arguments (for lack of
>a better term).
>For example,
>const char *f1 = "%2$d %1$d";
>const char *f2 = "%d %d";
>printf(fmtcheck(f1, f2), 1, 2);
>will print "1 2" since fmtcheck() cannot tell that they consume the
>same arguments.
I have no spec for the $ syntax.
>It also contains a few bugs such as considering %f and %lf to be
>different. In fact, it doesn't even recognize %lf.
Er, what's %lf? %f takes a double, %Lf takes a long double. I don't
know of any purpose for %lf.
... But of course, that makes your point, because %lf should be treated as
taking the same arguments as %f. Even if there's no reason for anyone to
be using it. :)
>I note in the fmtcheck(3) man page, under BUGS, it says, "The fmtcheck
>() function does not understand all of the conversions that printf(3)
>does." I'm not 100% positive yet, but I think that mine does.
>Would it be worth filing a bug report with Apple about this?
It would probably be worth filing a bug report with Alan Briggs, who has
a specific reason to care whether fmtcheck() is buggy.
-s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >fmtcheck.c (From: Steve Checkoway <email@hidden>) |