home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / INCLUDE / STDARG.H < prev    next >
Text File  |  1993-09-17  |  2KB  |  48 lines

  1. #pragma info( none )
  2. #ifndef __CHKHDR__
  3.    #pragma info( none )
  4. #endif
  5. #pragma info( restore )
  6.  
  7. #ifndef __stdarg_h
  8.    #define __stdarg_h
  9.  
  10.    #ifdef __cplusplus
  11.       extern "C" {
  12.    #endif
  13.  
  14.    /********************************************************************/
  15.    /*  <stdarg.h> header file                                          */
  16.    /*                                                                  */
  17.    /*  Licensed Materials - Property of IBM                            */
  18.    /*                                                                  */
  19.    /*  IBM C/C++ Tools Version 2.01                                    */
  20.    /*  Copyright (C) International Business Machines Corp., 1991,1993  */
  21.    /*  All rights reserved                                             */
  22.    /*                                                                  */
  23.    /*  US Government Users Restricted Rights -                         */
  24.    /*  Use, duplication, or disclosure restricted                      */
  25.    /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  26.    /*                                                                  */
  27.    /********************************************************************/
  28.  
  29.    typedef char *va_list;
  30.  
  31.    #define __nextword(base)   (((unsigned)(sizeof(base))+3U)&~(3U))
  32.  
  33.    #define va_start(ap, last) ap = ((va_list)&last) + __nextword(last)
  34.    #define va_arg(ap, type)   ((type *) ((ap += (int) __nextword(type)) - __nextword(type)))[0]
  35.    #define va_end(ap)         ap = 0
  36.  
  37.    #ifdef __cplusplus
  38.       }
  39.    #endif
  40.  
  41. #endif
  42.  
  43. #pragma info( none )
  44. #ifndef __CHKHDR__
  45.    #pragma info( restore )
  46. #endif
  47. #pragma info( restore )
  48.