#ifndef RECALL_LOCALE_H
#define RECALL_LOCALE_H


/****************************************************************************/


/* This file was created automatically by CatComp.
 * Do NOT edit by hand!
 */


#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifdef CATCOMP_ARRAY
#undef CATCOMP_NUMBERS
#undef CATCOMP_STRINGS
#define CATCOMP_NUMBERS
#define CATCOMP_STRINGS
#endif

#ifdef CATCOMP_BLOCK
#undef CATCOMP_STRINGS
#define CATCOMP_STRINGS
#endif


/****************************************************************************/


#ifdef CATCOMP_NUMBERS

#define MSG_NOTIFF 0
#define MSG_IFFERROR 1
#define MSG_COULDNOTFIND 2
#define MSG_ALERTCONFIRM 3
#define MSG_EXECUTEEVENT 4
#define MSG_PUTOFF 5
#define MSG_CANCEL 6

#endif /* CATCOMP_NUMBERS */


/****************************************************************************/


#ifdef CATCOMP_STRINGS

#define MSG_NOTIFF_STR "Not a Recall IFF file!"
#define MSG_IFFERROR_STR "IFFfile scan aborted: File is corrupt!"
#define MSG_COULDNOTFIND_STR "Could not find file!"
#define MSG_ALERTCONFIRM_STR "\n\nLeft mousebutton=OK                         Right mousebutton=Cancel"
#define MSG_EXECUTEEVENT_STR "Execute event?\n%s"
#define MSG_PUTOFF_STR "|Postpone"
#define MSG_CANCEL_STR "|Cancel"

#endif /* CATCOMP_STRINGS */


/****************************************************************************/


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {MSG_NOTIFF,(STRPTR)MSG_NOTIFF_STR},
    {MSG_IFFERROR,(STRPTR)MSG_IFFERROR_STR},
    {MSG_COULDNOTFIND,(STRPTR)MSG_COULDNOTFIND_STR},
    {MSG_ALERTCONFIRM,(STRPTR)MSG_ALERTCONFIRM_STR},
    {MSG_EXECUTEEVENT,(STRPTR)MSG_EXECUTEEVENT_STR},
    {MSG_PUTOFF,(STRPTR)MSG_PUTOFF_STR},
    {MSG_CANCEL,(STRPTR)MSG_CANCEL_STR},
};

#endif /* CATCOMP_ARRAY */


/****************************************************************************/


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x00\x00\x18"
    MSG_NOTIFF_STR "\x00\x00"
    "\x00\x00\x00\x01\x00\x28"
    MSG_IFFERROR_STR "\x00\x00"
    "\x00\x00\x00\x02\x00\x16"
    MSG_COULDNOTFIND_STR "\x00\x00"
    "\x00\x00\x00\x03\x00\x48"
    MSG_ALERTCONFIRM_STR "\x00\x00"
    "\x00\x00\x00\x04\x00\x12"
    MSG_EXECUTEEVENT_STR "\x00"
    "\x00\x00\x00\x05\x00\x0A"
    MSG_PUTOFF_STR "\x00"
    "\x00\x00\x00\x06\x00\x08"
    MSG_CANCEL_STR "\x00"
};

#endif /* CATCOMP_BLOCK */


/****************************************************************************/


struct LocaleInfo
{
    APTR li_LocaleBase;
    APTR li_Catalog;
};


#ifdef CATCOMP_CODE

STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
{
LONG   *l;
UWORD  *w;
STRPTR  builtIn;

    l = (LONG *)CatCompBlock;

    while (*l != stringNum)
    {
        w = (UWORD *)((ULONG)l + 4);
        l = (LONG *)((ULONG)l + (ULONG)*w + 6);
    }
    builtIn = (STRPTR)((ULONG)l + 6);

#define XLocaleBase LocaleBase
#define LocaleBase li->li_LocaleBase
    
    if (LocaleBase)
        return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
#define LocaleBase XLocaleBase
#undef XLocaleBase

    return(builtIn);
}


#endif /* CATCOMP_CODE */


/****************************************************************************/


#endif /* RECALL_LOCALE_H */
