2000-07-24 22:12 UTC+0100 Victor Szakats <info@szelvesz.hu>
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
2000-07-24 22:12 UTC+0100 Victor Szakats <info@szelvesz.hu>
|
||||
|
||||
* include/hbextern.ch
|
||||
* source/rtl/errorapi.c
|
||||
* source/rtl/tobject.prg
|
||||
* source/vm/classes.c
|
||||
* TOBJECT_ERROR() implemented in Clipper/Harbour instead of C to keep it
|
||||
clean.
|
||||
+ __errRT_SBASE() internal function added to throw a substitutable (?)
|
||||
runtime error.
|
||||
|
||||
* source/lang/msgko.c
|
||||
* source/lang/Makefile
|
||||
* makefile.bc
|
||||
* makefile.vc
|
||||
+ Korean language module updated. Thanks to Kwon Oh-Chul.
|
||||
|
||||
- tests/test.frm
|
||||
- Removed since it was corrupted.
|
||||
|
||||
2000-07-22 23:30 UTC+0800 Ron Pinkas <ron@profit-master.com>
|
||||
* source/compiler/harbour.slx
|
||||
! Optimized handling of Hex Numbers.
|
||||
|
||||
@@ -84,7 +84,6 @@ EXTERNAL __GETMESSAGE
|
||||
EXTERNAL __CLS_PARAM
|
||||
EXTERNAL __CLSPARENT
|
||||
EXTERNAL __SENDER
|
||||
EXTERNAL TOBJECT_ER
|
||||
//
|
||||
//symbols from file: vm\cmdarg.c
|
||||
//
|
||||
@@ -287,6 +286,7 @@ EXTERNAL __ERRINHANDLER
|
||||
EXTERNAL ERRORBLOCK
|
||||
EXTERNAL DOSERROR
|
||||
EXTERNAL __ERRRT_BASE
|
||||
EXTERNAL __ERRRT_SBASE
|
||||
//
|
||||
//symbols from file: rtl\filesys.c
|
||||
//
|
||||
|
||||
@@ -337,6 +337,7 @@ LANG_LIB_OBJS = \
|
||||
$(OBJ_DIR)\msghuwin.obj \
|
||||
$(OBJ_DIR)\msgis850.obj \
|
||||
$(OBJ_DIR)\msgit.obj \
|
||||
$(OBJ_DIR)\msgko.obj \
|
||||
$(OBJ_DIR)\msgpt.obj \
|
||||
$(OBJ_DIR)\msgro.obj \
|
||||
$(OBJ_DIR)\msgsr852.obj \
|
||||
@@ -1763,6 +1764,10 @@ $(OBJ_DIR)\msgit.obj : $(LANG_DIR)\msgit.c
|
||||
$(CC) $(CLIBFLAGS) -o$@ $**
|
||||
tlib $(LANG_LIB) $(ARFLAGS) -+$@,,
|
||||
|
||||
$(OBJ_DIR)\msgko.obj : $(LANG_DIR)\msgko.c
|
||||
$(CC) $(CLIBFLAGS) -o$@ $**
|
||||
tlib $(LANG_LIB) $(ARFLAGS) -+$@,,
|
||||
|
||||
$(OBJ_DIR)\msgpt.obj : $(LANG_DIR)\msgpt.c
|
||||
$(CC) $(CLIBFLAGS) -o$@ $**
|
||||
tlib $(LANG_LIB) $(ARFLAGS) -+$@,,
|
||||
|
||||
@@ -365,6 +365,7 @@ LANG_LIB_OBJS = \
|
||||
$(OBJ_DIR)\msghuwin.obj \
|
||||
$(OBJ_DIR)\msgis850.obj \
|
||||
$(OBJ_DIR)\msgit.obj \
|
||||
$(OBJ_DIR)\msgko.obj \
|
||||
$(OBJ_DIR)\msgpt.obj \
|
||||
$(OBJ_DIR)\msgro.obj \
|
||||
$(OBJ_DIR)\msgsr852.obj \
|
||||
|
||||
@@ -25,6 +25,7 @@ C_SOURCES=\
|
||||
msghuwin.c \
|
||||
msgis850.c \
|
||||
msgit.c \
|
||||
msgko.c \
|
||||
msgpt.c \
|
||||
msgro.c \
|
||||
msgsr852.c \
|
||||
|
||||
@@ -2,91 +2,189 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Language Support Module */
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Language Support Module (KR)
|
||||
*
|
||||
* Copyright 2000 Kwon, Oh-Chul <ohchul@fivetech.net>
|
||||
* 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 of the License, or
|
||||
* (at your option) any later version, with one exception:
|
||||
*
|
||||
* The exception is that if you link the Harbour Runtime Library (HRL)
|
||||
* and/or the Harbour Virtual Machine (HVM) 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 HRL
|
||||
* and/or HVM code into it.
|
||||
*
|
||||
* 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 program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*
|
||||
*/
|
||||
|
||||
/* Language name: Korean */
|
||||
/* ISO language code (2 chars): KO */
|
||||
/* Codepage: ???? */
|
||||
/* Language name: <Your language> */
|
||||
/* ISO language code (2 chars): (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: <Your codepage> */
|
||||
|
||||
#include "hbdefs.h"
|
||||
#include "hbapilng.h"
|
||||
|
||||
char *hb_dateMonthsName[ 12 ] =
|
||||
static HB_LANG s_lang =
|
||||
{
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월"
|
||||
{
|
||||
/* Identification */
|
||||
|
||||
"KR", /* ID */
|
||||
"English", /* Name (in English) */
|
||||
"한국어", /* Name (in native language) */
|
||||
"KR", /* RFC ID */
|
||||
"949", /* Codepage */
|
||||
"$Revision$ $Date$", /* Version */
|
||||
|
||||
/* Month names */
|
||||
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월",
|
||||
|
||||
/* Day names */
|
||||
|
||||
"일요일",
|
||||
"월요일",
|
||||
"화요일",
|
||||
"수"
|
||||
"목",
|
||||
"금",
|
||||
"토",
|
||||
|
||||
/* CA-Cl*pper compatible natmsg items */
|
||||
|
||||
"데이터 파일 s # 레코드수 최종 수정일 크기",
|
||||
"다른 예제를 원하십니까?",
|
||||
"페이지 번호.",
|
||||
"** 소계 **",
|
||||
"* (중간)소계 *",
|
||||
"*** 총계 ***",
|
||||
"삽입",
|
||||
" ",
|
||||
"잘못된 날짜",
|
||||
"범위: ",
|
||||
" - ",
|
||||
"Y/N",
|
||||
"잘못된 표현식",
|
||||
|
||||
/* 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",
|
||||
|
||||
/* Texts */
|
||||
|
||||
"YYYY-MM-DD",
|
||||
"Y",
|
||||
"N"
|
||||
}
|
||||
};
|
||||
|
||||
char *hb_dateDaysName[ 7 ] =
|
||||
{
|
||||
"일요일",
|
||||
"월요일",
|
||||
"화요일",
|
||||
"수요일",
|
||||
"목요일",
|
||||
"금요일",
|
||||
"토요일"
|
||||
};
|
||||
HB_LANG_ANNOUNCE( TPL );
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TPL )
|
||||
hb_langRegister( &s_lang );
|
||||
HB_CALL_ON_STARTUP_END( hb_lang_Init_TPL )
|
||||
#if ! defined(__GNUC__) && ! defined(_MSC_VER)
|
||||
#pragma startup hb_lang_Init_TPL
|
||||
#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"
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
* DOSERROR()
|
||||
* __ERRINHANDLER()
|
||||
* __ERRRT_BASE()
|
||||
* __ERRRT_SBASE()
|
||||
* hb_errLaunch()
|
||||
* hb_errLaunchSubst()
|
||||
* hb_errGetFlags()
|
||||
@@ -730,6 +731,15 @@ HB_FUNC( __ERRRT_BASE )
|
||||
hb_parc( 4 ) );
|
||||
}
|
||||
|
||||
HB_FUNC( __ERRRT_SBASE )
|
||||
{
|
||||
hb_itemRelease( hb_itemReturn(
|
||||
hb_errRT_BASE_Subst( ( ULONG ) hb_parnl( 1 ),
|
||||
( ULONG ) hb_parnl( 2 ),
|
||||
ISCHAR( 3 ) ? hb_parc( 3 ) : NULL,
|
||||
hb_parc( 4 ) ) ) );
|
||||
}
|
||||
|
||||
USHORT hb_errRT_BASE( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation )
|
||||
{
|
||||
USHORT uiAction;
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#include "common.ch"
|
||||
#include "hboo.ch"
|
||||
#include "error.ch"
|
||||
|
||||
FUNCTION TObject()
|
||||
STATIC s_oClass
|
||||
@@ -73,7 +74,7 @@ FUNCTION TObject()
|
||||
s_oClass:AddMethod( "NEW" , @TObject_New() , nScope )
|
||||
s_oClass:AddMethod( "INIT" , @TObject_Init() , nScope )
|
||||
|
||||
s_oClass:AddMethod( "ERROR", @TOBJECT_ER() , nScope ) /* see classes.c */
|
||||
s_oClass:AddMethod( "ERROR", @TOBJECT_ERROR() , nScope ) /* see classes.c */
|
||||
|
||||
s_oClass:SetOnError( @TObject_DftonError() )
|
||||
|
||||
@@ -146,7 +147,12 @@ static function TObject_Dftonerror(xPar0, xPar1, xPar2, xPar3, xPar4, xPar5, xPa
|
||||
return QSelf():MSGNOTFOUND( __GetMessage(), xPar0, xPar1, xPar2, xPar3, xPar4, xPar5, xPar6, xPar7, xPar8, xPar9, ;
|
||||
xPar10,xPar11,xPar12,xPar13,xPar14,xPar15,xPar16,xPar17,xPar18,xPar19 )
|
||||
|
||||
/* This function is stored within classes.c and will generate on runTime error */
|
||||
/*
|
||||
* static function TObject_Er(cMsgErr, cCls, cMsg)
|
||||
*/
|
||||
static function TObject_Error( cDesc, cClass, cMsg, nCode )
|
||||
|
||||
DEFAULT nCode TO 1004
|
||||
|
||||
IF nCode == 1005
|
||||
RETURN __errRT_SBASE( EG_NOVARMETHOD, 1005, cDesc, cClass + ":" + cMsg )
|
||||
ENDIF
|
||||
|
||||
RETURN __errRT_SBASE( EG_NOMETHOD, nCode, cDesc, cClass + ":" + cMsg )
|
||||
|
||||
@@ -2162,38 +2162,3 @@ static HARBOUR hb___msgVirtual( void )
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
/* ************** C Function associate to TObject.prg ********************* */
|
||||
|
||||
/* tObject:Error(cDesc,cClass,cMsg,nCode) */
|
||||
HB_FUNC( TOBJECT_ER )
|
||||
{
|
||||
char * pszDesc = hb_parc( 1 );
|
||||
char * pszClass = hb_parc( 2 );
|
||||
char * pszMsg = hb_parc( 3 );
|
||||
char szTmp[255] ;
|
||||
USHORT uiCode = 1004 ;
|
||||
|
||||
PHB_ITEM pResult ;
|
||||
|
||||
if (hb_pcount()>3)
|
||||
uiCode= (USHORT) hb_parni(4);
|
||||
|
||||
strcpy( szTmp, pszClass );
|
||||
strcat( szTmp, ":" );
|
||||
|
||||
if( uiCode==1005 )
|
||||
{
|
||||
strcat( szTmp, pszMsg+1 );
|
||||
pResult = hb_errRT_BASE_Subst( EG_NOVARMETHOD, 1005, pszDesc, szTmp );
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( szTmp, pszMsg );
|
||||
pResult = hb_errRT_BASE_Subst( EG_NOMETHOD, 1004, pszDesc, szTmp );
|
||||
}
|
||||
|
||||
hb_itemReturn( pResult );
|
||||
hb_itemRelease( pResult );
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user