home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s038 / 10.ddi / 017.LIF / STDARG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-02  |  603 b   |  26 lines

  1. /* stdarg.h - macros and types for variable argument list to a function
  2.  * $Version: 1.1 $
  3.  * Copyright (C) 1988-91 Intel Corporation, ALL RIGHTS RESERVED
  4.  */
  5.  
  6. #ifndef _stdargh
  7. #define _stdargh
  8. /*lint -library */
  9.  
  10. #ifndef _va_list
  11. #define _va_list
  12. typedef char *va_list;
  13. #endif
  14.  
  15. #define _sizeof_param(type) \
  16.    ((sizeof(type)+sizeof(int)-1) & (~(sizeof(int)-1)))
  17.  
  18. #define va_start(ap,paramn) \
  19.    (ap=((char *)&(paramn)+_sizeof_param(paramn)))
  20. #define va_arg(ap,type) \
  21.    (*((type *)((ap+=_sizeof_param(type))-_sizeof_param(type))))
  22. #define va_end(ap)
  23.  
  24. #endif /* _stdargh */
  25.  
  26.