home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / INCLUDE.ZIP / STDARG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  859 b   |  41 lines

  1. /*    stdarg.h
  2.  
  3.     Definitions for accessing parameters in functions that accept
  4.     a variable number of arguments.
  5.  
  6.         Copyright (c) Borland International 1987,1988,1990
  7.     All Rights Reserved.
  8. */
  9.  
  10. #ifndef __STDARG_H
  11. #define __STDARG_H
  12.  
  13. #if __STDC__
  14. #define _Cdecl
  15. #else
  16. #define _Cdecl    cdecl
  17. #endif
  18.  
  19. #ifndef __PAS__
  20. #define _CType _Cdecl
  21. #else
  22. #define _CType pascal
  23. #endif
  24.  
  25. typedef void *va_list;
  26.  
  27. #ifdef  __cplusplus                                 
  28. #define va_start(ap, parmN)    (ap = ...)
  29. #else
  30. #define va_start(ap, parmN)    ((void)((ap) = (va_list)((char *)(&parmN)+((sizeof(parmN)+1) & 0xFFFE))))
  31. #endif
  32.  
  33. #define va_arg(ap, type)    (*(type *)(((*(char **)&(ap))+=((sizeof(type)+1) & 0xFFFE))-(((sizeof(type)+1) & 0xFFFE))))
  34. #define va_end(ap)          ((void)0)
  35.  
  36. #if !__STDC__
  37. #define _va_ptr                (...)
  38. #endif
  39.  
  40. #endif
  41.