stdarg_e.h

Go to the documentation of this file.
00001 /* STDARG_E.H
00002  *
00003  * © Portions copyright (c) 2005 Nokia Corporation.  All rights reserved.
00004  * Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
00005  */
00006 
00007 
00008 
00009 /*
00010  *
00011  * This is all somewhat tortured because ANSI C says that stdio.h is not supposed 
00012  * to define va_list: it needs to have access to that data type, but must not use that name.
00013  * Instead stdio.h should use an __ name, which is safe because it is reserved for 
00014  * the implementation.  Hence __e32_va_list.
00015  */
00016 
00017 #ifndef _STDARG_E_H
00018 #define _STDARG_E_H
00019 
00023 typedef char* __e32_va_list;
00024 
00025 #define va_start(ap,pn) (ap=(__e32_va_list)&pn+((sizeof(pn)+sizeof(int)-1)&~(sizeof(int)-1)),(void)0)
00026 #define va_arg(ap,type) (ap+=((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1)),(*(type *)(ap-((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1)))))
00027 #define va_end(ap) (ap=0,(void)0)
00028 
00029 #endif

Copyright © Nokia Corporation 2001-2008
Back to top