3 /***************************************************************************
5 BetterString.mcc - A better String gadget MUI Custom Class
6 Copyright (C) 1997-2000 Allan Odgaard
7 Copyright (C) 2005-2013 by BetterString.mcc 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 BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/
21 $Id: C_c.sd 395 2013-02-19 19:13:25Z thboeckel $
23 ***************************************************************************/
25 /****************************************************************
26 This file was created automatically by `FlexCat V1.3'
27 ****************************************************************/
29 #include <proto/locale.h>
31 #include <SDI/SDI_compiler.h>
33 struct FC_Type { const long ID; const char *Str; };
35 const struct FC_Type _%i = { %d, %s };
37 static struct Catalog *BS_Catalog = NULL;
39 /*** Catalog functions ***/
41 const char *GetStr(APTR fcstr)
43 const char *defaultstr = ((struct FC_Type *)fcstr)->Str;
47 return GetCatalogStr(BS_Catalog, ((struct FC_Type *)fcstr)->ID, (STRPTR)defaultstr);
54 // function that will strip out the special menusigns
55 const char *GetStripStr(APTR fcstr)
57 const char *loc_str = GetStr(fcstr);
59 return (0 == loc_str[1] ? &loc_str[2] : loc_str);
65 if (LocaleBase) CloseCatalog(BS_Catalog);
72 static const struct TagItem tags[] = {
73 { OC_BuiltInLanguage, (IPTR)%l },
78 if(LocaleBase && !BS_Catalog)
79 BS_Catalog = OpenCatalogA(NULL, (STRPTR)"%b.catalog", (struct TagItem *)&tags[0]);