Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
852 B

  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. #if defined(_DLL) && !defined(_MT)
  13. #error Cannot define _DLL without _MT
  14. #endif
  15. #ifdef _MT
  16. #define _FAR_ _far
  17. #else
  18. #define _FAR_
  19. #endif
  20. /* define NULL pointer value */
  21. #ifndef NULL
  22. #if (_MSC_VER >= 600)
  23. #define NULL ((void *)0)
  24. #elif (defined(M_I86SM) || defined(M_I86MM))
  25. #define NULL 0
  26. #else
  27. #define NULL 0L
  28. #endif
  29. #endif
  30. #ifndef _VA_LIST_DEFINED
  31. typedef char _FAR_ *va_list;
  32. #define _VA_LIST_DEFINED
  33. #endif
  34. #define va_start(ap,v) ap = (va_list)&v + sizeof(v)
  35. #define va_arg(ap,t) ((t _FAR_ *)(ap += sizeof(t)))[-1]
  36. #define va_end(ap) ap = NULL