#ifndef LOC_H
#define LOC_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 STRING_Version 1
#define STRING_Usage 2
#define STRING_Help 3
#define STRING_NotAccurate 4
#define STRING_Created 5
#define STRING_Info 6
#define STRING_UpdateMode 7
#define STRING_CHECK_Starting 100
#define STRING_CHECK_TCPDebug 101
#define STRING_CHECK_Sniffed 102
#define STRING_CHECK_Found 103
#define STRING_CHECK_CfgDebug1 104
#define STRING_CHECK_CfgDebug2 105
#define STRING_CHECK_DebugNTRecvButConf 106
#define STRING_CHECK_DebugNTRecvAndNTConf 107
#define STRING_CHECK_DebugFound 108
#define STRING_CHECK_DebugFailed 109
#define STRING_CHECK_NewPattern 110
#define STRING_CHECK_Update 111
#define ERR_Opt_Illegal 200
#define ERR_Opt_RequiresArg 201
#define ERR_NoBSDSocket 202
#define ERR_NoMem 203
#define ERR_NoSocket 204
#define ERR_BSDSocket 205
#define ERR_NoHostSupplied 206
#define ERR_NoHost 207
#define ERR_NoFile 208
#define ERR_NoSniffer 209
#define ERR_Break 210
#define ERR_BadPort 211
#define ERR_BadTimes 212
#define ERR_BadTimeout 213
#define ERR_BadDelay 214
#define ERR_UnreachebleHost 215

#endif /* CATCOMP_NUMBERS */


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


#ifdef CATCOMP_STRINGS

#define STRING_Version_STR "QueSO Copyright 1998-2002 by savage@apostols.org\nQueSO for AmigaOS/Miami Copyright 1998-2002 by Alfonso Ranieri <alforan@tin.it>\nVersion: %s\nCompilation date: %s\n\n"
#define STRING_Usage_STR "Usage: QueSO [-vhdkVw] [-t timeout] [-p port]\n             [-z wait] [-n times] [-c file]\n             host[:port] {host[:port]}\n"
#define STRING_Help_STR "%s\n\n       -v    version\n       -h    show this help\n       -d    debug mode\n       -k    configuration file debug mode\n       -V    verbose mode\n       -w    update the config file when a new OS is found\n       -t    global timeout in seconds (%ld)\n       -p    remote port (%ld)\n       -z    seconds to wait before sending next packet (%ld)\n       -n    how many times packets are sent (%ld)\n       -c    configuration file (%s)\n\n       host  target host with optional port number\n\n"
#define STRING_NotAccurate_STR "not accurate responce for '%s'"
#define STRING_Created_STR "file '%s' created"
#define STRING_Info_STR "CfgFile: %s %s\nDefPort: %ld\nTimeout: %ld\n  Times: %ld\n  Delay: %ld\n"
#define STRING_UpdateMode_STR "(update mode)"
#define STRING_CHECK_Starting_STR "starting %s:%ld > %s:%ld"
#define STRING_CHECK_TCPDebug_STR "%ld: %ld>%ld seq:%1lx ack:%s%lx win:%04lx urp:%lx flags:%s"
#define STRING_CHECK_Sniffed_STR "sniffed %ld packet(s)"
#define STRING_CHECK_Found_STR "%s:%ld\t%s"
#define STRING_CHECK_CfgDebug1_STR "%s: \n%s"
#define STRING_CHECK_CfgDebug2_STR "%s: %ld %ld %ld %-4lx %-7s\x20"
#define STRING_CHECK_DebugNTRecvButConf_STR "** Not received but configured"
#define STRING_CHECK_DebugNTRecvAndNTConf_STR "** Ok, not received and not configured"
#define STRING_CHECK_DebugFound_STR "** Ok, Found"
#define STRING_CHECK_DebugFailed_STR "** FAILED %ld,%ld,%ld,%ld,%02lx != %ld,%ld,%ld,%ld,%02lx"
#define STRING_CHECK_NewPattern_STR "%s:%ld\t*- Unknown OS, adding new pattern to '%s'\n"
#define STRING_CHECK_Update_STR "%s:%ld\t*- Unknown OS, please update '%s'\n"
#define ERR_Opt_Illegal_STR "illegal option -- %lc"
#define ERR_Opt_RequiresArg_STR "option requires an argument -- %lc"
#define ERR_NoBSDSocket_STR "QueSO runs only on Miami(Dx) registered (bsdsocket.library version 4 or higher, miami.library version 6 or higher)"
#define ERR_NoMem_STR "not enogh memory available"
#define ERR_NoSocket_STR "can't create socket (%ld)"
#define ERR_BSDSocket_STR "bsdsocket error (%s)"
#define ERR_NoHostSupplied_STR "no host supplied"
#define ERR_NoHost_STR "host <%s> not found"
#define ERR_NoFile_STR "can't open file '%s'"
#define ERR_NoSniffer_STR "can't add a 'packets monitor' to interface '%s'"
#define ERR_Break_STR "interrupted"
#define ERR_BadPort_STR "bad port value '%s', using default '%ld'"
#define ERR_BadTimes_STR "bad times value '%s', using default '%ld'"
#define ERR_BadTimeout_STR "bad timeout value '%s', using default '%ld'"
#define ERR_BadDelay_STR "bad delay value '%s', using default '%ld'"
#define ERR_UnreachebleHost_STR "unreacheble host <%s>"

#endif /* CATCOMP_STRINGS */


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


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {STRING_Version,(STRPTR)STRING_Version_STR},
    {STRING_Usage,(STRPTR)STRING_Usage_STR},
    {STRING_Help,(STRPTR)STRING_Help_STR},
    {STRING_NotAccurate,(STRPTR)STRING_NotAccurate_STR},
    {STRING_Created,(STRPTR)STRING_Created_STR},
    {STRING_Info,(STRPTR)STRING_Info_STR},
    {STRING_UpdateMode,(STRPTR)STRING_UpdateMode_STR},
    {STRING_CHECK_Starting,(STRPTR)STRING_CHECK_Starting_STR},
    {STRING_CHECK_TCPDebug,(STRPTR)STRING_CHECK_TCPDebug_STR},
    {STRING_CHECK_Sniffed,(STRPTR)STRING_CHECK_Sniffed_STR},
    {STRING_CHECK_Found,(STRPTR)STRING_CHECK_Found_STR},
    {STRING_CHECK_CfgDebug1,(STRPTR)STRING_CHECK_CfgDebug1_STR},
    {STRING_CHECK_CfgDebug2,(STRPTR)STRING_CHECK_CfgDebug2_STR},
    {STRING_CHECK_DebugNTRecvButConf,(STRPTR)STRING_CHECK_DebugNTRecvButConf_STR},
    {STRING_CHECK_DebugNTRecvAndNTConf,(STRPTR)STRING_CHECK_DebugNTRecvAndNTConf_STR},
    {STRING_CHECK_DebugFound,(STRPTR)STRING_CHECK_DebugFound_STR},
    {STRING_CHECK_DebugFailed,(STRPTR)STRING_CHECK_DebugFailed_STR},
    {STRING_CHECK_NewPattern,(STRPTR)STRING_CHECK_NewPattern_STR},
    {STRING_CHECK_Update,(STRPTR)STRING_CHECK_Update_STR},
    {ERR_Opt_Illegal,(STRPTR)ERR_Opt_Illegal_STR},
    {ERR_Opt_RequiresArg,(STRPTR)ERR_Opt_RequiresArg_STR},
    {ERR_NoBSDSocket,(STRPTR)ERR_NoBSDSocket_STR},
    {ERR_NoMem,(STRPTR)ERR_NoMem_STR},
    {ERR_NoSocket,(STRPTR)ERR_NoSocket_STR},
    {ERR_BSDSocket,(STRPTR)ERR_BSDSocket_STR},
    {ERR_NoHostSupplied,(STRPTR)ERR_NoHostSupplied_STR},
    {ERR_NoHost,(STRPTR)ERR_NoHost_STR},
    {ERR_NoFile,(STRPTR)ERR_NoFile_STR},
    {ERR_NoSniffer,(STRPTR)ERR_NoSniffer_STR},
    {ERR_Break,(STRPTR)ERR_Break_STR},
    {ERR_BadPort,(STRPTR)ERR_BadPort_STR},
    {ERR_BadTimes,(STRPTR)ERR_BadTimes_STR},
    {ERR_BadTimeout,(STRPTR)ERR_BadTimeout_STR},
    {ERR_BadDelay,(STRPTR)ERR_BadDelay_STR},
    {ERR_UnreachebleHost,(STRPTR)ERR_UnreachebleHost_STR},
};

#endif /* CATCOMP_ARRAY */


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


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x01\x00\xA4"
    STRING_Version_STR "\x00"
    "\x00\x00\x00\x02\x00\x82"
    STRING_Usage_STR "\x00"
    "\x00\x00\x00\x03\x01\xE6"
    STRING_Help_STR "\x00\x00"
    "\x00\x00\x00\x04\x00\x20"
    STRING_NotAccurate_STR "\x00\x00"
    "\x00\x00\x00\x05\x00\x12"
    STRING_Created_STR "\x00"
    "\x00\x00\x00\x06\x00\x44"
    STRING_Info_STR "\x00"
    "\x00\x00\x00\x07\x00\x0E"
    STRING_UpdateMode_STR "\x00"
    "\x00\x00\x00\x64\x00\x1A"
    STRING_CHECK_Starting_STR "\x00\x00"
    "\x00\x00\x00\x65\x00\x3C"
    STRING_CHECK_TCPDebug_STR "\x00\x00"
    "\x00\x00\x00\x66\x00\x16"
    STRING_CHECK_Sniffed_STR "\x00"
    "\x00\x00\x00\x67\x00\x0A"
    STRING_CHECK_Found_STR "\x00"
    "\x00\x00\x00\x68\x00\x08"
    STRING_CHECK_CfgDebug1_STR "\x00"
    "\x00\x00\x00\x69\x00\x1C"
    STRING_CHECK_CfgDebug2_STR "\x00"
    "\x00\x00\x00\x6A\x00\x20"
    STRING_CHECK_DebugNTRecvButConf_STR "\x00\x00"
    "\x00\x00\x00\x6B\x00\x28"
    STRING_CHECK_DebugNTRecvAndNTConf_STR "\x00\x00"
    "\x00\x00\x00\x6C\x00\x0E"
    STRING_CHECK_DebugFound_STR "\x00\x00"
    "\x00\x00\x00\x6D\x00\x3A"
    STRING_CHECK_DebugFailed_STR "\x00\x00"
    "\x00\x00\x00\x6E\x00\x32"
    STRING_CHECK_NewPattern_STR "\x00"
    "\x00\x00\x00\x6F\x00\x2A"
    STRING_CHECK_Update_STR "\x00"
    "\x00\x00\x00\xC8\x00\x16"
    ERR_Opt_Illegal_STR "\x00"
    "\x00\x00\x00\xC9\x00\x24"
    ERR_Opt_RequiresArg_STR "\x00\x00"
    "\x00\x00\x00\xCA\x00\x74"
    ERR_NoBSDSocket_STR "\x00\x00"
    "\x00\x00\x00\xCB\x00\x1C"
    ERR_NoMem_STR "\x00\x00"
    "\x00\x00\x00\xCC\x00\x1A"
    ERR_NoSocket_STR "\x00"
    "\x00\x00\x00\xCD\x00\x16"
    ERR_BSDSocket_STR "\x00\x00"
    "\x00\x00\x00\xCE\x00\x12"
    ERR_NoHostSupplied_STR "\x00\x00"
    "\x00\x00\x00\xCF\x00\x14"
    ERR_NoHost_STR "\x00"
    "\x00\x00\x00\xD0\x00\x16"
    ERR_NoFile_STR "\x00\x00"
    "\x00\x00\x00\xD1\x00\x30"
    ERR_NoSniffer_STR "\x00"
    "\x00\x00\x00\xD2\x00\x0C"
    ERR_Break_STR "\x00"
    "\x00\x00\x00\xD3\x00\x2A"
    ERR_BadPort_STR "\x00\x00"
    "\x00\x00\x00\xD4\x00\x2A"
    ERR_BadTimes_STR "\x00"
    "\x00\x00\x00\xD5\x00\x2C"
    ERR_BadTimeout_STR "\x00"
    "\x00\x00\x00\xD6\x00\x2A"
    ERR_BadDelay_STR "\x00"
    "\x00\x00\x00\xD7\x00\x16"
    ERR_UnreachebleHost_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);

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

    return(builtIn);
}


#endif /* CATCOMP_CODE */


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


#endif /* LOC_H */
