revert between 56095 -> 55830 in arch
[AROS.git] / workbench / locale / countries / makecountry / countryprefs.c
blobb3d0aeadfec6152f315b2ad2304d552a345e0d63
1 /*
2 Copyright © 2008-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: makecountry code that needs access to AROS structures and types
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include "country_locale.h"
12 #define EC(x)\
14 (x) = (((x) & 0xFF000000) >> 24)\
15 | (((x) & 0x00FF0000) >> 8)\
16 | (((x) & 0x0000FF00) << 8)\
17 | (((x) & 0x000000FF) << 24);\
20 unsigned long getCountryPrefsSize()
22 return sizeof(struct CountryPrefs);
25 unsigned long getCountryPrefsVers(struct IntCountryPrefs *cp)
27 return (unsigned long)cp->country_Version;
30 unsigned long getCountryPrefsFlag(struct IntCountryPrefs *cp)
32 return (unsigned long)cp->country_Flag;
35 unsigned long getCountryNames(struct IntCountryPrefs *cp)
37 return (unsigned long)cp->country_NativeNames;
40 void convertEndianness(struct CountryPrefs *cp)
42 #if (AROS_BIG_ENDIAN == 0)
43 /* We have to convert the endianness of this data,
44 thankfully there are only two fields which this applies
45 to.
47 EC(cp->cp_CountryCode);
48 EC(cp->cp_TelephoneCode);
49 #endif