Some variables and functions renamed to make their purpose more clear.
[AROS.git] / workbench / tools / BoingIconBar / locale.c
blob92cfda27fb35c844dfa89dfdcd388a7b81102c3c
1 /*
2 Copyright © 1995-2006 AROS Development Team. All rights reserved.
3 $Id: locale.c 30792 2009-03-07 22:40:04Z neil $
4 */
6 #include <aros/symbolsets.h>
7 #include <exec/types.h>
8 #include <proto/locale.h>
10 #define CATCOMP_ARRAY
11 #include "strings.h"
13 #define CATALOG_NAME "System/Prefs/BIBPrefs.catalog"
14 #define CATALOG_VERSION 0
16 /*** Variables **************************************************************/
17 static struct Catalog *catalog;
20 /*** Functions **************************************************************/
21 /* Main *********************************************************************/
22 CONST_STRPTR _(ULONG id)
24 if (LocaleBase != NULL && catalog != NULL)
26 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
28 else
30 return CatCompArray[id].cca_Str;
34 /* Setup ********************************************************************/
35 BOOL Locale_Initialize(VOID)
37 if (LocaleBase != NULL)
39 catalog = OpenCatalog
41 NULL, CATALOG_NAME, OC_Version, CATALOG_VERSION, TAG_DONE
44 else
46 catalog = NULL;
49 return TRUE;
52 VOID Locale_Deinitialize(VOID)
54 if(LocaleBase != NULL && catalog != NULL) CloseCatalog(catalog);
57 ADD2INIT(Locale_Initialize, 90);
58 ADD2EXIT(Locale_Deinitialize, 90);