gwyn@brl-smoke.ARPA (Doug Gwyn ) (10/08/87)
Would anyone who knows of an implementation of <varargs.h>
(or <stdarg.h>) that doesn't approximate the usual model:
typedef char *va_list;
#define va_dcl int va_alist;
#define va_start(list) list = (char *) &va_alist
#define va_end(list)
#ifdef gould
#define va_arg(list, mode) ((mode *)(list = \
(char *) (sizeof(mode) > 4 ? (int)list + 2*8 - 1 & -8 \
: (int)list + 2*4 - 1 & -4)))[-1]
#elif defined(u370)
#define va_arg(list, mode) ((mode *)(list = \
(char *) ((int)list + 2*sizeof(mode) - 1 & -sizeof(mode))))[-1]
#else /* VAX, PDP-11, 3B, etc. */
#define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1]
#endif
please send me as much information as you can about it.
In particular, I would like to hear from anyone who thinks
that va_start() and va_end() must expand to something
containing, respectively, { and }, as I remember seeing
once on a Pyramid OSx system.
This information will be used to help determine the ANSI C
specs for <stdarg.h>, so it's important! Send me E-mail
directly, posting to the newsgroup only if you can't seem
to get mail to me. Thanks.
- Gwyn@BRL.MIL