On Sun, May 04, 2008 at 07:02:36AM -0700, Patrick Clochesy wrote: > What about using a macro (...) in front of the function to csll it which > passes __VARARGS__, NULL to ensure there is always a trailing NULL? I think > this would at least work in GCC... Can' test on my phone though.
That's a good idea. If one uses __VA_ARGS__ instead of __VARARGS__, it should work with any C99 compliant compiler, including gcc. The good thing about variadic macros in C99[1] is that you don't need a first argument. Roland [1: http://en.wikipedia.org/wiki/Variadic_macro] -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
pgpJYoWnrc9Ch.pgp
Description: PGP signature