adjust to match the expanded name.
[AROS-Contrib.git] / scout / source / C_c.sd
blob5655722950063f300548d1b5fc0ae67f5f71a65b
1 ##rem $Id: C_c.sd,v 1.5 2009/10/19 16:44:26 marust Exp $
2 ##stringtype C
3 ##shortstrings
4 /****************************************************************
5    This file was created automatically by `%fv'
6    from "%f0".
8    Do NOT edit by hand!
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
24     applications.
25 ****************************************************************/
29     Include files and compiler specific stuff
31 #if defined(__amigaos4__) && !defined(__USE_INLINE__)
32     #define __USE_INLINE__
33 #endif
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>
47 #include <stdlib.h>
48 #include <string.h>
49 #include "%b_cat.h"
52     Variables
54 struct FC_String %b_Strings[%n] = {
55     { (STRPTR) %s, %d }%(,)
58 STATIC struct Catalog *%bCatalog = NULL;
60 VOID Close%bCatalog(VOID)
63     if (%bCatalog) {
64         CloseCatalog(%bCatalog);
65     }
69 VOID Open%bCatalog(VOID)
71     if (LocaleBase) {
72         if ((%bCatalog = OpenCatalog(NULL, (STRPTR) "%b.catalog",
73                                      OC_BuiltInLanguage, %l,
74                                      OC_Version, %v,
75                                      TAG_DONE))) {
76             struct FC_String *fc;
77             int i;
79             for (i = 0, fc = %b_Strings;  i < %n;  i++, fc++) {
80                 fc->msg = (STRPTR)GetCatalogStr(%bCatalog, fc->id, (STRPTR)fc->msg);
81             }
82         }
83     }
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");
89 #endif