From 80877aeeecf9761375276397dd8a5954841a978e Mon Sep 17 00:00:00 2001 From: Andi Jahja Date: Fri, 16 Nov 2001 13:32:11 +0000 Subject: [PATCH] andijahja@cbn.net.id --- harbour/contrib/libnf/getver.c | 3 +- harbour/doc/en/lang.txt | 59 +++--- harbour/source/compiler/genc.c | 14 +- harbour/source/compiler/genobj32.c | 5 +- harbour/source/lang/msgru866.c | 20 +- harbour/source/lang/msgruwin.c | 20 +- harbour/source/lang/msgzhb5.c | 210 +++++++++++++++++++++ harbour/source/lang/msgzhgb.c | 281 ++++++++++++++++++++--------- 8 files changed, 473 insertions(+), 139 deletions(-) create mode 100644 harbour/source/lang/msgzhb5.c diff --git a/harbour/contrib/libnf/getver.c b/harbour/contrib/libnf/getver.c index 70bf846465..29669ce6e9 100644 --- a/harbour/contrib/libnf/getver.c +++ b/harbour/contrib/libnf/getver.c @@ -156,7 +156,7 @@ HB_FUNC(_FT_TEMPFIL) char *cPath; #if defined(HB_OS_DOS) { - + int iMode=hb_parni(2); union REGS regs; struct SREGS sregs; @@ -175,6 +175,7 @@ HB_FUNC(_FT_TEMPFIL) nax=0; iflags=0; + cPath=hb_parc(1); } #endif { diff --git a/harbour/doc/en/lang.txt b/harbour/doc/en/lang.txt index 03de4e2769..f8b5c3e222 100644 --- a/harbour/doc/en/lang.txt +++ b/harbour/doc/en/lang.txt @@ -19,7 +19,7 @@ * $CATEGORY$ * Nation * $ONELINER$ - * Select a specific nation message module + * Select a specific nation message module * $SYNTAX$ * HB_LANGSELECT() --> cOldLang * $ARGUMENTS$ @@ -28,32 +28,37 @@ * Lang library,sorted by language. * * - * Language Codepage - * EU Basque 850 - * CS852 Czech 852 - * CSISO Czech ISO-8859-2 - * CSKAM Czech KAM - * CA Catalan 850 - * EN English 437 - * FR French 850 - * GL Galician 850 - * DE German 850 - * HE862 Hebrew 862 - * HEWIN Hebrew 1255 - * HU852 Hungarian 852 - * HUCWI Hungarian CWI-2 - * HUWIN Hungarian Windows-1 - * IS85 Icelandic 850 - * IT Italian 437 - * KR Korean 949 - * PL852 Polish 852 - * PLISO Polish ISO-8859-1 - * PLMAZ Polish Mozowia - * PT Portuguese 850 - * RO Romanian 852 - * SRISO Serbian ISO-8859-2 - * SR852 Serbian 852 - * ES Spanish 850 + * Language Codepage + * EU Basque 850 + * CS852 Czech 852 + * CSISO Czech ISO-8859-2 + * CSKAM Czech KAM + * CA Catalan 850 + * EN English 437 + * FR French 850 + * GL Galician 850 + * ID Indonesian 437 + * DE German 850 + * HE862 Hebrew 862 + * HEWIN Hebrew 1255 + * HU852 Hungarian 852 + * HUCWI Hungarian CWI-2 + * HUWIN Hungarian Windows-1 + * IS85 Icelandic 850 + * IT Italian 437 + * KR Korean 949 + * PL852 Polish 852 + * PLISO Polish ISO-8859-1 + * PLMAZ Polish Mozowia + * PT Portuguese 850 + * RO Romanian 852 + * SRISO Serbian ISO-8859-2 + * SR852 Serbian 852 + * ES Spanish 850 + * RU866 Russian 866 + * RUWIN Russian Windows-1251 + * ZH_GB Chinese Simplified 936 + * ZH_BIG5 Chinese Traditional 950 *
* $RETURNS$ * The old language indentifier diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index ba87a9faf2..8e226aefc4 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -760,7 +760,7 @@ static HB_GENC_FUNC( hb_p_localname ) } fprintf( cargo->yyc, " 0,\n" ); - return lPCodePos - ulStart + 1; + return (USHORT) ( lPCodePos - ulStart + 1 ); } static HB_GENC_FUNC( hb_p_macropop ) @@ -891,7 +891,7 @@ static HB_GENC_FUNC( hb_p_modulename ) } fprintf( cargo->yyc, " 0,\n" ); - return lPCodePos - ulStart + 1; + return (USHORT) ( lPCodePos - ulStart + 1 ); } static HB_GENC_FUNC( hb_p_modulus ) @@ -1216,7 +1216,7 @@ static HB_GENC_FUNC( hb_p_pushblock ) fprintf( cargo->yyc, "\n" ); lPCodePos +=2; } - return lPCodePos - ulStart; + return (USHORT) (lPCodePos - ulStart); } static HB_GENC_FUNC( hb_p_pushblockshort ) @@ -1493,7 +1493,7 @@ static HB_GENC_FUNC( hb_p_pushstr ) } fprintf( cargo->yyc, "\n" ); - return lPCodePos - ulStart; + return (USHORT) (lPCodePos - ulStart); } static HB_GENC_FUNC( hb_p_pushstrshort ) @@ -1529,7 +1529,7 @@ static HB_GENC_FUNC( hb_p_pushstrshort ) } fprintf( cargo->yyc, "\n" ); - return lPCodePos - ulStart; + return (USHORT) ( lPCodePos - ulStart ); } static HB_GENC_FUNC( hb_p_pushsym ) @@ -1688,7 +1688,7 @@ static HB_GENC_FUNC( hb_p_statics ) } } - return lByteCount; + return (USHORT) lByteCount; } static HB_GENC_FUNC( hb_p_staticname ) @@ -1711,7 +1711,7 @@ static HB_GENC_FUNC( hb_p_staticname ) } fprintf( cargo->yyc, " 0,\n" ); - return lPCodePos - ulStart + 1; + return (USHORT) ( lPCodePos - ulStart + 1 ); } static HB_GENC_FUNC( hb_p_swapalias ) diff --git a/harbour/source/compiler/genobj32.c b/harbour/source/compiler/genobj32.c index 99ce3ffda0..f612c020f7 100644 --- a/harbour/source/compiler/genobj32.c +++ b/harbour/source/compiler/genobj32.c @@ -367,8 +367,7 @@ static void CompiledFileName( FILE * hObjFile, char * szFileName ) putbyte( 0x80, hObjFile, &bChk ); /* this tells the linker the kind of OBJ record this is */ putbyte( 1 + 1 + wLen, hObjFile, &bChk ); /* now it comes the total length of this OBJ record */ putbyte( 0, hObjFile, &bChk ); - - putbyte( wLen, hObjFile, &bChk ); /* szFileName length */ + putbyte( (BYTE) wLen, hObjFile, &bChk ); /* szFileName length */ while( ( bChar = * szFileName++ ) != 0 ) putbyte( bChar, hObjFile, &bChk ); /* each of the szFileName characters */ @@ -585,7 +584,7 @@ static void PubDef( FILE * hObjFile, char * szName, USHORT wSegment, USHORT wOff putbyte( 0x90, hObjFile, &bChk ); putword( wLen, hObjFile, &bChk ); putbyte( 0x00, hObjFile, &bChk ); - putbyte( wSegment, hObjFile, &bChk ); + putbyte( (BYTE) wSegment, hObjFile, &bChk ); putbyte( strlen( szPrefix ) + strlen( szName ), hObjFile, &bChk ); szTemp = szPrefix; diff --git a/harbour/source/lang/msgru866.c b/harbour/source/lang/msgru866.c index abefbf7a3c..62fba1afab 100644 --- a/harbour/source/lang/msgru866.c +++ b/harbour/source/lang/msgru866.c @@ -67,7 +67,7 @@ static HB_LANG s_lang = "RU", /* RFC ID */ "866", /* Codepage */ "$Revision$ $Date$", /* Version */ - + /* Month names */ "", @@ -182,27 +182,27 @@ static HB_LANG s_lang = "VM: ", "%s: ᨬ", "%s: ⨯ ᨬ self", - "%s: ", + "%s: ", "%s: ⨯ 設 ⥪", - "室 । ⥪", - "%s: ⪠ ஢ ᥡ", + "室 । ⥪", + "%s: ⪠ ஢ ᥡ", "%s: ୮ ६", "९ ", - + /* Texts */ - + "//", "", "" } }; -HB_LANG_ANNOUNCE( TPL ); +HB_LANG_ANNOUNCE( RU866 ); -HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TPL ) +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_RU866 ) hb_langRegister( &s_lang ); -HB_CALL_ON_STARTUP_END( hb_lang_Init_TPL ) +HB_CALL_ON_STARTUP_END( hb_lang_Init_RU866 ) #if ! defined(__GNUC__) && ! defined(_MSC_VER) - #pragma startup hb_lang_Init_TPL + #pragma startup hb_lang_Init_RU866 #endif diff --git a/harbour/source/lang/msgruwin.c b/harbour/source/lang/msgruwin.c index e0baff7de6..2cc7b1aed3 100644 --- a/harbour/source/lang/msgruwin.c +++ b/harbour/source/lang/msgruwin.c @@ -67,7 +67,7 @@ static HB_LANG s_lang = "RU", /* RFC ID */ "1251", /* Codepage */ "$Revision$ $Date$", /* Version */ - + /* Month names */ "", @@ -182,27 +182,27 @@ static HB_LANG s_lang = "VM: ", "%s: ", "%s: self", - "%s: ", + "%s: ", "%s: ", - " ", - "%s: ", + " ", + "%s: ", "%s: ", " ", - + /* Texts */ - + "//", "", "" } }; -HB_LANG_ANNOUNCE( TPL ); +HB_LANG_ANNOUNCE( RUWIN ); -HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TPL ) +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_RUWIN ) hb_langRegister( &s_lang ); -HB_CALL_ON_STARTUP_END( hb_lang_Init_TPL ) +HB_CALL_ON_STARTUP_END( hb_lang_Init_RUWIN ) #if ! defined(__GNUC__) && ! defined(_MSC_VER) - #pragma startup hb_lang_Init_TPL + #pragma startup hb_lang_Init_RUWIN #endif diff --git a/harbour/source/lang/msgzhb5.c b/harbour/source/lang/msgzhb5.c new file mode 100644 index 0000000000..fe429fe3d9 --- /dev/null +++ b/harbour/source/lang/msgzhb5.c @@ -0,0 +1,210 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (ZH_BIG5) + * + * Copyright 1999-2001 dongming + * or + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Chinese */ +/* ISO language code (2 chars):ZH */ +/* Codepage: 936 for ZH,ZH-CN,ZH-SG (Chinese Simplified) */ +/* Codepage: 950 for ZH-HK,ZH-TW (Chinese Traditional) */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "ZH", /* ID */ + "Chinese Traditional", /* Name (in English) */ + "cBIG5", /* Name (in native language) */ + "ZH", /* RFC ID */ + "950", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "@", + "G", + "T", + "|", + "", + "", + "C", + "K", + "E", + "Q", + "Q@", + "QG" + + /* Day names */ + + "P", + "P@", + "PG", + "PT", + "P|", + "P", + "P" + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Unknown error", + "Argument error", + "Bound error", + "String overflow", + "Numeric overflow", + "Zero divisor", + "Numeric error", + "Syntax error", + "Operation too complex", + "", + "", + "Memory low", + "Undefined function", + "No exported method", + "Variable does not exist", + "Alias does not exist", + "No exported variable", + "Illegal characters in alias", + "Alias already in use", + "", + "Create error", + "Open error", + "Close error", + "Read error", + "Write error", + "Print error", + "", + "", + "", + "", + "Operation not supported", + "Limit exceeded", + "Corruption detected", + "Data type error", + "Data width error", + "Workarea not in use", + "Workarea not indexed", + "Exclusive required", + "Lock required", + "Write not allowed", + "Append lock failed", + "Lock Failure", + "", + "", + "", + "", + "array access", + "array assign", + "array dimension", + "not an array", + "conditional", + + /* Internal error names */ + + "Unrecoverable error %lu: ", + "Error recovery failure", + "No ERRORBLOCK() for error", + "Too many recursive error handler calls", + "RDD invalid or failed to load", + "Invalid method type from %s", + "hb_xgrab can't allocate memory", + "hb_xrealloc called with a NULL pointer", + "hb_xrealloc called with an invalid pointer", + "hb_xrealloc can't reallocate memory", + "hb_xfree called with an invalid pointer", + "hb_xfree called with a NULL pointer", + "Can\'t locate the starting procedure: \'%s\'", + "No starting procedure", + "Unsupported VM opcode", + "Symbol item expected from %s", + "Invalid symbol type for self from %s", + "Codeblock expected from %s", + "Incorrect item type on the stack trying to pop from %s", + "Stack underflow", + "An item was going to be copied to itself from %s", + "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", + + /* Texts */ + + "YYYY/MM/DD", + "Y", + "N" + } +}; + +HB_LANG_ANNOUNCE( ZH_BIG5 ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_ZH_BIG5 ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_ZH_BIG5 ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_ZH_BIG5 +#endif + diff --git a/harbour/source/lang/msgzhgb.c b/harbour/source/lang/msgzhgb.c index 88ed4ea419..7431adf5ba 100644 --- a/harbour/source/lang/msgzhgb.c +++ b/harbour/source/lang/msgzhgb.c @@ -2,91 +2,210 @@ * $Id$ */ -/* Language Support Module */ +/* + * Harbour Project source code: + * Language Support Module (ZH_GB) + * + * Copyright 1999-2001 dongming + * or + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ -/* Language name: Chinese-GB */ -/* ISO language code (2 chars): ZH */ -/* Codepage: ???? */ +/* Language name: Chinese */ +/* ISO language code (2 chars):ZH */ +/* Codepage: 936 for ZH,ZH-CN,ZH-SG (Chinese Simplified) */ +/* Codepage: 950 for ZH-HK,ZH-TW (Chinese Traditional) */ -#include "hbdefs.h" +#include "hbapilng.h" -char *hb_dateMonthsName[ 12 ] = +/* Chinese Simplified: Codepage: 936 for ZH,ZH-CN,ZH-SG ,this is for chinese-gb code */ +static HB_LANG s_lang = { - "һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ" + { + /* Identification */ + + "ZH", /* ID */ + "Chinese Simplified", /* Name (in English) */ + "ļGB", /* Name (in native language) */ + "ZH", /* RFC ID */ + "936", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "һ", + "", + "", + "", + "", + "", + "", + "", + "", + "ʮ", + "ʮһ", + "ʮ" + + /* Day names */ + + "", + "һ", + "ڶ", + "", + "", + "", + "" + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Unknown error", + "Argument error", + "Bound error", + "String overflow", + "Numeric overflow", + "Zero divisor", + "Numeric error", + "Syntax error", + "Operation too complex", + "", + "", + "Memory low", + "Undefined function", + "No exported method", + "Variable does not exist", + "Alias does not exist", + "No exported variable", + "Illegal characters in alias", + "Alias already in use", + "", + "Create error", + "Open error", + "Close error", + "Read error", + "Write error", + "Print error", + "", + "", + "", + "", + "Operation not supported", + "Limit exceeded", + "Corruption detected", + "Data type error", + "Data width error", + "Workarea not in use", + "Workarea not indexed", + "Exclusive required", + "Lock required", + "Write not allowed", + "Append lock failed", + "Lock Failure", + "", + "", + "", + "", + "array access", + "array assign", + "array dimension", + "not an array", + "conditional", + + /* Internal error names */ + + "Unrecoverable error %lu: ", + "Error recovery failure", + "No ERRORBLOCK() for error", + "Too many recursive error handler calls", + "RDD invalid or failed to load", + "Invalid method type from %s", + "hb_xgrab can't allocate memory", + "hb_xrealloc called with a NULL pointer", + "hb_xrealloc called with an invalid pointer", + "hb_xrealloc can't reallocate memory", + "hb_xfree called with an invalid pointer", + "hb_xfree called with a NULL pointer", + "Can\'t locate the starting procedure: \'%s\'", + "No starting procedure", + "Unsupported VM opcode", + "Symbol item expected from %s", + "Invalid symbol type for self from %s", + "Codeblock expected from %s", + "Incorrect item type on the stack trying to pop from %s", + "Stack underflow", + "An item was going to be copied to itself from %s", + "Invalid symbol item passed as memvar %s", + "Memory buffer overflow", + + /* Texts */ + + "YYYY/MM/DD", + "Y", + "N" + } }; -char *hb_dateDaysName[ 7 ] = -{ - "", - "һ", - "ڶ", - "", - "", - "", - "" -}; +HB_LANG_ANNOUNCE( ZH_GB ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_ZH_GB ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_ZH_GB ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_ZH_GB +#endif -char *hb_errorsGeneric[] = -{ - "Unknown error", - "Argument error", - "Bound error", - "String overflow", - "Numeric overflow", - "Zero divisor", - "Numeric error", - "Syntax error", - "Operation too complex", - "", - "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exist", - "Alias does not exist", - "No exported variable", - "Illegal characters in alias", - "Alias already in use", - "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", - "", - "", - "", - "", - "Operation not supported", - "Limit exceeded", - "Corruption detected", - "Data type error", - "Data width error", - "Workarea not in use", - "Workarea not indexed", - "Exclusive required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock Failure", - "", - "", - "", - "Incorrect number of arguments", - "array access", - "array assign", - "not an array", - "conditional" -};