/****************************************************************************
 * KONOHA COPYRIGHT, LICENSE NOTICE, AND DISCRIMER  
 * 
 * Copyright (c) 2005-2008, Kimio Kuramitsu <kimio at ynu.ac.jp>
 *           (c) 2008-      Konoha Software Foundation  
 * All rights reserved.
 * 
 * You may choose one of the following two licenses when you use konoha. 
 * See www.konohaware.org/license.html for further information.
 * 
 * (1) GNU General Public License 2.0      (with    KONOHA_UNDER_GPL2)
 * (2) Konoha Software Foundation License 1.0
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *  
 ****************************************************************************/

#ifndef KONOHA_MESSAGE__H
#define KONOHA_MESSAGE__H

#include<konoha/konoha_t.h>


#ifdef __cplusplus 
extern "C" {
#endif

/* ======================================================================== */
#define KONOHA_LANG                     "en"
#define KONOHA_LANG__en                 0
#define KONOHA_LANG__ja                 1
#define KONOHA_LANG__debug              2
#define KONOHA_LANG_MAXSIZ              3

/* ------------------------------------------------------------------------ */
#define KMSG_NAME                       0
#define KMSG_ERRATA                     1
#define KMSG_ETIME                      2
#define KMSG_ESYNTAX                    3
#define KMSG_EFORGET_PARENTHESIS        4
#define KMSG_EMISMATCH                  5
#define KMSG_WUNCLOSED                  6
#define KMSG_WASCII                     7
#define KMSG_WEOF                       8
#define KMSG_WSEMICOLON                 9
#define KMSG_IGSTMT                     10
#define KMSG_ETOKEN                     11
#define KMSG_ELENGTH                    12
#define KMSG_WCLASSN                    13
#define KMSG_WCONSTN                    14
#define KMSG_WCMETHODN                  15
#define KMSG_WNAME                      16
#define KMSG_WIGNORED                   17
#define KMSG_TEXPTN                     18
#define KMSG_TNSNAME                    19
#define KMSG_TCURN                      20
#define KMSG_TNSCLASSN                  21
#define KMSG_TTYPEN                     22
#define KMSG_TMETHODN                   23
#define KMSG_TCLASSTN                   24
#define KMSG_TSTR                       25
#define KMSG_TVARN                      26
#define KMSG_TCLASSN                    27
#define KMSG_TARGS                      28
#define KMSG_TNAME                      29
#define KMSG_TCMETHODN                  30
#define KMSG_TMT                        31
#define KMSG_TANY                       32
#define KMSG_TSTMT1                     33
#define KMSG_TPEXPR                     34
#define KMSG_TCATCHPARAM                35
#define KMSG_ELVALUE                    36
#define KMSG_ENEXTPREV                  37
#define KMSG_EEMPTYEXPR                 38
#define KMSG_ETRINARY                   39
#define KMSG_EPSTMT3                    40
#define KMSG_WLET                       41
#define KMSG_WEMPTYPEXPR                42
#define KMSG_WEMPTYARGS                 43
#define KMSG_UUOPTION                   44
#define KMSG_UCONSTN                    45
#define KMSG_UVARN                      46
#define KMSG_USYSTEMVARN                47
#define KMSG_UCLASSN                    48
#define KMSG_UTAG                       49
#define KMSG_UTYPEN                     50
#define KMSG_UMETHODN                   51
#define KMSG_UFUNCN                     52
#define KMSG_ULABEL                     53
#define KMSG_UOP                        54
#define KMSG_UNEW                       55
#define KMSG_UMAP                       56
#define KMSG_INTOVERFLOW                57
#define KMSG_FLOATOVERFLOW              58
#define KMSG_INT64OVERFLOW              59
#define KMSG_ETOOFEWPARAMS              60
#define KMSG_WTOOMANYPARAMS             61
#define KMSG_EOP2                       62
#define KMSG_EOPCMP                     63
#define KMSG_EVOIDPARAM                 64
#define KMSG_ENULLPARAM                 65
#define KMSG_WNULLPARAM                 66
#define KMSG_ETYPEPARAM                 67
#define KMSG_EVOIDRETURN                68
#define KMSG_ENULLRETURN                69
#define KMSG_WNULLRETURN                70
#define KMSG_ETYPERETURN                71
#define KMSG_EVOIDLET                   72
#define KMSG_ENULLLET                   73
#define KMSG_WNULLLET                   74
#define KMSG_ETYPELET                   75
#define KMSG_WDUPFUNCNAME               76
#define KMSG_USCLASSFUNC                77
#define KMSG_USNNTYPE                   78
#define KMSG_IGNNTYPE                   79
#define KMSG_EEXTENDS                   80
#define KMSG_EIMPLEMENTS                81
#define KMSG_DIFFDECL                   82
#define KMSG_DIFFCLASSN                 83
#define KMSG_DIFFNEWTYPE                84
#define KMSG_DIFFRTYPE                  85
#define KMSG_DIFFPSIZE                  86
#define KMSG_DIFFPTYPE                  87
#define KMSG_DIFFPNAME                  88
#define KMSG_TOOMANYVARS                89
#define KMSG_EOUTERLOOP                 90
#define KMSG_IGFIELDVALUE               91
#define KMSG_IGSCRIPTNAME               92
#define KMSG_IGFIELDNAME                93
#define KMSG_NORETURN                   94
#define KMSG_NORETURNVALUE              95
#define KMSG_IGRETURN                   96
#define KMSG_AHISTORIC                  97
#define KMSG_AOVERRIDE                  98
#define KMSG_EOVERRIDE                  99
#define KMSG_TOABSTRACT                 100
#define KMSG_MAXSIZ                     101

/* ------------------------------------------------------------------------ */

/* ======================================================================== */
int knh_system_langid(char *lang);
int knh_system_setLang(char *lang);
int knh_message_type(int e);
char *knh_message_text(int e);
char *knh_message_tochar(int e);

#ifdef __cplusplus
}
#endif

/* ======================================================================== */

#endif/*KONOHA_MESSAGE__H*/
