##stringtype E
##shortstrings
/****************************************************************
   This file was created automatically by `FlexCat V1.1'
   Do not edit by hand!
****************************************************************/


    /* External modules */
MODULE 'locale', 'libraries/locale'
MODULE 'utility/tagitem'

    /* Object definitions */
OBJECT fc_type
    id  :LONG
    str :LONG
ENDOBJECT

    /* Global variables */
DEF catalog_%b:PTR TO catalog
DEF array_%b[%n]:ARRAY OF fc_type

    /* Constant definitions */
CONST %i = %d


    /* Opening catalog procedure */
PROC open_%b_catalog(loc:PTR TO locale, language:PTR TO CHAR)
    DEF tag, tagarg, dummy_var = 0

    array_%b[dummy_var].id := %i; array_%b[dummy_var++].str := %s

    IF (localebase AND (catalog_%b = NIL))
        IF language
            tag := OC_LANGUAGE
            tagarg := language
        ELSE
            tag:= TAG_IGNORE
        ENDIF

        catalog_%b := OpenCatalogA(loc, '%b.catalog',
                                    [   OC_BUILTINLANGUAGE, %l,
                                        tag, tagarg,
                                        OC_VERSION, %v,
                                        TAG_DONE    ])
    ENDIF
ENDPROC
    
    /* Closing catalog procedure */
PROC close_%b_catalog()

    IF localebase THEN CloseCatalog(catalog_%b)
    catalog_%b := NIL
ENDPROC

    /* Procedure which returns the correct string according to the catalog */
PROC get_%b_string(strnum)
    DEF defaultstr:PTR TO CHAR, i = 0

    WHILE ((i < %n) AND (array_%b[i].id <> strnum)) DO INC i
    defaultstr := IF (i < %n) THEN array_%b[i].str ELSE NIL

ENDPROC IF catalog_%b THEN GetCatalogStr(catalog_%b, strnum, defaultstr) ELSE defaultstr
/****************************************************************
   End of the automatically created part!
****************************************************************/

