Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / reqtools / rtlocale.c
blob84a85e5ff3670310f86ecae35ccc5bf372a280b6
1 /*********
2 * LOCALE *
3 *********/
5 #include "filereq.h"
7 #include <proto/locale.h>
8 #include <string.h>
10 #ifdef __AROS__
11 #include <aros/macros.h>
12 #endif
14 /****************************************************************************************/
16 char *REGARGS GetStr (struct Catalog *cat, char *idstr)
18 char *local;
19 UWORD id = *(UWORD *)idstr;
21 #ifdef __AROS__
22 #if !AROS_BIG_ENDIAN
23 id = AROS_BE2WORD(id);
24 #endif
25 #endif
26 local = idstr + 2;
27 if (LocaleBase) return ((char *)GetCatalogStr (cat, id, local));
28 return (local);
31 /****************************************************************************************/
33 //ULONG catalogtags[] = { OC_Version, 38, TAG_END };
34 #define catalogtags NULL
36 #undef ThisProcess
37 #define ThisProcess() ((struct Process *)FindTask(NULL))
39 /****************************************************************************************/
41 struct Catalog *REGARGS RT_OpenCatalog (struct Locale *locale)
43 struct Process *proc;
44 struct Catalog *cat;
45 APTR oldwinptr;
47 if (!LocaleBase) return (NULL);
49 proc = ThisProcess();
51 if (proc->pr_Task.tc_Node.ln_Type != NT_PROCESS) return (NULL);
53 oldwinptr = proc->pr_WindowPtr;
54 proc->pr_WindowPtr = (APTR)-1;
55 cat = OpenCatalogA (locale, "System/Libs/reqtools.catalog", (struct TagItem *)catalogtags);
56 proc->pr_WindowPtr = oldwinptr;
58 return (cat);
61 /****************************************************************************************/
63 void REGARGS RT_CloseCatalog (struct Catalog *cat)
65 if (LocaleBase) CloseCatalog (cat);
68 /****************************************************************************************/