add casts to zune macros to silence some warnings
[tangerine.git] / workbench / prefs / serial / locale.c
blob19cb1d1b1ea53490da9b947f7f6fc346032bc451
1 /*
2 Copyright © 1995-2001, 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 /*********************************************************************************************/
51 VOID LocalizeLabels(CONST_STRPTR * labels)
53 CONST_STRPTR local;
55 while (*labels) {
56 local = MSG((ULONG) *labels);
57 *labels++ = local;