Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / system / Wanderer / locale.c
blobeee79e1c03fbb02dd3531f9b975045d4f9c37d67
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
4 */
5 #include "portable_macros.h"
7 #ifdef __AROS__
8 #include <aros/symbolsets.h>
9 #endif
10 #include <exec/types.h>
11 #include <proto/locale.h>
13 #define CATCOMP_ARRAY
14 #include "strings.h"
16 #define CATALOG_NAME "System/System/Wanderer.catalog"
17 #define CATALOG_VERSION 3
19 /*** Variables **************************************************************/
20 struct Catalog *catalog;
23 /*** Functions **************************************************************/
24 /* Main *********************************************************************/
25 CONST_STRPTR _(ULONG id)
27 if (LocaleBase != NULL && catalog != NULL)
29 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
31 else
33 return CatCompArray[id].cca_Str;
37 /* Setup ********************************************************************/
38 BOOL Locale_Initialize(VOID)
40 if (LocaleBase != NULL)
42 catalog = OpenCatalog
44 NULL, CATALOG_NAME, OC_Version, CATALOG_VERSION, TAG_DONE
47 else
49 catalog = NULL;
52 return TRUE;
55 VOID Locale_Deinitialize(VOID)
57 if(LocaleBase != NULL && catalog != NULL) CloseCatalog(catalog);
60 ADD2INIT(Locale_Initialize, 90);
61 ADD2EXIT(Locale_Deinitialize, 90);