add a missing section header table index conversion
[tangerine.git] / workbench / prefs / time / locale.c
blobfa67fe3517416ef72d17412c29d11a02dec4e525
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 STRPTR MSG(ULONG id)
39 STRPTR retval;
41 if (catalog)
43 retval = (STRPTR)GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
44 } else {
45 retval = CatCompArray[id].cca_Str;
48 return retval;
51 /*********************************************************************************************/