MacArthur, Ian (SELEX GALILEO, UK) wrote:
> 
> First off - this question is too hard for my brain...
> 
>> the variadic (sp?)
> 
> That's how I'd spell it. Doesn't mean it's right though.

For what it's worth, so does Wikipedia: 
http://en.wikipedia.org/wiki/Variadic

> (snip)
>
> In the short term, you can presumably switch the order of the parameters
> "const char *fmt, const char *title", and all will be well?

That's what I ended up doing. I just found it too weird to use va_start() 
with a parameter that wasn't related to the printf-style expansion (e.g. 
va_start(ap, title) where title is not the format string. There are probably 
valid cases for this, but I'd rather just reorder the arguments when it's 
possible to do so.

I did learn something else though from examining the FLTK source for 
fl_choice, and that is that "__attribute__((format(printf, m, n)))" is 
great! It's too bad that compiler couldn't figure this out itself though. 
The warnings that GCC produces[1] for miss-used functions with this 
attribute tagging gives are wonderful.

[1] http://unixwiz.net/techtips/gnu-c-attributes.html

Alvin


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to