invoke arch specific distfiles targets
[AROS.git] / tools / FlexCat / C_c_V21.sd
blobaf6e92fc6dcb20a975eee31bc9e2dd177ca554de
1 ##rem $Id$
2 ##stringtype C
3 ##shortstrings
4 /****************************************************************
5    This file was created automatically by `%fv'
6    from "%f0".
8    Do NOT edit by hand!
9 ****************************************************************/
11 #if defined(__SASC)  ||  defined(_DCC)
12 #include <proto/locale.h>
13 #elif defined(__GNUC__)
14 #include <inline/locale.h>
15 #else
16 #include <clib/locale_protos.h>
17 #endif
22 static LONG %b_Version = %v;
23 static const STRPTR %b_BuiltInLanguage = (STRPTR) %l;
25 struct FC_Type
26 {   LONG   ID;
27     STRPTR Str;
31 const struct FC_Type _%i = { %d, %s };
34 static struct Catalog *%b_Catalog = NULL;
36 void Open%bCatalog(struct Locale *loc, STRPTR language)
37 { LONG tag, tagarg;
38   extern struct Library *LocaleBase;
39   extern void Close%bCatalog(void);
41   Close%bCatalog(); /* Not needed if the programmer pairs Open%bCatalog
42                        and Close%bCatalog right, but does no harm.  */
44   if (LocaleBase != NULL  &&  %b_Catalog == NULL)
45   { if (language == NULL)
46     { tag = TAG_IGNORE;
47     }
48     else
49     { tag = OC_Language;
50       tagarg = (LONG) language;
51     }
52     %b_Catalog = OpenCatalog(loc, (STRPTR) "%b.catalog",
53                                 OC_BuiltInLanguage, %b_BuiltInLanguage,
54                                 tag, tagarg,
55                                 OC_Version, %b_Version,
56                                 TAG_DONE);
57   }
60 void Close%bCatalog(void)
61 { if (LocaleBase != NULL)
62   { CloseCatalog(%b_Catalog);
63   }
64   %b_Catalog = NULL;
67 STRPTR Get%bString(APTR fcstr)
68 { STRPTR defaultstr;
69   LONG strnum;
71   strnum = ((struct FC_Type *) fcstr)->ID;
72   defaultstr = ((struct FC_Type *) fcstr)->Str;
74   return(%b_Catalog ? GetCatalogStr(%b_Catalog, strnum, defaultstr) :
75                       defaultstr);