Merging NList MCC 0.119 into the main branch.
[AROS.git] / workbench / classes / zune / nlist / nlisttree_mcp / C_c.sd
blobc35954c93e241435efcbda127c50a9a1a71d0977
1 ##stringtype C
2 ##shortstrings
3 /***************************************************************************
5  NListtree.mcc - New Listtree MUI Custom Class
6  Copyright (C) 1999-2001 by Carsten Scholling
7  Copyright (C) 2001-2014 NList Open Source Team
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  Lesser General Public License for more details.
19  NList classes Support Site:  http://www.sf.net/projects/nlist-classes
21  $Id: C_c.sd 716 2014-01-26 09:32:35Z damato $
23 ***************************************************************************/
25  /*
26   * If this file is named 'locale.c' it is automatically
27   * generated by 'FlexCat' from C_c.sd. PLEASE DO NOT EDIT!!!
28   */
30 #include <proto/locale.h>
32 #include <SDI/SDI_compiler.h>
33 #include "Debug.h"
35 struct FC_Type { const long ID; const char * const Str; };
37 const struct FC_Type _%i = { %d, %s };
39 static struct Catalog *NL_Catalog = NULL;
41 /*** Catalog functions ***/
42 /// tr()
43 const char *tr(const void *fcstr)
45   const char *defaultstr = ((struct FC_Type *)fcstr)->Str;
47   if(LocaleBase)
48     return (const char *)GetCatalogStr(NL_Catalog, ((struct FC_Type *)fcstr)->ID, (STRPTR)defaultstr);
50   return defaultstr;
52 ///
53 /// CloseCat()
54 void CloseCat(void)
56   ENTER();
58   if(NL_Catalog)
59   {
60     CloseCatalog(NL_Catalog);
61     NL_Catalog = NULL;
62   }
64   LEAVE();
66 ///
67 /// OpenCat(void)
68 BOOL OpenCat(void)
70   static const struct TagItem tags[] = {
71                                          { OC_BuiltInLanguage, (IPTR)%l },
72                                          { OC_Version,         %v },
73                                          { TAG_DONE,           0  }
74                                        };
76   ENTER();
78   if(LocaleBase && NL_Catalog == NULL)
79     NL_Catalog = OpenCatalogA(NULL, (STRPTR)"%b.catalog", (struct TagItem *)&tags[0]);
81   RETURN((BOOL)(NL_Catalog != NULL));
82   return (BOOL)(NL_Catalog != NULL);
84 ///