home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / STDARG.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  917b  |  41 lines

  1. /*  stdarg.h
  2.  
  3.     Definitions for accessing parameters in functions that accept
  4.     a variable number of arguments.
  5.  
  6. */
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 8.0
  10.  *
  11.  *      Copyright (c) 1987, 1997 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15. /* $Revision:   8.1  $ */
  16.  
  17. #ifndef __STDARG_H
  18. #define __STDARG_H
  19.  
  20. #ifdef __VARARGS_H
  21. #error Can't include both STDARG.H and VARARGS.H
  22. #endif
  23.  
  24. #if !defined(___DEFS_H)
  25. #include <_defs.h>
  26. #endif
  27.  
  28. typedef void _FAR *va_list;
  29.  
  30. #define __size(x) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int)-1))
  31.  
  32. #define va_start(ap, parmN) ((void)((ap) = (va_list)((char _FAR *)(&parmN)+__size(parmN))))
  33. #define va_arg(ap, type) (*(type _FAR *)(((*(char _FAR *_FAR *)&(ap))+=__size(type))-(__size(type))))
  34. #define va_end(ap)          ((void)0)
  35.  
  36. #if !defined(__STDC__)
  37. #define _va_ptr             (...)
  38. #endif
  39.  
  40. #endif  /* __STDARG_H */
  41.