[Nickle] Various nits/bugs/defects
Carl Worth
cworth at east.isi.edu
Tue Jun 17 10:47:00 PDT 2003
On Jun 16, Bart Massey wrote:
> In message <E19S85J-0002kt-00 at localhost> you wrote:
> >
> > You never need vprintf; you can just use printf:
> >
> > printf ("%d %d %d\n", (int[3]) { 1, 2, 3} ... )
> >
> > -keith
>
> When did you add that beauty? Frightening, but harmless, I
> guess.
I think this is actually an important feature.
One of my long-standing frustrations with C is that it's easy for a
library writer to export a function with a "..." interface and no
matching va_list interface. Even Keith falls into this, (see
eg. XftFontOpen). The problem with this situation is that it's
impossible to wrap a function using the "..." interface with another
function with the same interface.
So, for variadic functions in C, they must always come in pairs.
What a pain.
> At any rate, for those of us who are not aware of the undocumented
> intricacies of Nickle, vprintf() is nice to have around also :-).
> After all, I note that you now could also remove vfprintf() and
> basically all the v*() functions.
>
> I'd advise leaving them in as a convenience
Documentation is the only bug here. I'd advise ripping out all the
uselessly redundant interfaces.
-Carl
--
Carl Worth
USC Information Sciences Institute cworth at isi.edu
More information about the Nickle
mailing list