#ifndef CONVERTER_LOCALE_H
#define CONVERTER_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_DESCRIPTION 0
#define MSG_SOURCETYPE 1
#define MSG_DESTINATIONTYPE 2
#define MSG_SOURCE 3
#define MSG_DESTINATION 4
#define MSG_INFILE 5
#define MSG_OUTFILE 6
#define MSG_SELECTSOURCE 7
#define MSG_SELECTDESTINATION 8
#define MSG_CONVERT 9
#define MSG_CONVERTKEY 10
#define MSG_SUCCESS 11
#define MSG_MENUPROJECT 12
#define MSG_MENUABOUT 13
#define MSG_MENUQUIT 14
#define MSG_ABOUTDESCRIPTION 15
#define MSG_ABOUTHELP 16
#define MSG_PUBLICDOMAIN 17
#define MSG_COMPILED 18
#define MSG_IFFSCANABORTED 19
#define MSG_IFFERROR0 20
#define MSG_IFFERROR1 21
#define MSG_IFFERROR2 22
#define MSG_IFFERROR3 23
#define MSG_IFFERROR4 24
#define MSG_IFFERROR5 25
#define MSG_IFFERROR6 26
#define MSG_IFFERROR7 27
#define MSG_IFFERROR8 28
#define MSG_IFFERROR9 29
#define MSG_IFFERROR10 30
#define MSG_IFFERROR11 31
#define MSG_IFFERROR12 32
#define MSG_IFFLOADERROR 33

#endif /* CATCOMP_NUMBERS */


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


#ifdef CATCOMP_STRINGS

#define MSG_DESCRIPTION_STR "Converter program for Recall"
#define MSG_SOURCETYPE_STR "Source type"
#define MSG_DESTINATIONTYPE_STR "Destination type"
#define MSG_SOURCE_STR "Source:"
#define MSG_DESTINATION_STR "Destination:"
#define MSG_INFILE_STR "ENVARC:in file"
#define MSG_OUTFILE_STR "ENVARC:out file"
#define MSG_SELECTSOURCE_STR "Select source file..."
#define MSG_SELECTDESTINATION_STR "Select destination file..."
#define MSG_CONVERT_STR "Convert"
#define MSG_CONVERTKEY_STR "c"
#define MSG_SUCCESS_STR "Conversion was successfull!"
#define MSG_MENUPROJECT_STR "Project"
#define MSG_MENUABOUT_STR "About..."
#define MSG_MENUQUIT_STR "Quit"
#define MSG_ABOUTDESCRIPTION_STR "Program for converting a Recall\nproject to different formats."
#define MSG_ABOUTHELP_STR "Placing the pointer over a gadget\nand pressing HELP, will pop up\ninformation on that function!"
#define MSG_PUBLICDOMAIN_STR "This program is"
#define MSG_COMPILED_STR "Compiled on"
#define MSG_IFFSCANABORTED_STR "IFF-scan aborted:\n%s"
#define MSG_IFFERROR0_STR "End of file."
#define MSG_IFFERROR1_STR "End of context."
#define MSG_IFFERROR2_STR "No lexical scope."
#define MSG_IFFERROR3_STR "Insufficient memory."
#define MSG_IFFERROR4_STR "Stream read error."
#define MSG_IFFERROR5_STR "Stream write error."
#define MSG_IFFERROR6_STR "Stream seek error."
#define MSG_IFFERROR7_STR "File is corrupt."
#define MSG_IFFERROR8_STR "IFF syntax error."
#define MSG_IFFERROR9_STR "Not an IFF file."
#define MSG_IFFERROR10_STR "Required call-back hook missing."
#define MSG_IFFERROR11_STR "Return to client."
#define MSG_IFFERROR12_STR "Not an Recall IFF file!"
#define MSG_IFFLOADERROR_STR "Not the correct loadmodule!"

#endif /* CATCOMP_STRINGS */


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


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {MSG_DESCRIPTION,(STRPTR)MSG_DESCRIPTION_STR},
    {MSG_SOURCETYPE,(STRPTR)MSG_SOURCETYPE_STR},
    {MSG_DESTINATIONTYPE,(STRPTR)MSG_DESTINATIONTYPE_STR},
    {MSG_SOURCE,(STRPTR)MSG_SOURCE_STR},
    {MSG_DESTINATION,(STRPTR)MSG_DESTINATION_STR},
    {MSG_INFILE,(STRPTR)MSG_INFILE_STR},
    {MSG_OUTFILE,(STRPTR)MSG_OUTFILE_STR},
    {MSG_SELECTSOURCE,(STRPTR)MSG_SELECTSOURCE_STR},
    {MSG_SELECTDESTINATION,(STRPTR)MSG_SELECTDESTINATION_STR},
    {MSG_CONVERT,(STRPTR)MSG_CONVERT_STR},
    {MSG_CONVERTKEY,(STRPTR)MSG_CONVERTKEY_STR},
    {MSG_SUCCESS,(STRPTR)MSG_SUCCESS_STR},
    {MSG_MENUPROJECT,(STRPTR)MSG_MENUPROJECT_STR},
    {MSG_MENUABOUT,(STRPTR)MSG_MENUABOUT_STR},
    {MSG_MENUQUIT,(STRPTR)MSG_MENUQUIT_STR},
    {MSG_ABOUTDESCRIPTION,(STRPTR)MSG_ABOUTDESCRIPTION_STR},
    {MSG_ABOUTHELP,(STRPTR)MSG_ABOUTHELP_STR},
    {MSG_PUBLICDOMAIN,(STRPTR)MSG_PUBLICDOMAIN_STR},
    {MSG_COMPILED,(STRPTR)MSG_COMPILED_STR},
    {MSG_IFFSCANABORTED,(STRPTR)MSG_IFFSCANABORTED_STR},
    {MSG_IFFERROR0,(STRPTR)MSG_IFFERROR0_STR},
    {MSG_IFFERROR1,(STRPTR)MSG_IFFERROR1_STR},
    {MSG_IFFERROR2,(STRPTR)MSG_IFFERROR2_STR},
    {MSG_IFFERROR3,(STRPTR)MSG_IFFERROR3_STR},
    {MSG_IFFERROR4,(STRPTR)MSG_IFFERROR4_STR},
    {MSG_IFFERROR5,(STRPTR)MSG_IFFERROR5_STR},
    {MSG_IFFERROR6,(STRPTR)MSG_IFFERROR6_STR},
    {MSG_IFFERROR7,(STRPTR)MSG_IFFERROR7_STR},
    {MSG_IFFERROR8,(STRPTR)MSG_IFFERROR8_STR},
    {MSG_IFFERROR9,(STRPTR)MSG_IFFERROR9_STR},
    {MSG_IFFERROR10,(STRPTR)MSG_IFFERROR10_STR},
    {MSG_IFFERROR11,(STRPTR)MSG_IFFERROR11_STR},
    {MSG_IFFERROR12,(STRPTR)MSG_IFFERROR12_STR},
    {MSG_IFFLOADERROR,(STRPTR)MSG_IFFLOADERROR_STR},
};

#endif /* CATCOMP_ARRAY */


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


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x00\x00\x1E"
    MSG_DESCRIPTION_STR "\x00\x00"
    "\x00\x00\x00\x01\x00\x0C"
    MSG_SOURCETYPE_STR "\x00"
    "\x00\x00\x00\x02\x00\x12"
    MSG_DESTINATIONTYPE_STR "\x00\x00"
    "\x00\x00\x00\x03\x00\x08"
    MSG_SOURCE_STR "\x00"
    "\x00\x00\x00\x04\x00\x0E"
    MSG_DESTINATION_STR "\x00\x00"
    "\x00\x00\x00\x05\x00\x10"
    MSG_INFILE_STR "\x00\x00"
    "\x00\x00\x00\x06\x00\x10"
    MSG_OUTFILE_STR "\x00"
    "\x00\x00\x00\x07\x00\x16"
    MSG_SELECTSOURCE_STR "\x00"
    "\x00\x00\x00\x08\x00\x1C"
    MSG_SELECTDESTINATION_STR "\x00\x00"
    "\x00\x00\x00\x09\x00\x08"
    MSG_CONVERT_STR "\x00"
    "\x00\x00\x00\x0A\x00\x02"
    MSG_CONVERTKEY_STR "\x00"
    "\x00\x00\x00\x0B\x00\x1C"
    MSG_SUCCESS_STR "\x00"
    "\x00\x00\x00\x0C\x00\x08"
    MSG_MENUPROJECT_STR "\x00"
    "\x00\x00\x00\x0D\x00\x0A"
    MSG_MENUABOUT_STR "\x00\x00"
    "\x00\x00\x00\x0E\x00\x06"
    MSG_MENUQUIT_STR "\x00\x00"
    "\x00\x00\x00\x0F\x00\x3E"
    MSG_ABOUTDESCRIPTION_STR "\x00"
    "\x00\x00\x00\x10\x00\x60"
    MSG_ABOUTHELP_STR "\x00\x00"
    "\x00\x00\x00\x11\x00\x10"
    MSG_PUBLICDOMAIN_STR "\x00"
    "\x00\x00\x00\x12\x00\x0C"
    MSG_COMPILED_STR "\x00"
    "\x00\x00\x00\x13\x00\x16"
    MSG_IFFSCANABORTED_STR "\x00\x00"
    "\x00\x00\x00\x14\x00\x0E"
    MSG_IFFERROR0_STR "\x00\x00"
    "\x00\x00\x00\x15\x00\x10"
    MSG_IFFERROR1_STR "\x00"
    "\x00\x00\x00\x16\x00\x12"
    MSG_IFFERROR2_STR "\x00"
    "\x00\x00\x00\x17\x00\x16"
    MSG_IFFERROR3_STR "\x00\x00"
    "\x00\x00\x00\x18\x00\x14"
    MSG_IFFERROR4_STR "\x00\x00"
    "\x00\x00\x00\x19\x00\x14"
    MSG_IFFERROR5_STR "\x00"
    "\x00\x00\x00\x1A\x00\x14"
    MSG_IFFERROR6_STR "\x00\x00"
    "\x00\x00\x00\x1B\x00\x12"
    MSG_IFFERROR7_STR "\x00\x00"
    "\x00\x00\x00\x1C\x00\x12"
    MSG_IFFERROR8_STR "\x00"
    "\x00\x00\x00\x1D\x00\x12"
    MSG_IFFERROR9_STR "\x00\x00"
    "\x00\x00\x00\x1E\x00\x22"
    MSG_IFFERROR10_STR "\x00\x00"
    "\x00\x00\x00\x1F\x00\x12"
    MSG_IFFERROR11_STR "\x00"
    "\x00\x00\x00\x20\x00\x18"
    MSG_IFFERROR12_STR "\x00"
    "\x00\x00\x00\x21\x00\x1C"
    MSG_IFFLOADERROR_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 /* CONVERTER_LOCALE_H */
