#ifndef SY22LOC_H
#define SY22LOC_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 ERRORD_OUT_OF_MEMORY 1
#define ERRORD_TOO_MANY_DATAS 2
#define ERRORD_UNKNOWN_FORMAT 3
#define ERRORD_UNKNOWN_TYPE 4
#define MSGD_SENDVOICE 5
#define MSGD_SENDEND 6
#define MSGD_RECIEVEVOICE 7
#define MSGD_RECIEVEALL 8
#define MSGD_RECIEVEENDVOICE 9
#define MSGD_RECIEVEENDALL 10
#define MSGD_RECIEVEPACKET 11
#define MSGD_SENDALLPACKET 12
#define MSGD_ABOUT 13
#define MSGD_OK 14
#define ERRORD_UNEXPECTED_ANSWER 15

#endif /* CATCOMP_NUMBERS */


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


#ifdef CATCOMP_STRINGS

#define ERRORD_OUT_OF_MEMORY_STR "Out of memory."
#define ERRORD_TOO_MANY_DATAS_STR "Too many datas."
#define ERRORD_UNKNOWN_FORMAT_STR "Unknown format."
#define ERRORD_UNKNOWN_TYPE_STR "Unkown data type."
#define MSGD_SENDVOICE_STR "Sending Voice %s."
#define MSGD_SENDEND_STR "%s datas sent."
#define MSGD_RECIEVEVOICE_STR "Recieving voice datas."
#define MSGD_RECIEVEALL_STR "Recieving all datas."
#define MSGD_RECIEVEENDVOICE_STR "Voice datas recieved."
#define MSGD_RECIEVEENDALL_STR "All datas recieved."
#define MSGD_RECIEVEPACKET_STR "Recieving packet %d."
#define MSGD_SENDALLPACKET_STR "Sending all datas, packet %d."
#define MSGD_ABOUT_STR "Yamaha SY22 driver for SynthLib\nprogrammed by Jean-Alexis MONTIGNIES.\nVersion 1.0 ©1993."
#define MSGD_OK_STR "OK"
#define ERRORD_UNEXPECTED_ANSWER_STR "Unexcpected answer."

#endif /* CATCOMP_STRINGS */


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


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {ERRORD_OUT_OF_MEMORY,(STRPTR)ERRORD_OUT_OF_MEMORY_STR},
    {ERRORD_TOO_MANY_DATAS,(STRPTR)ERRORD_TOO_MANY_DATAS_STR},
    {ERRORD_UNKNOWN_FORMAT,(STRPTR)ERRORD_UNKNOWN_FORMAT_STR},
    {ERRORD_UNKNOWN_TYPE,(STRPTR)ERRORD_UNKNOWN_TYPE_STR},
    {MSGD_SENDVOICE,(STRPTR)MSGD_SENDVOICE_STR},
    {MSGD_SENDEND,(STRPTR)MSGD_SENDEND_STR},
    {MSGD_RECIEVEVOICE,(STRPTR)MSGD_RECIEVEVOICE_STR},
    {MSGD_RECIEVEALL,(STRPTR)MSGD_RECIEVEALL_STR},
    {MSGD_RECIEVEENDVOICE,(STRPTR)MSGD_RECIEVEENDVOICE_STR},
    {MSGD_RECIEVEENDALL,(STRPTR)MSGD_RECIEVEENDALL_STR},
    {MSGD_RECIEVEPACKET,(STRPTR)MSGD_RECIEVEPACKET_STR},
    {MSGD_SENDALLPACKET,(STRPTR)MSGD_SENDALLPACKET_STR},
    {MSGD_ABOUT,(STRPTR)MSGD_ABOUT_STR},
    {MSGD_OK,(STRPTR)MSGD_OK_STR},
    {ERRORD_UNEXPECTED_ANSWER,(STRPTR)ERRORD_UNEXPECTED_ANSWER_STR},
};

#endif /* CATCOMP_ARRAY */


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


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x01\x00\x10"
    ERRORD_OUT_OF_MEMORY_STR "\x00\x00"
    "\x00\x00\x00\x02\x00\x10"
    ERRORD_TOO_MANY_DATAS_STR "\x00"
    "\x00\x00\x00\x03\x00\x10"
    ERRORD_UNKNOWN_FORMAT_STR "\x00"
    "\x00\x00\x00\x04\x00\x12"
    ERRORD_UNKNOWN_TYPE_STR "\x00"
    "\x00\x00\x00\x05\x00\x12"
    MSGD_SENDVOICE_STR "\x00"
    "\x00\x00\x00\x06\x00\x10"
    MSGD_SENDEND_STR "\x00\x00"
    "\x00\x00\x00\x07\x00\x18"
    MSGD_RECIEVEVOICE_STR "\x00\x00"
    "\x00\x00\x00\x08\x00\x16"
    MSGD_RECIEVEALL_STR "\x00\x00"
    "\x00\x00\x00\x09\x00\x16"
    MSGD_RECIEVEENDVOICE_STR "\x00"
    "\x00\x00\x00\x0A\x00\x14"
    MSGD_RECIEVEENDALL_STR "\x00"
    "\x00\x00\x00\x0B\x00\x16"
    MSGD_RECIEVEPACKET_STR "\x00\x00"
    "\x00\x00\x00\x0C\x00\x1E"
    MSGD_SENDALLPACKET_STR "\x00"
    "\x00\x00\x00\x0D\x00\x5A"
    MSGD_ABOUT_STR "\x00\x00"
    "\x00\x00\x00\x0E\x00\x04"
    MSGD_OK_STR "\x00\x00"
    "\x00\x00\x00\x0F\x00\x14"
    ERRORD_UNEXPECTED_ANSWER_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 /* SY22LOC_H */
