added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / utilities / More / locale.c
blob9f24b53b70fe69775eae57793c4f834ee22fc7cd
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 <libraries/locale.h>
10 #include <proto/locale.h>
11 #include <proto/exec.h>
12 #include <proto/alib.h>
14 #define DEBUG 0
15 #include <aros/debug.h>
17 /*********************************************************************************************/
19 struct LocaleBase *LocaleBase;
20 struct Catalog *catalog;
22 /*********************************************************************************************/
24 void InitLocale(STRPTR catname, ULONG version)
26 LocaleBase = (struct LocaleBase *)OpenLibrary("locale.library", 39);
27 if (LocaleBase)
29 catalog = OpenCatalog(NULL, catname, OC_Version, version,
30 TAG_DONE);
34 /*********************************************************************************************/
36 void CleanupLocale(void)
38 if (catalog) CloseCatalog(catalog);
39 if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
42 /*********************************************************************************************/
44 CONST_STRPTR MSG(ULONG id)
46 if (catalog)
48 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
49 } else {
50 return CatCompArray[id].cca_Str;
54 /*********************************************************************************************/