Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : STDARG.H

 
Output of file : STDARG.H contained in archive : VCCRT2.ZIP
/***
*stdarg.h - defines ANSI-style macros for variable argument functions
*
* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines ANSI-style macros for accessing arguments
* of functions which take a variable number of arguments.
* [ANSI]
*
****/

#ifndef _INC_STDARG

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _WINDLL
#define _FARARG_ __far
#else
#define _FARARG_
#endif

#if (_MSC_VER <= 600)
#define __far _far
#endif

#ifndef _VA_LIST_DEFINED
typedef char _FARARG_ *va_list;
#define _VA_LIST_DEFINED
#endif

/*
* define a macro to compute the size of a type, variable or expression,
* rounded up to the nearest multiple of sizeof(int). This number is its
* size as function argument (Intel architecture). Note that the macro
* depends on sizeof(int) being a power of 2!
*/

#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )

#define va_start(ap,v) ap = (va_list)&v + _INTSIZEOF(v)
#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
#define va_end(ap) ap = (va_list)0

#ifdef __cplusplus
}
#endif

#define _INC_STDARG
#endif /* _INC_STDARG */


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : STDARG.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/