Unga wrote:
Hi all

I need to implement a variable argument function in C.
The number of args are not known but the type is
known, all are strings.

Unfortunately va_arg() [stdarg(3)] does not return
NULL or any other suitable value after processing the
arg list, it just simply crashes once the arg list is
exhausted.

It seems there is no way to know the number of args
inside the called function.

Why is it in your opinion so hard to count the number of arguments
*before* you call the function, in other words, what in your program
prevents this count?

Peter
--
http://www.boosten.org
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to