home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 124
/
af124a.adf
/
af124a.lzx
/
WBStartup+V2.8
/
Source
/
WBStartup+Prefs
/
WBStartupPlusPrefs_Cat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-03-29
|
6KB
|
165 lines
/****************************************************************
This file was created automatically by `FlexCat 1.5'
from "WBStartupPlusPrefs.cd".
Do NOT edit by hand!
****************************************************************/
/****************************************************************
This file uses the auto initialization possibilities of
Dice, gcc and SAS/C, respectively.
Dice does this by using the keywords __autoinit and
__autoexit, SAS uses names beginning with _STI or
_STD, respectively. gcc uses the asm() instruction,
to emulate C++ constructors and destructors.
Using this file you don't have *all* possibilities of
the locale.library. (No Locale or Language arguments are
supported when opening the catalog. However, these are
*very* rarely used, so this should be sufficient for most
applications.
If you really need all possibilities or you have another
compiler, you should use the source description C_c_V21.sd
instead.
****************************************************************/
/*
Include files and compiler specific stuff
*/
#include <libraries/locale.h>
#if defined(__SASC) || defined(_DCC)
#include <proto/exec.h>
#include <proto/locale.h>
typedef struct Library LocaleBase_t;
#elif defined(__GNUC__)
#include <inline/exec.h>
#include <inline/locale.h>
typedef struct LocaleBase LocaleBase_t;
#else
#error "Don't know how to handle your compiler."
#endif
#if defined(__SASC) || defined(__GNUC__)
#define __autoinit
#define __autoexit
#endif
/*
Variables
*/
struct FC_Type
{ LONG ID;
STRPTR Str;
};
const struct FC_Type _STRProgramName = { 0, (STRPTR) "Program Name" };
const struct FC_Type _STRPriority = { 1, (STRPTR) "Priority" };
const struct FC_Type _STRRequiredDosVer = { 2, (STRPTR) "You must have AmigaDOS 3.x" };
const struct FC_Type _STRCouldntLockDir = { 3, (STRPTR) "Couldn't lock directory." };
const struct FC_Type _STRProjectMenu = { 4, (STRPTR) "Project" };
const struct FC_Type _STRSaveMenu = { 5, (STRPTR) "Save..." };
const struct FC_Type _STRAboutMenu = { 6, (STRPTR) "About..." };
const struct FC_Type _STRQuitMenu = { 7, (STRPTR) "Quit" };
const struct FC_Type _STREditMenu = { 8, (STRPTR) "Edit" };
const struct FC_Type _STRRestoreMenu = { 9, (STRPTR) "Restore" };
const struct FC_Type _STRIconWindowMenu = { 10, (STRPTR) "Icon Window..." };
const struct FC_Type _STRCreateGroupMenu = { 11, (STRPTR) "Create Group..." };
const struct FC_Type _STRModifyGroupMenu = { 12, (STRPTR) "Modify Group..." };
const struct FC_Type _STRDeleteGroupMenu = { 13, (STRPTR) "Delete Group..." };
const struct FC_Type _STRSortMenu = { 14, (STRPTR) "Sort" };
const struct FC_Type _STRAlphabeticallyMenu = { 15, (STRPTR) "Alphabetically" };
const struct FC_Type _STRPriorityMenu = { 16, (STRPTR) "Priority" };
const struct FC_Type _STRSelectMenu = { 17, (STRPTR) "Select" };
const struct FC_Type _STRAllMenu = { 18, (STRPTR) "All" };
const struct FC_Type _STRNoneMenu = { 19, (STRPTR) "None" };
const struct FC_Type _STRToggleMenu = { 20, (STRPTR) "Toggle" };
const struct FC_Type _STRGroupMenu = { 21, (STRPTR) "Group..." };
const struct FC_Type _STRSaving = { 22, (STRPTR) "Saving..." };
const struct FC_Type _STRGroupName = { 23, (STRPTR) "Group Name" };
const struct FC_Type _STRCopyingFiles = { 24, (STRPTR) "Copying File(s)..." };
const struct FC_Type _STROk = { 25, (STRPTR) "Ok" };
const struct FC_Type _STRCancel = { 26, (STRPTR) "Cancel" };
const struct FC_Type _STRSave = { 27, (STRPTR) "Save" };
const struct FC_Type _STRAskSaveGroups = { 28, (STRPTR) "Save Modified Groups?" };
const struct FC_Type _STRSaveNoGadget = { 29, (STRPTR) "Save|No" };
const struct FC_Type _STRAbout = { 30, (STRPTR) "WBStartup+Prefs v%s %s All Rights Reserved.\n\n"\
"Written By: John Hughes %s\n\n"\
"IRC: hughes on #amiga\n"\
"E-Mail: johughes@heartland.bradley.edu\n"\
"WWW: http://rhf.bradley.edu/~jhughes/\n\n"\
"WBStartup+ and WBStartup+Prefs are Postcardware. If you use this software, please\n"\
"send a postcard of your country or city to:\n"\
" John Hughes\n"\
" 901 Highview Rd.\n"\
" East Peoria, IL 61611 USA" };
const struct FC_Type _STRAddPrograms = { 31, (STRPTR) "Add Program(s)" };
const struct FC_Type _STREnabled = { 32, (STRPTR) "Enabled" };
const struct FC_Type _STRDisabled = { 33, (STRPTR) "Disabled" };
const struct FC_Type _STRCopyFile = { 34, (STRPTR) "Copy File(s)" };
const struct FC_Type _STRMoveFile = { 35, (STRPTR) "Move File(s)" };
const struct FC_Type _STRStatusOfPrograms = { 36, (STRPTR) "Status of Program(s)" };
const struct FC_Type _STROperation = { 37, (STRPTR) "Operation" };
struct Catalog *WBStartupPlusPrefs_Catalog = NULL;
LocaleBase_t *LocaleBase;
void _STIOpenCatalog(void)
{
STATIC const struct TagItem tags[] =
{
{ OC_BuiltInLanguage, (ULONG) "english" },
{ OC_Version, 0 },
{ TAG_DONE, 0 }
};
//Printf("Loading localbase\n");
if ((LocaleBase = (LocaleBase_t *)
OpenLibrary((STRPTR) "locale.library", 38)))
{
WBStartupPlusPrefs_Catalog = OpenCatalogA(NULL, (STRPTR) "WBStartup+Prefs.catalog",
(struct TagItem *) tags);
}
}
void _STDCloseCatalog(void)
{
if (LocaleBase)
{
CloseCatalog(WBStartupPlusPrefs_Catalog);
WBStartupPlusPrefs_Catalog = NULL;
CloseLibrary((struct Library *) LocaleBase);
}
}
STRPTR GetString(struct FC_Type *fcstr)
{
STRPTR defaultstr;
LONG strnum;
strnum = fcstr->ID;
defaultstr = fcstr->Str;
return(WBStartupPlusPrefs_Catalog ? GetCatalogStr(WBStartupPlusPrefs_Catalog, strnum, defaultstr) :
defaultstr);
}
#if defined(__GNUC__)
asm (" .text; .stabs \"___CTOR_LIST__\",22,0,0,__STIOpenCatalog");
asm (" .text; .stabs \"___DTOR_LIST__\",22,0,0,__STDCloseCatalog");
#endif