Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / system / Wanderer / Tools / WBRename / locale.c
blob57a2479d2185c2c5adf80b4699fbacbf9604723b
1 /*
2 Copyright © 2006, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <exec/types.h>
8 #include <proto/locale.h>
9 #include <proto/dos.h>
11 #define CATCOMP_ARRAY
12 #include "strings.h"
14 #define CATALOG_NAME "System/System/Wanderer/Tools/WBRename.catalog"
15 #define CATALOG_VERSION 0
17 /*** Variables **************************************************************/
18 static struct Catalog *catalog;
21 /*** Functions **************************************************************/
22 /* Main *********************************************************************/
23 CONST_STRPTR _(ULONG id)
25 if (LocaleBase != NULL && catalog != NULL)
27 return GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
29 else
31 return CatCompArray[id].cca_Str;
35 STRPTR GetDosErrorString(LONG code)
37 static UBYTE buffer[80];
38 Fault(code, NULL, buffer, sizeof buffer);
39 return buffer;
42 /* Setup ********************************************************************/
43 BOOL Locale_Initialize(VOID)
45 if (LocaleBase != NULL)
47 catalog = OpenCatalog
49 NULL, CATALOG_NAME, OC_Version, CATALOG_VERSION, TAG_DONE
52 else
54 catalog = NULL;
57 return TRUE;
60 VOID Locale_Deinitialize(VOID)
62 if(LocaleBase != NULL && catalog != NULL) CloseCatalog(catalog);
65 ADD2INIT(Locale_Initialize, 90);
66 ADD2EXIT(Locale_Deinitialize, 90);