Bringing flexcat 2.15 into the main branch
[AROS.git] / tools / flexcat / src / sd / NoAutoC_c.sd
blobbcd6f9db0de24b7fa1dc127153649e2f900aa9c8
1 ##rem $Id: NoAutoC_c.sd 253 2014-02-18 11:15:58Z damato $
2 ##stringtype C
3 ##shortstrings
5 /****************************************************************
7    This file was created automatically by `%fv'
8    from "%f0".
10    Do NOT edit by hand!
12 ****************************************************************/
14 /* Include files */
15 #include <libraries/gadtools.h>
16 #include <proto/locale.h>
17 #include <string.h>
19 #include "%b_cat.h"
21 /* Variables */
22 struct FC_String %b_Strings[] =
24    { %s, %d },
25    { NULL, 0 }
28 static struct Catalog *%bCatalog;
30 void Open%bCatalog()
32    if(LocaleBase != NULL)
33    {
34       if ((%bCatalog = OpenCatalog(NULL, (STRPTR)"%b.catalog",
35                                          OC_BuiltInLanguage, (STRPTR)%l,
36                                          OC_Version, %v,
37                                          TAG_DONE)) != NULL)
38       {
39          struct FC_String *fc;
41          for(fc = %b_Strings; fc->Str; fc++)
42          {
43             fc->Str = (const char *)GetCatalogStr(%bCatalog, fc->Id, (STRPTR)fc->Str);
44          }
45       }
46    }
49 void Close%bCatalog()
51    if(%bCatalog != NULL)
52    {
53       CloseCatalog(%bCatalog);
54       %bCatalog = NULL;
55    }
58 void LocalizeStringArray(STRPTR *Array)
60    STRPTR *x;
62    for(x = Array; *x != NULL; x++)
63    {
64       *x = strdup(%b_Strings[(int)*x].Str);
65    }