home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / STDARG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  1.0 KB  |  51 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,1991
  7.     All Rights Reserved.
  8. */
  9.  
  10. #ifndef __STDARG_H
  11. #define __STDARG_H
  12.  
  13. #ifdef __VARARGS_H
  14. #error Can't include both STDARG.H and VARARGS.H
  15. #endif
  16.  
  17. #ifdef __DLL__
  18. #define _FAR far
  19. #else
  20. #define _FAR
  21. #endif
  22.  
  23. #if __STDC__
  24. #define _Cdecl
  25. #else
  26. #define _Cdecl  cdecl
  27. #endif
  28.  
  29. #ifndef __PAS__
  30. #define _CType _Cdecl
  31. #else
  32. #define _CType pascal
  33. #endif
  34.  
  35. typedef void _FAR *va_list;
  36.  
  37. #ifdef  __cplusplus                                 
  38. #define va_start(ap, parmN) (ap = ...)
  39. #else
  40. #define va_start(ap, parmN) ((void)((ap) = (va_list)((char _FAR *)(&parmN)+((sizeof(parmN)+1) & 0xFFFE))))
  41. #endif
  42.  
  43. #define va_arg(ap, type) (*(type _FAR *)(((*(char _FAR *_FAR *)&(ap))+=((sizeof(type)+1) & 0xFFFE))-(((sizeof(type)+1) & 0xFFFE))))
  44. #define va_end(ap)          ((void)0)
  45.  
  46. #if !__STDC__
  47. #define _va_ptr             (...)
  48. #endif
  49.  
  50. #endif
  51.