varargs.h 473 B

123456789101112
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. typedef char *va_list;
  7. # define __va_sz(mode) (((sizeof(mode) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
  8. # define va_dcl int va_alist;
  9. # define va_start(list) (list = (char *) &va_alist)
  10. # define va_end(list)
  11. # define va_arg(list,mode) (*((mode *)((list += __va_sz(mode)) - __va_sz(mode))))