varargs.h
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:1k
源码类别:

操作系统开发

开发平台:

Visual C++

  1. /***
  2. *varargs.h - XENIX style macros for variable argument functions
  3. *
  4. *   Copyright (c) 1985-1988, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   This file defines XENIX style macros for accessing arguments of a
  8. *   function which takes a variable number of arguments.
  9. *   [System V]
  10. *
  11. *******************************************************************************/
  12. #ifndef _VA_LIST_DEFINED
  13. typedef char *va_list;
  14. #define _VA_LIST_DEFINED
  15. #endif
  16. #define va_dcl va_list va_alist;
  17. #define va_start(ap) ap = (va_list)&va_alist
  18. #define va_arg(ap,t) ((t *)(ap += sizeof(t)))[-1]
  19. #define va_end(ap) ap = NULL