home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c040 / 6.ddi / INCLUDE / STDARG.H$ / STDARG.bin
Encoding:
Text File  |  1990-01-08  |  894 b   |  43 lines

  1. /***
  2. *stdarg.h - defines ANSI-style macros for variable argument functions
  3. *
  4. *    Copyright (c) 1985-1990, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file defines ANSI-style macros for accessing arguments
  8. *    of functions which take a variable number of arguments.
  9. *    [ANSI]
  10. *
  11. ****/
  12.  
  13. #if defined(_DLL) && !defined(_MT)
  14. #error Cannot define _DLL without _MT
  15. #endif
  16.  
  17. #ifdef _MT
  18. #define _FAR_ _far
  19. #else
  20. #define _FAR_
  21. #endif
  22.  
  23. /* define NULL pointer value */
  24.  
  25. #ifndef NULL
  26. #if (_MSC_VER >= 600)
  27. #define NULL    ((void *)0)
  28. #elif (defined(M_I86SM) || defined(M_I86MM))
  29. #define NULL    0
  30. #else
  31. #define NULL    0L
  32. #endif
  33. #endif
  34.  
  35. #ifndef _VA_LIST_DEFINED
  36. typedef char _FAR_ *va_list;
  37. #define _VA_LIST_DEFINED
  38. #endif
  39.  
  40. #define va_start(ap,v) ap = (va_list)&v + sizeof(v)
  41. #define va_arg(ap,t) ((t _FAR_ *)(ap += sizeof(t)))[-1]
  42. #define va_end(ap) ap = NULL
  43.