#ifndef FORMAT_H
#define FORMAT_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_FORMAT_TITLE 1000
#define MSG_FORMAT_FORMAT 1001
#define MSG_FORMAT_QUICK_FORMAT 1002
#define MSG_FORMAT_CANCEL 1003
#define MSG_FORMAT_NAME 1004
#define MSG_FORMAT_FFS 1005
#define MSG_FORMAT_INTERNATIONAL 1006
#define MSG_FORMAT_CACHING 1007
#define MSG_FORMAT_TRASHCAN 1008
#define MSG_FORMAT_INSTALL 1009
#define MSG_FORMAT_VERIFY 1010
#define MSG_FORMAT_DEFAULT_NAME 1011
#define MSG_FORMAT_STATUS 1012
#define MSG_OPENING_DEVICE 1013
#define MSG_CHECKING_DISK 1014
#define MSG_CANT_OPEN_DEVICE 1015
#define MSG_NO_DISK_PRESENT 1016
#define MSG_DISK_WRITE_PROTECTED 1017
#define MSG_RETRY_CANCEL 1018
#define MSG_PROCEED_CANCEL 1019
#define MSG_DISK_NOT_BLANK 1020
#define MSG_ABORTED 1021
#define MSG_FORMAT_INITIALISING 1022
#define MSG_FORMAT_FORMATTING 1023
#define MSG_FORMAT_FORMATERROR 1025
#define MSG_FORMAT_VERIFYERROR 1026
#define MSG_FORMAT_SUCCESSFUL 1027
#define MSG_FORMAT_FAILED 1028
#define MSG_FORMAT_SETTING_UP 1029
#define MSG_FORMAT_CLEANING_UP 1030
#define MSG_FORMAT_MAKING_TRASH 1031
#define MSG_INSTALLING_DISK 1032
#define MSG_FORMAT_DESC 1033

#endif /* CATCOMP_NUMBERS */


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


#ifdef CATCOMP_STRINGS

#define MSG_FORMAT_TITLE_STR "Format"
#define MSG_FORMAT_FORMAT_STR "_Format"
#define MSG_FORMAT_QUICK_FORMAT_STR "_Quick Format"
#define MSG_FORMAT_CANCEL_STR "_Cancel"
#define MSG_FORMAT_NAME_STR "_Name"
#define MSG_FORMAT_FFS_STR "F_ast File System"
#define MSG_FORMAT_INTERNATIONAL_STR "_International Mode"
#define MSG_FORMAT_CACHING_STR "_Directory Caching"
#define MSG_FORMAT_TRASHCAN_STR "_Put Trashcan"
#define MSG_FORMAT_INSTALL_STR "_Make Bootable"
#define MSG_FORMAT_VERIFY_STR "_Verify"
#define MSG_FORMAT_DEFAULT_NAME_STR "Empty"
#define MSG_FORMAT_STATUS_STR "%ld tracks, %ld bytes/trk, %s"
#define MSG_OPENING_DEVICE_STR "Opening device..."
#define MSG_CHECKING_DISK_STR "Checking disk..."
#define MSG_CANT_OPEN_DEVICE_STR "Unable to open device!"
#define MSG_NO_DISK_PRESENT_STR "No disk present in drive!"
#define MSG_DISK_WRITE_PROTECTED_STR "Disk is write-protected!"
#define MSG_RETRY_CANCEL_STR "Retry|Cancel"
#define MSG_PROCEED_CANCEL_STR "Proceed|Cancel"
#define MSG_DISK_NOT_BLANK_STR "Disk in drive %s is not blank!\nVolume '%s' contains %s.\nAll data will be erased.\nChoose Proceed to continue."
#define MSG_ABORTED_STR "Aborted."
#define MSG_FORMAT_INITIALISING_STR "Initialising disk..."
#define MSG_FORMAT_FORMATTING_STR "Formatting..."
#define MSG_FORMAT_FORMATERROR_STR "Format error on track %ld."
#define MSG_FORMAT_VERIFYERROR_STR "Verify error on track %ld."
#define MSG_FORMAT_SUCCESSFUL_STR "Format successful!"
#define MSG_FORMAT_FAILED_STR "Format failed."
#define MSG_FORMAT_SETTING_UP_STR "Setting up..."
#define MSG_FORMAT_CLEANING_UP_STR "Cleaning up..."
#define MSG_FORMAT_MAKING_TRASH_STR "Making Trashcan..."
#define MSG_INSTALLING_DISK_STR "Installing Bootblock..."
#define MSG_FORMAT_DESC_STR "Format disks"

#endif /* CATCOMP_STRINGS */


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


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {MSG_FORMAT_TITLE,(STRPTR)MSG_FORMAT_TITLE_STR},
    {MSG_FORMAT_FORMAT,(STRPTR)MSG_FORMAT_FORMAT_STR},
    {MSG_FORMAT_QUICK_FORMAT,(STRPTR)MSG_FORMAT_QUICK_FORMAT_STR},
    {MSG_FORMAT_CANCEL,(STRPTR)MSG_FORMAT_CANCEL_STR},
    {MSG_FORMAT_NAME,(STRPTR)MSG_FORMAT_NAME_STR},
    {MSG_FORMAT_FFS,(STRPTR)MSG_FORMAT_FFS_STR},
    {MSG_FORMAT_INTERNATIONAL,(STRPTR)MSG_FORMAT_INTERNATIONAL_STR},
    {MSG_FORMAT_CACHING,(STRPTR)MSG_FORMAT_CACHING_STR},
    {MSG_FORMAT_TRASHCAN,(STRPTR)MSG_FORMAT_TRASHCAN_STR},
    {MSG_FORMAT_INSTALL,(STRPTR)MSG_FORMAT_INSTALL_STR},
    {MSG_FORMAT_VERIFY,(STRPTR)MSG_FORMAT_VERIFY_STR},
    {MSG_FORMAT_DEFAULT_NAME,(STRPTR)MSG_FORMAT_DEFAULT_NAME_STR},
    {MSG_FORMAT_STATUS,(STRPTR)MSG_FORMAT_STATUS_STR},
    {MSG_OPENING_DEVICE,(STRPTR)MSG_OPENING_DEVICE_STR},
    {MSG_CHECKING_DISK,(STRPTR)MSG_CHECKING_DISK_STR},
    {MSG_CANT_OPEN_DEVICE,(STRPTR)MSG_CANT_OPEN_DEVICE_STR},
    {MSG_NO_DISK_PRESENT,(STRPTR)MSG_NO_DISK_PRESENT_STR},
    {MSG_DISK_WRITE_PROTECTED,(STRPTR)MSG_DISK_WRITE_PROTECTED_STR},
    {MSG_RETRY_CANCEL,(STRPTR)MSG_RETRY_CANCEL_STR},
    {MSG_PROCEED_CANCEL,(STRPTR)MSG_PROCEED_CANCEL_STR},
    {MSG_DISK_NOT_BLANK,(STRPTR)MSG_DISK_NOT_BLANK_STR},
    {MSG_ABORTED,(STRPTR)MSG_ABORTED_STR},
    {MSG_FORMAT_INITIALISING,(STRPTR)MSG_FORMAT_INITIALISING_STR},
    {MSG_FORMAT_FORMATTING,(STRPTR)MSG_FORMAT_FORMATTING_STR},
    {MSG_FORMAT_FORMATERROR,(STRPTR)MSG_FORMAT_FORMATERROR_STR},
    {MSG_FORMAT_VERIFYERROR,(STRPTR)MSG_FORMAT_VERIFYERROR_STR},
    {MSG_FORMAT_SUCCESSFUL,(STRPTR)MSG_FORMAT_SUCCESSFUL_STR},
    {MSG_FORMAT_FAILED,(STRPTR)MSG_FORMAT_FAILED_STR},
    {MSG_FORMAT_SETTING_UP,(STRPTR)MSG_FORMAT_SETTING_UP_STR},
    {MSG_FORMAT_CLEANING_UP,(STRPTR)MSG_FORMAT_CLEANING_UP_STR},
    {MSG_FORMAT_MAKING_TRASH,(STRPTR)MSG_FORMAT_MAKING_TRASH_STR},
    {MSG_INSTALLING_DISK,(STRPTR)MSG_INSTALLING_DISK_STR},
    {MSG_FORMAT_DESC,(STRPTR)MSG_FORMAT_DESC_STR},
};

#endif /* CATCOMP_ARRAY */


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


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x03\xE8\x00\x08"
    MSG_FORMAT_TITLE_STR "\x00\x00"
    "\x00\x00\x03\xE9\x00\x08"
    MSG_FORMAT_FORMAT_STR "\x00"
    "\x00\x00\x03\xEA\x00\x0E"
    MSG_FORMAT_QUICK_FORMAT_STR "\x00"
    "\x00\x00\x03\xEB\x00\x08"
    MSG_FORMAT_CANCEL_STR "\x00"
    "\x00\x00\x03\xEC\x00\x06"
    MSG_FORMAT_NAME_STR "\x00"
    "\x00\x00\x03\xED\x00\x12"
    MSG_FORMAT_FFS_STR "\x00"
    "\x00\x00\x03\xEE\x00\x14"
    MSG_FORMAT_INTERNATIONAL_STR "\x00"
    "\x00\x00\x03\xEF\x00\x14"
    MSG_FORMAT_CACHING_STR "\x00\x00"
    "\x00\x00\x03\xF0\x00\x0E"
    MSG_FORMAT_TRASHCAN_STR "\x00"
    "\x00\x00\x03\xF1\x00\x10"
    MSG_FORMAT_INSTALL_STR "\x00\x00"
    "\x00\x00\x03\xF2\x00\x08"
    MSG_FORMAT_VERIFY_STR "\x00"
    "\x00\x00\x03\xF3\x00\x06"
    MSG_FORMAT_DEFAULT_NAME_STR "\x00"
    "\x00\x00\x03\xF4\x00\x1E"
    MSG_FORMAT_STATUS_STR "\x00"
    "\x00\x00\x03\xF5\x00\x12"
    MSG_OPENING_DEVICE_STR "\x00"
    "\x00\x00\x03\xF6\x00\x12"
    MSG_CHECKING_DISK_STR "\x00\x00"
    "\x00\x00\x03\xF7\x00\x18"
    MSG_CANT_OPEN_DEVICE_STR "\x00\x00"
    "\x00\x00\x03\xF8\x00\x1A"
    MSG_NO_DISK_PRESENT_STR "\x00"
    "\x00\x00\x03\xF9\x00\x1A"
    MSG_DISK_WRITE_PROTECTED_STR "\x00\x00"
    "\x00\x00\x03\xFA\x00\x0E"
    MSG_RETRY_CANCEL_STR "\x00\x00"
    "\x00\x00\x03\xFB\x00\x10"
    MSG_PROCEED_CANCEL_STR "\x00\x00"
    "\x00\x00\x03\xFC\x00\x6E"
    MSG_DISK_NOT_BLANK_STR "\x00\x00"
    "\x00\x00\x03\xFD\x00\x0A"
    MSG_ABORTED_STR "\x00\x00"
    "\x00\x00\x03\xFE\x00\x16"
    MSG_FORMAT_INITIALISING_STR "\x00\x00"
    "\x00\x00\x03\xFF\x00\x0E"
    MSG_FORMAT_FORMATTING_STR "\x00"
    "\x00\x00\x04\x01\x00\x1C"
    MSG_FORMAT_FORMATERROR_STR "\x00\x00"
    "\x00\x00\x04\x02\x00\x1C"
    MSG_FORMAT_VERIFYERROR_STR "\x00\x00"
    "\x00\x00\x04\x03\x00\x14"
    MSG_FORMAT_SUCCESSFUL_STR "\x00\x00"
    "\x00\x00\x04\x04\x00\x10"
    MSG_FORMAT_FAILED_STR "\x00\x00"
    "\x00\x00\x04\x05\x00\x0E"
    MSG_FORMAT_SETTING_UP_STR "\x00"
    "\x00\x00\x04\x06\x00\x10"
    MSG_FORMAT_CLEANING_UP_STR "\x00\x00"
    "\x00\x00\x04\x07\x00\x14"
    MSG_FORMAT_MAKING_TRASH_STR "\x00\x00"
    "\x00\x00\x04\x08\x00\x18"
    MSG_INSTALLING_DISK_STR "\x00"
    "\x00\x00\x04\x09\x00\x0E"
    MSG_FORMAT_DESC_STR "\x00\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 /* FORMAT_H */
