1 ##rem $Id: C_c.sd,v 1.5 2009/10/19 16:44:26 marust Exp $
4 /****************************************************************
5 This file was created automatically by `%fv'
9 ****************************************************************/
11 /****************************************************************
12 This file uses the auto initialization possibilities of
13 Dice, gcc and SAS/C, respectively.
15 Dice does this by using the keywords __autoinit and
16 __autoexit, SAS uses names beginning with _STI or
17 _STD, respectively. gcc uses the asm() instruction,
18 to emulate C++ constructors and destructors.
20 Using this file you don't have *all* possibilities of
21 the locale.library. (No Locale or Language arguments are
22 supported when opening the catalog. However, these are
23 *very* rarely used, so this should be sufficient for most
25 ****************************************************************/
29 Include files and compiler specific stuff
31 #if defined(__amigaos4__) && !defined(__USE_INLINE__)
32 #define __USE_INLINE__
35 #include <exec/memory.h>
36 #include <libraries/locale.h>
37 #include <libraries/iffparse.h>
39 #include <SDI/SDI_compiler.h>
41 #include <proto/exec.h>
42 #include <proto/dos.h>
43 #include <proto/locale.h>
44 #include <proto/utility.h>
45 #include <proto/iffparse.h>
54 struct FC_String %b_Strings[%n] = {
55 { (STRPTR) %s, %d }%(,)
58 STATIC struct Catalog *%bCatalog = NULL;
60 VOID Close%bCatalog(VOID)
64 CloseCatalog(%bCatalog);
69 VOID Open%bCatalog(VOID)
72 if ((%bCatalog = OpenCatalog(NULL, (STRPTR) "%b.catalog",
73 OC_BuiltInLanguage, %l,
79 for (i = 0, fc = %b_Strings; i < %n; i++, fc++) {
80 fc->msg = (STRPTR)GetCatalogStr(%bCatalog, fc->id, (STRPTR)fc->msg);
86 #if defined(__GNUC__) && !defined(__MORPHOS__) && !defined(__amigaos4__) && !defined(__AROS__)
87 __asm (" .text; .stabs \\\"___CTOR_LIST__\\\",22,0,0,__STIOpen%bCatalog");
88 __asm (" .text; .stabs \\\"___DTOR_LIST__\\\",22,0,0,__STDClose%bCatalog");