stdarg.h 519 B

1234567891011121314151617181920
  1. /*
  2. * stdarg.h - variable arguments
  3. *
  4. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  5. * See the copyright notice in the ACK home directory, in the file "Copyright".
  6. */
  7. /* $Id$ */
  8. #ifndef _STDARG_H
  9. #define _STDARG_H
  10. typedef char* va_list;
  11. #define __vasz(x) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int) -1))
  12. #define va_start(ap, parmN) (ap = (va_list)&parmN + __vasz(parmN))
  13. #define va_arg(ap, type) (*((type *)(void *)((ap += __vasz(type)) - __vasz(type))))
  14. #define va_end(ap)
  15. #endif