prism2.device: Compiler delint
[AROS.git] / workbench / utilities / MultiView / locale.c
blob7856707f66e2920e1bfeaddb2105d6c49fb016f5
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 #include "compilerspecific.h"
12 #include "debug.h"
14 /*********************************************************************************************/
16 void InitLocale(STRPTR catname, ULONG version)
18 #ifdef __AROS__
19 LocaleBase = (struct LocaleBase *)OpenLibrary("locale.library", 39);
20 #else
21 LocaleBase = (struct Library *)OpenLibrary("locale.library", 39);
22 #endif
23 if (LocaleBase)
25 catalog = OpenCatalog(NULL, catname, OC_Version, version,
26 TAG_DONE);
30 /*********************************************************************************************/
32 void CleanupLocale(void)
34 if (catalog) CloseCatalog(catalog);
35 if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
38 /*********************************************************************************************/
40 CONST_STRPTR MSG(ULONG id)
42 if (catalog)
44 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
45 } else {
46 return CatCompArray[id].cca_Str;
50 /*********************************************************************************************/