store the pre-alphacomposit hook and allow it to be queried.
[AROS.git] / workbench / devs / AHI / Device / C_c_AHI.sd
blob28167c56328a1dbe2ac22126aa07284b259363f4
1 ##stringtype C
2 ##shortstrings
4 /****************************************************************
5    This file was created automatically by `%fv'
6    from "%f0".
8    Do NOT edit by hand!
9 ****************************************************************/
11 #include "ahi_def.h"
13 #include <libraries/locale.h>
14 #include <proto/locale.h>
16 struct FC_Type
17 {   LONG   ID;
18     STRPTR Str;
21 const struct FC_Type _%i = { %d, %s };
23 static struct Catalog *%b_Catalog = NULL;
25 static const struct TagItem %b_tags[] = {
26   { OC_BuiltInLanguage, (IPTR)%l },
27   { OC_Version,         %v },
28   { TAG_DONE,           0  }
31 void Open%bCatalog(struct Locale *loc, STRPTR language)
33   if(LocaleBase != NULL  &&  %b_Catalog == NULL)
34   {
35     %b_Catalog = OpenCatalog(loc, (STRPTR) "%b.catalog",
36         language ? OC_Language : TAG_IGNORE, (ULONG)language,
37         TAG_MORE, %b_tags);
38   }
41 struct Catalog *ExtOpenCatalog(struct Locale *loc, STRPTR language)
43   if(LocaleBase != NULL)
44   {
45     return OpenCatalog(loc, (STRPTR) "%b.catalog",
46         language ? OC_Language : TAG_IGNORE, (ULONG)language,
47         TAG_MORE, %b_tags);
48   }
49   return NULL;
52 void Close%bCatalog(void)
54   if (LocaleBase != NULL)
55   {
56     CloseCatalog(%b_Catalog);
57   }
58   %b_Catalog = NULL;
61 void ExtCloseCatalog(struct Catalog *catalog)
63   if (LocaleBase != NULL)
64   {
65     CloseCatalog(catalog);
66   }
69 STRPTR Get%bString(APTR fcstr)
71   STRPTR defaultstr = ((struct FC_Type *)fcstr)->Str;
72   if (%b_Catalog)
73     return (STRPTR) GetCatalogStr(%b_Catalog, ((struct FC_Type *)fcstr)->ID, defaultstr);
74   return defaultstr;
77 STRPTR GetString(APTR fcstr, struct Catalog *catalog)
79   STRPTR defaultstr = ((struct FC_Type *)fcstr)->Str;
80   if (catalog)
81     return (STRPTR) GetCatalogStr(catalog, ((struct FC_Type *)fcstr)->ID, defaultstr);
82   return defaultstr;