Merging NList MCC 0.119 into the main branch.
[AROS.git] / workbench / classes / zune / nlist / nlistviews_mcp / C_c.sd
blobb443a4156962e84c72e9a720bd3158d9a27f68f0
1 ##stringtype C
2 ##shortstrings
3 /***************************************************************************
5  NListviews.mcp - New Listview MUI Custom Class Preferences
6  Registered MUI class, Serial Number: 1d51 (0x9d510001 to 0x9d51001F
7                                             and 0x9d510101 to 0x9d51013F)
9  Copyright (C) 1996-2001 by Gilles Masson
10  Copyright (C) 2001-2014 NList Open Source Team
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Lesser General Public
14  License as published by the Free Software Foundation; either
15  version 2.1 of the License, or (at your option) any later version.
17  This library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  Lesser General Public License for more details.
22  NList classes Support Site:  http://www.sf.net/projects/nlist-classes
24  $Id: C_c.sd 716 2014-01-26 09:32:35Z damato $
26 ***************************************************************************/
28  /*
29   * If this file is named 'locale.c' it is automatically
30   * generated by 'FlexCat' from C_c.sd. PLEASE DO NOT EDIT!!!
31   */
33 #include <proto/locale.h>
35 #include <SDI/SDI_compiler.h>
36 #include "Debug.h"
38 struct FC_Type { const long ID; const char * const Str; };
40 const struct FC_Type _%i = { %d, %s };
42 static struct Catalog *NL_Catalog = NULL;
44 /*** Catalog functions ***/
45 /// tr()
46 const char *tr(const void *fcstr)
48   const char *defaultstr = ((struct FC_Type *)fcstr)->Str;
50   if(LocaleBase)
51     return (const char *)GetCatalogStr(NL_Catalog, ((struct FC_Type *)fcstr)->ID, (STRPTR)defaultstr);
53   return defaultstr;
55 ///
56 /// CloseCat()
57 void CloseCat(void)
59   ENTER();
61   if(NL_Catalog)
62   {
63     CloseCatalog(NL_Catalog);
64     NL_Catalog = NULL;
65   }
67   LEAVE();
69 ///
70 /// OpenCat(void)
71 BOOL OpenCat(void)
73   static const struct TagItem tags[] = {
74                                          { OC_BuiltInLanguage, (IPTR)%l },
75                                          { OC_Version,         %v },
76                                          { TAG_DONE,           0  }
77                                        };
79   ENTER();
81   if(LocaleBase && NL_Catalog == NULL)
82     NL_Catalog = OpenCatalogA(NULL, (STRPTR)"%b.catalog", (struct TagItem *)&tags[0]);
84   RETURN((BOOL)(NL_Catalog != NULL));
85   return (BOOL)(NL_Catalog != NULL);
87 ///