#ifndef LOCALE_H
#define 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_IDENT 0
#define MSG_TEXSRC_REQ 1
#define MSG_TEXOUT_REQ 2
#define MSG_NODVI_REQ 3
#define MSG_MSGPOR_REQ 4
#define MSG_SDVIFI_REQ 5
#define MSG_REQBOK_REQ 6
#define MSG_DVIFIL_REQ 7
#define MSG_TEXFIL_REQ 8
#define MSG_FILBUT_REQ 9
#define MSG_ABTBOD_REQ 10
#define MSG_ABTBUT_REQ 11
#define MSG_NOABOT_REQ 12
#define MSG_PRTBOD_REQ 13
#define MSG_PRTBUT_REQ 14
#define MSG_PGEBOD_REQ 15
#define MSG_ERREXE_REQ 16

#endif /* CATCOMP_NUMBERS */


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


#ifdef CATCOMP_STRINGS

#define MSG_IDENT_STR "Compile, Show, Print TeX files"
#define MSG_TEXSRC_REQ_STR "TeX source file not found"
#define MSG_TEXOUT_REQ_STR "Unable to open TeXServer output"
#define MSG_NODVI_REQ_STR "No DVI file associated\nwith this file"
#define MSG_MSGPOR_REQ_STR "Can't create message port"
#define MSG_SDVIFI_REQ_STR "ShowDVI display file not found"
#define MSG_REQBOK_REQ_STR "OK"
#define MSG_DVIFIL_REQ_STR "Select a .dvi file"
#define MSG_TEXFIL_REQ_STR "Select a TeX source file"
#define MSG_FILBUT_REQ_STR "Select"
#define MSG_ABTBOD_REQ_STR "TeXServer API © 1996 BURGHARD Eric\n==================================\n\nIf you find bugs, fix them yourselves\nThis API is totally FreeWare and source code included\nHappy TeXing..."
#define MSG_ABTBUT_REQ_STR "That's all folks"
#define MSG_NOABOT_REQ_STR "Fail to open the about requester"
#define MSG_PRTBOD_REQ_STR "Select the way the pages\nhad to be printed"
#define MSG_PRTBUT_REQ_STR "Recto|Recto-Verso|Cancel"
#define MSG_PGEBOD_REQ_STR "Once the first printing is finish\nyou have to reinsert pages into the printer\nand select print again"
#define MSG_ERREXE_REQ_STR ": Error while trying to execute"

#endif /* CATCOMP_STRINGS */


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


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {MSG_IDENT,(STRPTR)MSG_IDENT_STR},
    {MSG_TEXSRC_REQ,(STRPTR)MSG_TEXSRC_REQ_STR},
    {MSG_TEXOUT_REQ,(STRPTR)MSG_TEXOUT_REQ_STR},
    {MSG_NODVI_REQ,(STRPTR)MSG_NODVI_REQ_STR},
    {MSG_MSGPOR_REQ,(STRPTR)MSG_MSGPOR_REQ_STR},
    {MSG_SDVIFI_REQ,(STRPTR)MSG_SDVIFI_REQ_STR},
    {MSG_REQBOK_REQ,(STRPTR)MSG_REQBOK_REQ_STR},
    {MSG_DVIFIL_REQ,(STRPTR)MSG_DVIFIL_REQ_STR},
    {MSG_TEXFIL_REQ,(STRPTR)MSG_TEXFIL_REQ_STR},
    {MSG_FILBUT_REQ,(STRPTR)MSG_FILBUT_REQ_STR},
    {MSG_ABTBOD_REQ,(STRPTR)MSG_ABTBOD_REQ_STR},
    {MSG_ABTBUT_REQ,(STRPTR)MSG_ABTBUT_REQ_STR},
    {MSG_NOABOT_REQ,(STRPTR)MSG_NOABOT_REQ_STR},
    {MSG_PRTBOD_REQ,(STRPTR)MSG_PRTBOD_REQ_STR},
    {MSG_PRTBUT_REQ,(STRPTR)MSG_PRTBUT_REQ_STR},
    {MSG_PGEBOD_REQ,(STRPTR)MSG_PGEBOD_REQ_STR},
    {MSG_ERREXE_REQ,(STRPTR)MSG_ERREXE_REQ_STR},
};

#endif /* CATCOMP_ARRAY */


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


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x00\x00\x20"
    MSG_IDENT_STR "\x00\x00"
    "\x00\x00\x00\x01\x00\x1A"
    MSG_TEXSRC_REQ_STR "\x00"
    "\x00\x00\x00\x02\x00\x20"
    MSG_TEXOUT_REQ_STR "\x00"
    "\x00\x00\x00\x03\x00\x26"
    MSG_NODVI_REQ_STR "\x00"
    "\x00\x00\x00\x04\x00\x1A"
    MSG_MSGPOR_REQ_STR "\x00"
    "\x00\x00\x00\x05\x00\x20"
    MSG_SDVIFI_REQ_STR "\x00\x00"
    "\x00\x00\x00\x06\x00\x04"
    MSG_REQBOK_REQ_STR "\x00\x00"
    "\x00\x00\x00\x07\x00\x14"
    MSG_DVIFIL_REQ_STR "\x00\x00"
    "\x00\x00\x00\x08\x00\x1A"
    MSG_TEXFIL_REQ_STR "\x00\x00"
    "\x00\x00\x00\x09\x00\x08"
    MSG_FILBUT_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0A\x00\xB4"
    MSG_ABTBOD_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0B\x00\x12"
    MSG_ABTBUT_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0C\x00\x22"
    MSG_NOABOT_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0D\x00\x2C"
    MSG_PRTBOD_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0E\x00\x1A"
    MSG_PRTBUT_REQ_STR "\x00\x00"
    "\x00\x00\x00\x0F\x00\x66"
    MSG_PGEBOD_REQ_STR "\x00\x00"
    "\x00\x00\x00\x10\x00\x20"
    MSG_ERREXE_REQ_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 /* LOCALE_H */
