equal
deleted
inserted
replaced
1 stdarg_e.h |
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * This is all somewhat tortured because ANSI C says that stdio.h is not supposed |
|
16 * to define va_list: it needs to have access to that data type, but must not use that name. |
|
17 * Instead stdio.h should use an __ name, which is safe because it is reserved for |
|
18 * the implementation. Hence __e32_va_list. |
|
19 * |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 /** |
|
30 @file |
|
31 @publishedAll |
|
32 @released |
|
33 */ |
|
34 |
|
35 #ifndef _STDARG_E_H |
|
36 #define _STDARG_E_H |
|
37 |
|
38 /** |
|
39 EPOC32 definitions, extracted from E32DEFS.H |
|
40 */ |
|
41 typedef char* __e32_va_list; |
|
42 |
|
43 #define va_start(ap,pn) (ap=(__e32_va_list)&pn+((sizeof(pn)+sizeof(int)-1)&~(sizeof(int)-1)),(void)0) |
|
44 #define va_arg(ap,type) (ap+=((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1)),(*(type *)(ap-((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1))))) |
|
45 #define va_end(ap) (ap=0,(void)0) |
|
46 |
|
47 #endif |