Annotation of mstools/h/stdarg.h, revision 1.1.1.2

1.1       root        1: /***
                      2: *stdarg.h - defines ANSI-style macros for variable argument functions
                      3: *
                      4: *      Copyright (c) 1985-1991, 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: 
                     13: #ifndef _INC_STDARG
                     14: 
                     15: #ifdef __cplusplus
                     16: extern "C" {
                     17: #endif
                     18: 
                     19: 
                     20: 
                     21: #ifndef _VA_LIST_DEFINED
                     22: typedef char * va_list;
                     23: #define _VA_LIST_DEFINED
                     24: #endif
                     25: 
1.1.1.2 ! root       26: #ifdef i386
        !            27: 
1.1       root       28: #define _INTSIZEOF(n)  ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) 
                     29: 
                     30: #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
                     31: #define va_arg(ap,t)   ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
                     32: #define va_end(ap)     ( ap = (va_list)0 )
                     33: 
1.1.1.2 ! root       34: #endif
        !            35: 
        !            36: #ifdef M_MRX000
        !            37: #define va_start(ap,v) _va_start(&(ap),0)
        !            38: #define va_arg(ap,t) *((t*)(_va_arg(&(ap),sizeof(t),(t*)0,(t*)0)))
        !            39: #define va_end(ap)
        !            40: #else
        !            41: 
        !            42: #ifdef MIPS
        !            43: 
        !            44: #define va_start(ap,v) ap  = (va_list)&v + sizeof(v)
        !            45: #define va_end(list)
        !            46: #define va_arg(list, mode) ((mode *)(list =\
        !            47:  (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
        !            48:  (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]
        !            49: 
        !            50: /*  +++++++++++++++++++++++++++++++++++++++++++
        !            51:     Because of parameter passing conventions in C:
        !            52:     use mode=int for char, and short types
        !            53:     use mode=double for float types
        !            54:     use a pointer for array types
        !            55:     +++++++++++++++++++++++++++++++++++++++++++ */
        !            56: 
        !            57: 
        !            58: #endif
        !            59: #endif
        !            60: 
        !            61: 
        !            62: 
1.1       root       63: #ifdef __cplusplus
                     64: }
                     65: #endif
                     66: 
                     67: #define _INC_STDARG
                     68: #endif /* _INC_STDARG */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.