add casts to zune macros to silence some warnings
[tangerine.git] / workbench / prefs / locale / locale.c
blobf67959d0abf56a65f4c07ee7b50ec1a4b9a8668a
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define CATCOMP_ARRAY
7 #include "strings.h"
9 #include "global.h"
11 /*********************************************************************************************/
13 void InitLocale(STRPTR catname, ULONG version)
15 #ifdef __AROS__
16 LocaleBase = (struct LocaleBase *)OpenLibrary("locale.library", 39);
17 #else
18 LocaleBase = (struct Library *)OpenLibrary("locale.library", 39);
19 #endif
20 if (LocaleBase)
22 catalog = OpenCatalog(NULL, catname, OC_Version, version,
23 TAG_DONE);
27 /*********************************************************************************************/
29 void CleanupLocale(void)
31 if (catalog) CloseCatalog(catalog);
32 if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
35 /*********************************************************************************************/
37 CONST_STRPTR MSG(ULONG id)
39 if (catalog != NULL)
41 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
43 else
45 return CatCompArray[id].cca_Str;
49 /*********************************************************************************************/