/****************************************************************
   This file was created automatically by `KitCat V1.1'
   Do NOT edit by hand!
****************************************************************/

#ifndef CAT_H
#include "CAT.h"
#endif  /*  !CAT_H           */

#ifndef CLIB_LOCALE_PROTOS_H
#include <clib/locale_protos.h>
#endif  /*  !CLIB_LOCALE_PROTOS_H   */

#ifdef AZTEC_C
#ifndef __PRAGMAS_LOCALE_LIB_H
#include <pragmas/locale_lib.h>
#endif /*   !PRAGMAS_LOCALE_LIB_H   */
#endif /*   AZTEC_C                 */

static LONG FillInVersion = 1;
static const STRPTR FillInBuiltInLanguage = (STRPTR) "deutsch";

struct KCFillInArrayType
{   LONG    cca_ID;
    STRPTR  cca_Str;
};

static const struct KCFillInArrayType KCFillInArray [] =
{
    {MSG_win_fillout, (STRPTR)MSG_win_fillout_STR},
    {MSG_bt_laden, (STRPTR)MSG_bt_laden_STR},
    {MSG_bt_nochmal, (STRPTR)MSG_bt_nochmal_STR},
    {MSG_bt_answer, (STRPTR)MSG_bt_answer_STR},
    {MSG_bt_info, (STRPTR)MSG_bt_info_STR},
    {MSG_tx_info, (STRPTR)MSG_tx_info_STR},
    {MSG_help, (STRPTR)MSG_help_STR},
    {MSG_req_end, (STRPTR)MSG_req_end_STR},
};

static struct Catalog *FillInCatalog = NULL;
  extern struct Library *LocaleBase;
void OpenFillInCatalog(struct Locale *loc, STRPTR language)
{ LONG tag, tagarg;

  CloseFillInCatalog();
  if (language == NULL)
  { tag = TAG_IGNORE;
  }
  else
  { tag = OC_Language;
    tagarg = (LONG) language;
  }
  if (LocaleBase != NULL  &&  FillInCatalog == NULL)
  { FillInCatalog = OpenCatalog(loc, (STRPTR) "FillIn/FillIn.catalog",
                             OC_BuiltInLanguage, FillInBuiltInLanguage,
                             tag, tagarg,
                             OC_Version, FillInVersion,
                             TAG_DONE);
  }
}

void CloseFillInCatalog(void)
{ if (LocaleBase != NULL)
    CloseCatalog(FillInCatalog);
  FillInCatalog = NULL;
}

STRPTR GetFillInString(LONG strnum)
{ STRPTR defaultstr = NULL;
  LONG i;

  for (i = 0;  i < sizeof(KCFillInArray)/sizeof(struct KCFillInArrayType);  i++)
    { if (KCFillInArray[i].cca_ID == strnum)
      { defaultstr = KCFillInArray[i].cca_Str;
        break;
      }
    }
  if (FillInCatalog == NULL)
  { return(defaultstr);
  }
  return(GetCatalogStr(FillInCatalog, strnum, defaultstr));
}
