1 /* |
|
2 * Copyright (C) 2003 Imendio AB |
|
3 * |
|
4 * This program is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Lesser General Public License as |
|
6 * published by the Free Software Foundation; either version 2 of the |
|
7 * License, or (at your option) any later version. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 * Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public |
|
15 * License along with this program; if not, write to the |
|
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
17 * Boston, MA 02111-1307, USA. |
|
18 */ |
|
19 |
|
20 #ifndef _LIBLOUDMOUTHMACROS_WSD_DEFS_H_ |
|
21 #define _LIBLOUDMOUTHMACROS_WSD_DEFS_H_ |
|
22 |
|
23 #if (defined(SYMBIAN) && (defined(__WINSCW__) || defined(__WINS__))) |
|
24 #if EMULATOR |
|
25 #undef EMULATOR |
|
26 #endif |
|
27 #ifdef GET_WSD_VAR_NAME |
|
28 #undef GET_WSD_VAR_NAME |
|
29 #endif |
|
30 |
|
31 #define EMULATOR (defined(SYMBIAN) && (defined(__WINSCW__) || defined(__WINS__))) |
|
32 #define GET_WSD_VAR_NAME(var,filename,prefix) _##prefix##_##filename##_##var |
|
33 |
|
34 #define RETURN_WSD_VAR(var,filename,prefix) (libloudmouth_ImpurePtr()->GET_WSD_VAR_NAME(var,filename,prefix)) |
|
35 |
|
36 #define GET_WSD_VAR_FROM_TLS(var,filename,type,prefix)\ |
|
37 type *_##prefix##_##filename##_##var()\ |
|
38 {\ |
|
39 return (&RETURN_WSD_VAR(var,filename,prefix));\ |
|
40 } |
|
41 |
|
42 #define GET_WSD_ARRAY_FROM_TLS(var,filename,type,prefix)\ |
|
43 type *_##prefix##_##filename##_##var()\ |
|
44 {\ |
|
45 return (RETURN_WSD_VAR(var,filename,prefix));\ |
|
46 } |
|
47 |
|
48 #define VARIABLE_DECL(var,varprefix,filename,datatype)\ |
|
49 datatype GET_WSD_VAR_NAME(var,filename,varprefix); |
|
50 |
|
51 #define VARIABLE_DECL_ARRAY(var,prefix,filename,datatype,size) \ |
|
52 datatype GET_WSD_VAR_NAME(var,filename,prefix)[size]; |
|
53 |
|
54 #define VARIABLE_DECL_2DARRAY(var,prefix,filename,datatype,size,size1) \ |
|
55 datatype GET_WSD_VAR_NAME(var,filename,prefix)[size][size1]; |
|
56 |
|
57 |
|
58 #define GET_STATIC_VAR_FROM_TLS(var,filename,type) GET_WSD_VAR_FROM_TLS(var,filename,type,s) |
|
59 |
|
60 #define GET_GLOBAL_VAR_FROM_TLS(var,filename,type) GET_WSD_VAR_FROM_TLS(var,filename,type,g) |
|
61 |
|
62 #define GET_STATIC_ARRAY_FROM_TLS(var,filename,type) GET_WSD_ARRAY_FROM_TLS(var,filename,type,s) |
|
63 |
|
64 #define GET_GLOBAL_ARRAY_FROM_TLS(var,filename,type) GET_WSD_ARRAY_FROM_TLS(var,filename,type,g) |
|
65 |
|
66 #endif |
|
67 #endif //_LIBLOUDMOUTHMACROS_WSD_DEFS_H_ |
|