Is it possible to determine if you've read past the end of a va_list? As far as I can tell, when you go past the end of the list, va_arg returns a pointer that is not NULL, but it is bogus. When this pointer is passed to one of the string api's, the emulator throws a bus error. The value of the pointer is 03FD0000, but I assume that it is not safe to check against that.
The C standard says that you need to have a method, outside va_args, for determining when you're done. printf uses its format string. Some other functions require the last parameter be NULL, or that you provide a parameter count up front.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/