2006-12-19 22:47 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprop.h
* harbour/source/common/expropt1.c
+ added hb_compExprParamListLen()
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* use hb_compExprParamListLen()
* harbour/include/hbexprc.c
* generate error message for syntax like:
o:var()++ or o:var()+=10
only:
o:var++ and o:var+=10
is supported, just like for @o:var
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ hb_numDecConv() used to convert double value to/from binary integer
fields with fixed number of decimal places
* harbour/common.mak
* harbour/include/hbapicdp.h
* harbour/source/codepage/Makefile
+ harbour/source/codepage/cptrdos.c
+ harbour/source/codepage/cptrwin.c
* harbour/source/lang/Makefile
+ harbour/source/lang/msgtrdos.c
+ harbour/source/lang/msgtrwin.c
+ added Turkish CPs and MSGs created by Bicahi Esgici
+ harbour/source/codepage/uc1254.c
+ harbour/source/codepage/uc857.c
+ added unicode tables for Turkish CPs
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
+ added support for decimal places in binary integer fields ("I")
! fixed currency field decoding ("Y") - it's integer binary value
not IEEE758 double. Warning: on write the value is rounded not
truncated like in VFP.
This commit is contained in:
@@ -8,6 +8,47 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2006-12-19 22:47 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexprop.h
|
||||
* harbour/source/common/expropt1.c
|
||||
+ added hb_compExprParamListLen()
|
||||
|
||||
* harbour/include/hbexpra.c
|
||||
* harbour/include/hbexprb.c
|
||||
* use hb_compExprParamListLen()
|
||||
|
||||
* harbour/include/hbexprc.c
|
||||
* generate error message for syntax like:
|
||||
o:var()++ or o:var()+=10
|
||||
only:
|
||||
o:var++ and o:var+=10
|
||||
is supported, just like for @o:var
|
||||
|
||||
* harbour/include/hbapi.h
|
||||
* harbour/source/common/hbstr.c
|
||||
+ hb_numDecConv() used to convert double value to/from binary integer
|
||||
fields with fixed number of decimal places
|
||||
|
||||
* harbour/common.mak
|
||||
* harbour/include/hbapicdp.h
|
||||
* harbour/source/codepage/Makefile
|
||||
+ harbour/source/codepage/cptrdos.c
|
||||
+ harbour/source/codepage/cptrwin.c
|
||||
* harbour/source/lang/Makefile
|
||||
+ harbour/source/lang/msgtrdos.c
|
||||
+ harbour/source/lang/msgtrwin.c
|
||||
+ added Turkish CPs and MSGs created by Bicahi Esgici
|
||||
+ harbour/source/codepage/uc1254.c
|
||||
+ harbour/source/codepage/uc857.c
|
||||
+ added unicode tables for Turkish CPs
|
||||
|
||||
* harbour/source/rdd/dbf1.c
|
||||
* harbour/source/rdd/workarea.c
|
||||
+ added support for decimal places in binary integer fields ("I")
|
||||
! fixed currency field decoding ("Y") - it's integer binary value
|
||||
not IEEE758 double. Warning: on write the value is rounded not
|
||||
truncated like in VFP.
|
||||
|
||||
2006-12-19 00:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexprc.c
|
||||
* added support _" prefix when macro message is used in assignment context
|
||||
|
||||
@@ -555,6 +555,8 @@ LANG_LIB_OBJS = \
|
||||
$(OBJ_DIR)\msgsr852.obj \
|
||||
$(OBJ_DIR)\msgsriso.obj \
|
||||
$(OBJ_DIR)\msgsrwin.obj \
|
||||
$(OBJ_DIR)\msgtrdos.obj \
|
||||
$(OBJ_DIR)\msgtrwin.obj \
|
||||
$(OBJ_DIR)\msgzhb5.obj \
|
||||
$(OBJ_DIR)\msgzhgb.obj \
|
||||
|
||||
@@ -601,16 +603,20 @@ CODEPAGE_LIB_OBJS = \
|
||||
$(OBJ_DIR)\cpsliso.obj \
|
||||
$(OBJ_DIR)\cpslwin.obj \
|
||||
$(OBJ_DIR)\cpsrwin.obj \
|
||||
$(OBJ_DIR)\cptrdos.obj \
|
||||
$(OBJ_DIR)\cptrwin.obj \
|
||||
$(OBJ_DIR)\cpua866.obj \
|
||||
$(OBJ_DIR)\cpuakoi.obj \
|
||||
$(OBJ_DIR)\cpuawin.obj \
|
||||
$(OBJ_DIR)\uc1250.obj \
|
||||
$(OBJ_DIR)\uc1251.obj \
|
||||
$(OBJ_DIR)\uc1253.obj \
|
||||
$(OBJ_DIR)\uc1254.obj \
|
||||
$(OBJ_DIR)\uc1257.obj \
|
||||
$(OBJ_DIR)\uc737.obj \
|
||||
$(OBJ_DIR)\uc850.obj \
|
||||
$(OBJ_DIR)\uc852.obj \
|
||||
$(OBJ_DIR)\uc857.obj \
|
||||
$(OBJ_DIR)\uc866.obj \
|
||||
$(OBJ_DIR)\uc8859_1.obj \
|
||||
$(OBJ_DIR)\uc8859_2.obj \
|
||||
|
||||
@@ -679,6 +679,8 @@ extern HB_EXPORT char * hb_strRemEscSeq( char * szText, ULONG * ulLen ); /* re
|
||||
|
||||
extern HB_EXPORT double hb_numRound( double dResult, int iDec ); /* round a number to a specific number of digits */
|
||||
extern HB_EXPORT double hb_numInt( double dNum ); /* take the integer part of the number */
|
||||
extern HB_EXPORT double hb_numDecConv( double dNum, int iDec );
|
||||
|
||||
|
||||
/* architecture dependent number conversions */
|
||||
extern HB_EXPORT void hb_put_ieee754( BYTE * ptr, double d );
|
||||
|
||||
@@ -116,10 +116,12 @@ typedef struct _HB_CODEPAGE
|
||||
#define CPID_737 "cp737"
|
||||
#define CPID_850 "cp850"
|
||||
#define CPID_852 "cp852"
|
||||
#define CPID_857 "cp857"
|
||||
#define CPID_866 "cp866"
|
||||
#define CPID_1250 "cp1250"
|
||||
#define CPID_1251 "cp1251"
|
||||
#define CPID_1253 "cp1253"
|
||||
#define CPID_1254 "cp1254"
|
||||
#define CPID_1257 "cp1257"
|
||||
#define CPID_8859_1 "iso8859-1"
|
||||
#define CPID_8859_1B "iso8859-1b"
|
||||
@@ -133,10 +135,12 @@ typedef struct _HB_CODEPAGE
|
||||
#define UNITB_737 &hb_uniTbl_737
|
||||
#define UNITB_850 &hb_uniTbl_850
|
||||
#define UNITB_852 &hb_uniTbl_852
|
||||
#define UNITB_857 &hb_uniTbl_857
|
||||
#define UNITB_866 &hb_uniTbl_866
|
||||
#define UNITB_1250 &hb_uniTbl_1250
|
||||
#define UNITB_1251 &hb_uniTbl_1251
|
||||
#define UNITB_1253 &hb_uniTbl_1253
|
||||
#define UNITB_1254 &hb_uniTbl_1254
|
||||
#define UNITB_1257 &hb_uniTbl_1257
|
||||
#define UNITB_8859_1 &hb_uniTbl_8859_1
|
||||
#define UNITB_8859_1B &hb_uniTbl_8859_1b
|
||||
@@ -152,10 +156,12 @@ extern HB_UNITABLE hb_uniTbl_437;
|
||||
extern HB_UNITABLE hb_uniTbl_737;
|
||||
extern HB_UNITABLE hb_uniTbl_850;
|
||||
extern HB_UNITABLE hb_uniTbl_852;
|
||||
extern HB_UNITABLE hb_uniTbl_857;
|
||||
extern HB_UNITABLE hb_uniTbl_866;
|
||||
extern HB_UNITABLE hb_uniTbl_1250;
|
||||
extern HB_UNITABLE hb_uniTbl_1251;
|
||||
extern HB_UNITABLE hb_uniTbl_1253;
|
||||
extern HB_UNITABLE hb_uniTbl_1254;
|
||||
extern HB_UNITABLE hb_uniTbl_1257;
|
||||
extern HB_UNITABLE hb_uniTbl_8859_1;
|
||||
extern HB_UNITABLE hb_uniTbl_8859_1b;
|
||||
|
||||
@@ -391,18 +391,7 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms, HB_COM
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_compExprNewFunCall(%s)", pName->value.asSymbol));
|
||||
|
||||
if( pParms )
|
||||
{
|
||||
iCount = hb_compExprListLen( pParms );
|
||||
/* Check the special case when no parameters are passed - in this case
|
||||
* pParms is an expression of type HB_ET_NONE and we shouldn't
|
||||
* replace it with NIL value
|
||||
*/
|
||||
if( iCount == 1 && pParms->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
--iCount;
|
||||
}
|
||||
else
|
||||
iCount = 0;
|
||||
iCount = ( int ) hb_compExprParamListLen( pParms );
|
||||
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
if( ! hb_compFunCallCheck( HB_COMP_PARAM, pName->value.asSymbol, iCount ) )
|
||||
|
||||
@@ -1537,17 +1537,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
|
||||
{
|
||||
HB_EXPR_PTR pName = pSelf->value.asFunCall.pFunName;
|
||||
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
|
||||
USHORT usCount = 0;
|
||||
|
||||
if( pParms )
|
||||
{
|
||||
usCount = ( USHORT ) hb_compExprListLen( pSelf->value.asFunCall.pParms );
|
||||
|
||||
if( usCount == 1 && pParms->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
{
|
||||
--usCount;
|
||||
}
|
||||
}
|
||||
USHORT usCount = ( USHORT ) hb_compExprParamListLen( pParms );
|
||||
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
hb_compFunCallCheck( HB_COMP_PARAM, pName->value.asSymbol, usCount );
|
||||
@@ -1601,9 +1591,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
|
||||
/* NOTE: pParms will be NULL in 'DO procname' (if there is
|
||||
* no WITH keyword)
|
||||
*/
|
||||
usCount = ( USHORT ) hb_compExprListLen( pSelf->value.asFunCall.pParms );
|
||||
if( usCount == 1 && pSelf->value.asFunCall.pParms->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
--usCount;
|
||||
usCount = ( USHORT ) hb_compExprParamListLen( pSelf->value.asFunCall.pParms );
|
||||
if( usCount )
|
||||
{
|
||||
if( HB_SUPPORT_XBASE )
|
||||
@@ -1658,9 +1646,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
|
||||
|
||||
if( pSelf->value.asFunCall.pParms )
|
||||
{
|
||||
usCount = ( USHORT ) hb_compExprListLen( pSelf->value.asFunCall.pParms );
|
||||
if( usCount == 1 && pSelf->value.asFunCall.pParms->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
--usCount;
|
||||
usCount = ( USHORT ) hb_compExprParamListLen( pSelf->value.asFunCall.pParms );
|
||||
if( usCount )
|
||||
{
|
||||
if( HB_SUPPORT_XBASE )
|
||||
@@ -2088,16 +2074,9 @@ static HB_EXPR_FUNC( hb_compExprUseSend )
|
||||
if( pSelf->value.asMessage.pParms ) /* Is it a method call ? */
|
||||
{
|
||||
BOOL fMacroList = FALSE;
|
||||
int iParms = hb_compExprListLen( pSelf->value.asMessage.pParms );
|
||||
int iParms = ( int ) hb_compExprParamListLen( pSelf->value.asMessage.pParms );
|
||||
|
||||
hb_compExprPushSendPush( pSelf, HB_COMP_PARAM );
|
||||
|
||||
/* NOTE: if method with no parameters is called then the list
|
||||
* of parameters contain only one expression of type HB_ET_NONE
|
||||
* There is no need to push this parameter
|
||||
*/
|
||||
if( iParms == 1 && pSelf->value.asMessage.pParms->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
--iParms;
|
||||
if( iParms )
|
||||
{
|
||||
if( HB_SUPPORT_XBASE )
|
||||
|
||||
@@ -272,8 +272,12 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
* be changed
|
||||
*/
|
||||
|
||||
if( pSelf->value.asOperator.pLeft->value.asMessage.pParms )
|
||||
{
|
||||
hb_compErrorLValue( HB_COMP_PARAM, pSelf->value.asOperator.pLeft );
|
||||
}
|
||||
#ifdef HB_USE_OBJMSG_REF
|
||||
if( HB_SUPPORT_HARBOUR && bOpEq != bNewOp )
|
||||
else if( HB_SUPPORT_HARBOUR && bOpEq != bNewOp )
|
||||
{
|
||||
hb_compExprPushSendPop( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_PUSHOVARREF );
|
||||
@@ -281,8 +285,8 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_PCODE );
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bNewOp );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else
|
||||
{
|
||||
hb_compExprPushSendPopPush( pSelf->value.asOperator.pLeft,
|
||||
pSelf->value.asOperator.pRight,
|
||||
@@ -420,8 +424,12 @@ void hb_compExprUseOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
*/
|
||||
if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_SEND )
|
||||
{
|
||||
if( pSelf->value.asOperator.pLeft->value.asMessage.pParms )
|
||||
{
|
||||
hb_compErrorLValue( HB_COMP_PARAM, pSelf->value.asOperator.pLeft );
|
||||
}
|
||||
#ifdef HB_USE_OBJMSG_REF
|
||||
if( HB_SUPPORT_HARBOUR && bOpEq != bNewOp )
|
||||
else if( HB_SUPPORT_HARBOUR && bOpEq != bNewOp )
|
||||
{
|
||||
hb_compExprPushSendPop( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_PUSHOVARREF );
|
||||
@@ -429,8 +437,8 @@ void hb_compExprUseOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_PCODE );
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bNewOp );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else
|
||||
{
|
||||
hb_compExprPushSendPopPush( pSelf->value.asOperator.pLeft,
|
||||
pSelf->value.asOperator.pRight,
|
||||
@@ -542,8 +550,12 @@ void hb_compExprPushPreOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
*/
|
||||
if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_SEND )
|
||||
{
|
||||
if( pSelf->value.asOperator.pLeft->value.asMessage.pParms )
|
||||
{
|
||||
hb_compErrorLValue( HB_COMP_PARAM, pSelf->value.asOperator.pLeft );
|
||||
}
|
||||
#ifdef HB_USE_OBJMSG_REF
|
||||
if( HB_SUPPORT_HARBOUR )
|
||||
else if( HB_SUPPORT_HARBOUR )
|
||||
{
|
||||
hb_compExprPushSendPop( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_PUSHOVARREF );
|
||||
@@ -557,8 +569,8 @@ void hb_compExprPushPreOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
bOper = ( bOper == HB_P_INC ) ? HB_P_PLUSEQ : HB_P_MINUSEQ;
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bOper );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else
|
||||
{
|
||||
hb_compExprPushSendPopPush( pSelf->value.asOperator.pLeft, NULL,
|
||||
FALSE, bOper, HB_COMP_PARAM );
|
||||
@@ -616,8 +628,12 @@ void hb_compExprPushPostOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
*/
|
||||
if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_SEND )
|
||||
{
|
||||
if( pSelf->value.asOperator.pLeft->value.asMessage.pParms )
|
||||
{
|
||||
hb_compErrorLValue( HB_COMP_PARAM, pSelf->value.asOperator.pLeft );
|
||||
}
|
||||
#ifdef HB_USE_OBJMSG_REF
|
||||
if( HB_SUPPORT_HARBOUR )
|
||||
else if( HB_SUPPORT_HARBOUR )
|
||||
{
|
||||
/* push reference to current value */
|
||||
hb_compExprPushSendPop( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
@@ -631,8 +647,8 @@ void hb_compExprPushPostOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
bOper = ( bOper == HB_P_INC ) ? HB_P_PLUSEQPOP : HB_P_MINUSEQPOP;
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bOper );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else
|
||||
{
|
||||
hb_compExprPushSendPopPush( pSelf->value.asOperator.pLeft, NULL,
|
||||
TRUE, bOper, HB_COMP_PARAM );
|
||||
@@ -699,8 +715,12 @@ void hb_compExprUsePreOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
*/
|
||||
if( pSelf->value.asOperator.pLeft->ExprType == HB_ET_SEND )
|
||||
{
|
||||
if( pSelf->value.asOperator.pLeft->value.asMessage.pParms )
|
||||
{
|
||||
hb_compErrorLValue( HB_COMP_PARAM, pSelf->value.asOperator.pLeft );
|
||||
}
|
||||
#ifdef HB_USE_OBJMSG_REF
|
||||
if( HB_SUPPORT_HARBOUR )
|
||||
else if( HB_SUPPORT_HARBOUR )
|
||||
{
|
||||
/* push reference to current value */
|
||||
hb_compExprPushSendPop( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
@@ -710,8 +730,8 @@ void hb_compExprUsePreOp( HB_EXPR_PTR pSelf, BYTE bOper, HB_COMP_DECL )
|
||||
bOper = ( bOper == HB_P_INC ) ? HB_P_PLUSEQPOP : HB_P_MINUSEQPOP;
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bOper );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else
|
||||
{
|
||||
hb_compExprPushSendPopPush( pSelf->value.asOperator.pLeft, NULL,
|
||||
FALSE, bOper, HB_COMP_PARAM );
|
||||
|
||||
@@ -151,6 +151,7 @@ extern HB_EXPR_PTR hb_compExprEqual( HB_EXPR_PTR, HB_EXPR_PTR );
|
||||
extern HB_EXPR_PTR hb_compExprAssignStatic( HB_EXPR_PTR, HB_EXPR_PTR, HB_COMP_DECL );
|
||||
extern HB_EXPR_PTR hb_compExprClone( HB_EXPR_PTR pSrc );
|
||||
extern ULONG hb_compExprListLen( HB_EXPR_PTR );
|
||||
extern ULONG hb_compExprParamListLen( HB_EXPR_PTR );
|
||||
extern ULONG hb_compExprMacroListLen( HB_EXPR_PTR );
|
||||
extern void hb_compExprClear( HB_EXPR_PTR, HB_COMP_DECL );
|
||||
extern const char * hb_compExprDescription( HB_EXPR_PTR );
|
||||
|
||||
@@ -46,16 +46,20 @@ C_SOURCES=\
|
||||
cpsliso.c \
|
||||
cpslwin.c \
|
||||
cpsrwin.c \
|
||||
cptrdos.c \
|
||||
cptrwin.c \
|
||||
cpua866.c \
|
||||
cpuakoi.c \
|
||||
cpuawin.c \
|
||||
uc1250.c \
|
||||
uc1251.c \
|
||||
uc1253.c \
|
||||
uc1254.c \
|
||||
uc1257.c \
|
||||
uc737.c \
|
||||
uc850.c \
|
||||
uc852.c \
|
||||
uc857.c \
|
||||
uc866.c \
|
||||
uc8859_1.c \
|
||||
uc88591b.c \
|
||||
|
||||
105
harbour/source/codepage/cptrdos.c
Normal file
105
harbour/source/codepage/cptrdos.c
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* National Collation Support Module ( Turkish -- DOS )
|
||||
*
|
||||
* Copyright 2006 Bicahi Esgici <esgici@yahoo.com>
|
||||
* 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: Turkish */
|
||||
/* ISO language code TR : ( please look it up in /doc/lang_id.txt ) */
|
||||
/* Codepage: 857 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARACTERS 34 /* The number of single characters in the
|
||||
alphabet, two-as-one aren't considered
|
||||
here, accented - are considered. */
|
||||
#define IS_LATIN 1 /* Should be 1, if the national alphabet
|
||||
is based on Latin */
|
||||
#define ACCENTED_EQUAL 0 /* Should be 1, if accented character
|
||||
has the same weight as appropriate
|
||||
unaccented. */
|
||||
#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters
|
||||
sort after their unaccented counterparts
|
||||
only if the unaccented versions of all
|
||||
characters being compared are the same
|
||||
( interleaving ) */
|
||||
|
||||
/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the
|
||||
accented characters with the symbol '~' before each of them, for example:
|
||||
a~€
|
||||
If there is two-character sequence, which is considered as one, it should
|
||||
be marked with '.' before and after it, for example:
|
||||
... h.ch.i ...
|
||||
|
||||
The Upper case string and the Lower case string should be absolutely the
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "TR857",
|
||||
CPID_857,UNITB_857,NUMBER_OF_CHARACTERS,
|
||||
"A¶BC€DEÒFG¦HI˜×JKLMNOâ™PRSžTUêšVYZ",
|
||||
"aƒbc‡deˆfg§h<EFBFBD>iŒjklmno“”prsŸtu–<EFBFBD>vyz",
|
||||
IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL };
|
||||
|
||||
HB_CODEPAGE_INIT( TR857 )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_codepage_Init_TR857
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_codepage_Init_TR857 = hb_codepage_Init_TR857;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
105
harbour/source/codepage/cptrwin.c
Normal file
105
harbour/source/codepage/cptrwin.c
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* National Collation Support Module ( Turkish -- Win )
|
||||
*
|
||||
* Copyright 2006 Bicahi Esgici <esgici@yahoo.com>
|
||||
* 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: Turkish */
|
||||
/* ISO language code TR : (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: 1254 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARACTERS 34 /* The number of single characters in the
|
||||
alphabet, two-as-one aren't considered
|
||||
here, accented - are considered. */
|
||||
#define IS_LATIN 1 /* Should be 1, if the national alphabet
|
||||
is based on Latin */
|
||||
#define ACCENTED_EQUAL 0 /* Should be 1, if accented character
|
||||
has the same weight as appropriate
|
||||
unaccented. */
|
||||
#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters
|
||||
sort after their unaccented counterparts
|
||||
only if the unaccented versions of all
|
||||
characters being compared are the same
|
||||
( interleaving ) */
|
||||
|
||||
/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the
|
||||
accented characters with the symbol '~' before each of them, for example:
|
||||
a~€
|
||||
If there is two-character sequence, which is considered as one, it should
|
||||
be marked with '.' before and after it, for example:
|
||||
... h.ch.i ...
|
||||
|
||||
The Upper case string and the Lower case string should be absolutely the
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "TRWIN",
|
||||
CPID_1254,UNITB_1254,NUMBER_OF_CHARACTERS,
|
||||
"AÂBCÇDEÊFGÐHIÝÎJKLMNOÔÖPRSÞTUÛÜVYZ",
|
||||
"aâbcçdeêfgðhýiîjklmnoôöprsþtuûüvyz",
|
||||
IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL };
|
||||
|
||||
HB_CODEPAGE_INIT( TRWIN )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_codepage_Init_TRWIN
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_codepage_Init_TRWIN = hb_codepage_Init_TRWIN;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
93
harbour/source/codepage/uc1254.c
Normal file
93
harbour/source/codepage/uc1254.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* www - http://www.xharbour.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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARS 256
|
||||
|
||||
static USHORT uniCodes[NUMBER_OF_CHARS] = {
|
||||
0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
|
||||
0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C,
|
||||
0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8,
|
||||
0x2191, 0x2193, 0x2192, 0x2190, 0x2319, 0x2194, 0x25B2, 0x25BC,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x009E, 0x0178,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1254 = { CPID_1254, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
93
harbour/source/codepage/uc857.c
Normal file
93
harbour/source/codepage/uc857.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* www - http://www.xharbour.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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARS 256
|
||||
|
||||
static USHORT uniCodes[NUMBER_OF_CHARS] = {
|
||||
0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
|
||||
0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C,
|
||||
0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8,
|
||||
0x2191, 0x2193, 0x2192, 0x2190, 0x2319, 0x2194, 0x25B2, 0x25BC,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
|
||||
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
|
||||
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
|
||||
0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F,
|
||||
0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F,
|
||||
0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
|
||||
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
|
||||
0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
|
||||
0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
|
||||
0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
|
||||
0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, 0xFFFD, 0x00CD, 0x00CE,
|
||||
0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
|
||||
0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0xFFFD,
|
||||
0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
|
||||
0x00AD, 0x00B1, 0xFFFD, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
|
||||
0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_857 = { CPID_857, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
@@ -909,7 +909,32 @@ ULONG hb_compExprListLen( HB_EXPR_PTR pExpr )
|
||||
return ulLen;
|
||||
}
|
||||
|
||||
/* Return a number of macro gropu elements on the linked list
|
||||
/* Return a number of parameters passed to function or method
|
||||
*/
|
||||
ULONG hb_compExprParamListLen( HB_EXPR_PTR pExpr )
|
||||
{
|
||||
ULONG ulLen = 0;
|
||||
|
||||
if( pExpr )
|
||||
{
|
||||
HB_EXPR_PTR pParam = pExpr->value.asList.pExprList;
|
||||
while( pParam )
|
||||
{
|
||||
pParam = pParam->pNext;
|
||||
++ulLen;
|
||||
}
|
||||
/* NOTE: if method or function with no parameters is called then the
|
||||
* list of parameters contain only one expression of type HB_ET_NONE
|
||||
* There is no need to calculate this parameter
|
||||
*/
|
||||
if( ulLen == 1 && pExpr->value.asList.pExprList->ExprType == HB_ET_NONE )
|
||||
--ulLen;
|
||||
}
|
||||
|
||||
return ulLen;
|
||||
}
|
||||
|
||||
/* Return a number of macro group elements on the linked list
|
||||
*/
|
||||
ULONG hb_compExprMacroListLen( HB_EXPR_PTR pExpr )
|
||||
{
|
||||
|
||||
@@ -457,6 +457,18 @@ HB_EXPORT double hb_numInt( double dNum )
|
||||
return dInt;
|
||||
}
|
||||
|
||||
HB_EXPORT double hb_numDecConv( double dNum, int iDec )
|
||||
{
|
||||
if( iDec > 0 )
|
||||
return hb_numRound( dNum / hb_numPow10( iDec ), iDec );
|
||||
|
||||
else if( iDec < 0 )
|
||||
return hb_numRound( dNum * hb_numPow10( -iDec ), 0 );
|
||||
|
||||
else
|
||||
return hb_numRound( dNum, 0 );
|
||||
}
|
||||
|
||||
static BOOL hb_str2number( BOOL fPCode, const char* szNum, ULONG ulLen, HB_LONG * lVal, double * dVal, int * piDec, int * piWidth )
|
||||
{
|
||||
BOOL fDbl = FALSE, fDec = FALSE, fNeg, fHex = FALSE;
|
||||
|
||||
@@ -50,6 +50,8 @@ C_SOURCES=\
|
||||
msgslwin.c \
|
||||
msgsr852.c \
|
||||
msgsriso.c \
|
||||
msgtrdos.c \
|
||||
msgtrwin.c \
|
||||
msgsrwin.c \
|
||||
msgzhb5.c \
|
||||
msgzhgb.c \
|
||||
|
||||
220
harbour/source/lang/msgtrdos.c
Normal file
220
harbour/source/lang/msgtrdos.c
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Language Support Module (Template)
|
||||
*
|
||||
* Copyright 2006 { Tranlation by : Bicahi Esgici <esgici@yahoo.com> }
|
||||
* 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: Turkish */
|
||||
/* ISO language code : TR */
|
||||
/* Codepage: 857 ( OEM ) */
|
||||
|
||||
#include "hbapilng.h"
|
||||
|
||||
static HB_LANG s_lang =
|
||||
{
|
||||
{
|
||||
/* Identification */
|
||||
|
||||
"TR", /* ID */
|
||||
"Turkish", /* Name (in English) */
|
||||
"T<EFBFBD>rk‡e", /* Name (in native language) */
|
||||
"TR", /* RFC ID */
|
||||
"857", /* Codepage */
|
||||
"$Revision$ $Date$", /* Version */
|
||||
|
||||
/* Month names */
|
||||
|
||||
"Ocak",
|
||||
"žubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"May<EFBFBD>s",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"A§ustos",
|
||||
"Eyl<EFBFBD>l",
|
||||
"Ekim",
|
||||
"Kas<EFBFBD>m",
|
||||
"Aral<EFBFBD>k",
|
||||
|
||||
/* Day names */
|
||||
|
||||
"Pazar",
|
||||
"Pazartesi",
|
||||
"Sal<EFBFBD>",
|
||||
"€arŸamba",
|
||||
"PerŸembe",
|
||||
"Cuma",
|
||||
"Cumartesi",
|
||||
|
||||
/* CA-Cl*pper compatible natmsg items */
|
||||
|
||||
"Database Dosyas<61> # Kay<61>t Son G<>ncelleme Boyut",
|
||||
"Daha ”rnek ister misiniz?",
|
||||
"Sayfa No.",
|
||||
"** Alttoplam **",
|
||||
"* Altalttoplam *",
|
||||
"*** Toplam ***",
|
||||
"Ins",
|
||||
" ",
|
||||
"Ge‡ersiz Tarih",
|
||||
"S<EFBFBD>n<EFBFBD>r: ",
|
||||
" - ",
|
||||
"E/H",
|
||||
"GE€ERS˜Z ˜FADE",
|
||||
|
||||
/* Error description names */
|
||||
|
||||
"Bilinmeyen hata",
|
||||
"Arg<EFBFBD>man hatas<61>",
|
||||
"S<EFBFBD>n<EFBFBD>r hatas<61>",
|
||||
"Katar taŸma",
|
||||
"Say<EFBFBD>sal taŸma",
|
||||
"S<EFBFBD>f<EFBFBD>r B”l<E2809D>c<EFBFBD>",
|
||||
"Say<EFBFBD>sal hata",
|
||||
"˜mlƒ hatas<61>",
|
||||
"˜Ÿlem ‡ok karmaŸ<61>k",
|
||||
"",
|
||||
"",
|
||||
"Haf<EFBFBD>za yetersiz",
|
||||
"Tan<EFBFBD>mlanmam<EFBFBD>Ÿ fonksiyon",
|
||||
"Eksport metodu yok",
|
||||
"De§iŸken yok",
|
||||
"Alyas yok",
|
||||
"Eksport de§iŸkeni yok",
|
||||
"Alyasta ge‡ersiz karakter",
|
||||
"Alyas zaten kullan<61>mda",
|
||||
"",
|
||||
"OluŸturma hatas<61>",
|
||||
"A‡ma hatas<61>",
|
||||
"Kapatma hatas<61>",
|
||||
"Okuma hatas<61>",
|
||||
"Yazma hatas<61>",
|
||||
"Print hatas<61>",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Desteklenmeyen iŸlem",
|
||||
"S<EFBFBD>n<EFBFBD>r aŸ<61>ld<6C>",
|
||||
"Bozukluk var",
|
||||
"Data tip hatas<61>",
|
||||
"Data boyut hatas<61>",
|
||||
"€al<EFBFBD>Ÿma alan<61> kullan<61>mda de§il",
|
||||
"€al<EFBFBD>Ÿma alan<61> indeksli de§il",
|
||||
"Exclusive gerekiyor",
|
||||
"Kilit gerekiyor",
|
||||
"Yazma izni yok",
|
||||
"Append kilidi kurulamad<61>",
|
||||
"Kilit kurulamad<61>",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"array eriŸim",
|
||||
"array atama",
|
||||
"array boyut",
|
||||
"array de§il",
|
||||
"Ÿart",
|
||||
|
||||
/* Internal error names */
|
||||
|
||||
"Kurtar<EFBFBD>lamaz hata%lu: ",
|
||||
"Hata kurtarma baŸar<61>s<EFBFBD>z",
|
||||
"Hata i‡in ERRORBLOCK() yok",
|
||||
"€ok fazla i‡i‡e hata tutucu ‡a§r<C2A7>s<EFBFBD>",
|
||||
"RDD ge‡ersiz veya y<>klemenedi",
|
||||
"%s i‡in ge‡ersiz metot tipi",
|
||||
"hb_xgrab haf<61>za atayamad<61>",
|
||||
"hb_xrealloc NULL pointer taraf<61>ndan ‡a§r<C2A7>ld<6C>",
|
||||
"hb_xrealloc ge‡ersiz bir pointer taraf<61>ndan ‡a§r<C2A7>ld<6C>",
|
||||
"hb_xrealloc tekrar haf<61>za atayamad<61>",
|
||||
"hb_xfree ge‡ersiz bir pointer taraf<61>ndan ‡a§r<C2A7>ld<6C>",
|
||||
"hb_xfree NULL pointer taraf<61>ndan ‡a§r<C2A7>ld<6C>",
|
||||
"BaŸlama prosed<65>r<EFBFBD> bulunamd<6D> : \'%s\'",
|
||||
"BaŸlama prosed<65>r<EFBFBD> yok",
|
||||
"Desteklenmeyen VP iŸlem kodu",
|
||||
"%s i‡in sembol maddesi lƒz<C692>m",
|
||||
"%s i‡in ge‡ersiz sembol tipi ",
|
||||
"%s i‡in kodblok laz<61>m",
|
||||
"%s i‡in stack pop edilirken yanl<6E>Ÿ madde tipi ",
|
||||
"Stack taŸmas<61>",
|
||||
"%s i‡inde bir madde kendi <20>st<73>ne kopyalanmak istendi",
|
||||
"%s haf<61>za de§iŸkeni olarak ge‡ersiz sembol maddesi aktar<61>ld<6C>",
|
||||
"Haf<EFBFBD>za buffer taŸmas<61>",
|
||||
"hb_xgrab s<>f<EFBFBD>r bayt atamas<61> istendi",
|
||||
"hb_xrealloc s<>f<EFBFBD>r bayta boyutland<6E>rmak istendi",
|
||||
"hb_xalloc s<>f<EFBFBD>r bayt atamas<61> istendi",
|
||||
|
||||
/* Texts */
|
||||
|
||||
"DD.MM.YYYY",
|
||||
"E",
|
||||
"H"
|
||||
}
|
||||
};
|
||||
|
||||
HB_LANG_ANNOUNCE( TR857 );
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TR857 )
|
||||
hb_langRegister( &s_lang );
|
||||
HB_CALL_ON_STARTUP_END( hb_lang_Init_TR857 )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_lang_Init_TR857
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_lang_Init_TR857 = hb_lang_Init_TR857;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
220
harbour/source/lang/msgtrwin.c
Normal file
220
harbour/source/lang/msgtrwin.c
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Language Support Module (Template)
|
||||
*
|
||||
* Copyright 2006 { Tranlation by : Bicahi Esgici <esgici@yahoo.com> }
|
||||
* 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: Turkish */
|
||||
/* ISO language code : TR */
|
||||
/* Codepage: 1254 */
|
||||
|
||||
#include "hbapilng.h"
|
||||
|
||||
static HB_LANG s_lang =
|
||||
{
|
||||
{
|
||||
/* Identification */
|
||||
|
||||
"TR", /* ID */
|
||||
"Turkish", /* Name (in English) */
|
||||
"Türkçe", /* Name (in native language) */
|
||||
"TR", /* RFC ID */
|
||||
"1254", /* Codepage */
|
||||
"$Revision$ $Date$", /* Version */
|
||||
|
||||
/* Month names */
|
||||
|
||||
"Ocak",
|
||||
"Þubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"Mayýs",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"Aðustos",
|
||||
"Eylül",
|
||||
"Ekim",
|
||||
"Kasým",
|
||||
"Aralýk",
|
||||
|
||||
/* Day names */
|
||||
|
||||
"Pazar",
|
||||
"Pazartesi",
|
||||
"Salý",
|
||||
"Çarþamba",
|
||||
"Perþembe",
|
||||
"Cuma",
|
||||
"Cumartesi",
|
||||
|
||||
/* CA-Cl*pper compatible natmsg items */
|
||||
|
||||
"Database Dosyasý # Kayýt Son Güncelleme Boyut",
|
||||
"Daha örnek ister misiniz?",
|
||||
"Sayfa No.",
|
||||
"** Alttoplam **",
|
||||
"* Altalttoplam *",
|
||||
"*** Toplam ***",
|
||||
"Ins",
|
||||
" ",
|
||||
"Geçersiz Tarih",
|
||||
"Sýnýr: ",
|
||||
" - ",
|
||||
"E/H",
|
||||
"GEÇERSÝZ ÝFADE",
|
||||
|
||||
/* Error description names */
|
||||
|
||||
"Bilinmeyen hata",
|
||||
"Argüman hatasý",
|
||||
"Sýnýr hatasý",
|
||||
"Katar taþma",
|
||||
"Sayýsal taþma",
|
||||
"Sýfýr Bölücü",
|
||||
"Sayýsal hata",
|
||||
"Ýmlâ hatasý",
|
||||
"Ýþlem çok karmaþýk",
|
||||
"",
|
||||
"",
|
||||
"Hafýza yetersiz",
|
||||
"Tanýmlanmamýþ fonksiyon",
|
||||
"Eksport metodu yok",
|
||||
"Deðiþken yok",
|
||||
"Alyas yok",
|
||||
"Eksport deðiþkeni yok",
|
||||
"Alyasta geçersiz karakter",
|
||||
"Alyas zaten kullanýmda",
|
||||
"",
|
||||
"Oluþturma hatasý",
|
||||
"Açma hatasý",
|
||||
"Kapatma hatasý",
|
||||
"Okuma hatasý",
|
||||
"Yazma hatasý",
|
||||
"Print hatasý",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Desteklenmeyen iþlem",
|
||||
"Sýnýr aþýldý",
|
||||
"Bozukluk var",
|
||||
"Data tip hatasý",
|
||||
"Data boyut hatasý",
|
||||
"Çalýþma alaný kullanýmda deðil",
|
||||
"Çalýþma alaný indeksli deðil",
|
||||
"Exclusive gerekiyor",
|
||||
"Kilit gerekiyor",
|
||||
"Yazma izni yok",
|
||||
"Append kilidi kurulamadý",
|
||||
"Kilit kurulamadý",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"array eriþim",
|
||||
"array atama",
|
||||
"array boyut",
|
||||
"array deðil",
|
||||
"þart",
|
||||
|
||||
/* Internal error names */
|
||||
|
||||
"Kurtarýlamaz hata%lu: ",
|
||||
"Hata kurtarma baþarýsýz",
|
||||
"Hata için ERRORBLOCK() yok",
|
||||
"Çok fazla içiçe hata tutucu çaðrýsý",
|
||||
"RDD geçersiz veya yüklemenedi",
|
||||
"%s için geçersiz metot tipi",
|
||||
"hb_xgrab hafýza atayamadý",
|
||||
"hb_xrealloc NULL pointer tarafýndan çaðrýldý",
|
||||
"hb_xrealloc geçersiz bir pointer tarafýndan çaðrýldý",
|
||||
"hb_xrealloc tekrar hafýza atayamadý",
|
||||
"hb_xfree geçersiz bir pointer tarafýndan çaðrýldý",
|
||||
"hb_xfree NULL pointer tarafýndan çaðrýldý",
|
||||
"Baþlama prosedürü bulunamdý : \'%s\'",
|
||||
"Baþlama prosedürü yok",
|
||||
"Desteklenmeyen VP iþlem kodu",
|
||||
"%s için sembol maddesi lâzým",
|
||||
"%s için geçersiz sembol tipi ",
|
||||
"%s için kodblok lazým",
|
||||
"%s için stack pop edilirken yanlýþ madde tipi ",
|
||||
"Stack taþmasý",
|
||||
"%s içinde bir madde kendi üstüne kopyalanmak istendi",
|
||||
"%s hafýza deðiþkeni olarak geçersiz sembol maddesi aktarýldý",
|
||||
"Hafýza buffer taþmasý",
|
||||
"hb_xgrab sýfýr bayt atamasý istendi",
|
||||
"hb_xrealloc sýfýr bayta boyutlandýrmak istendi",
|
||||
"hb_xalloc sýfýr bayt atamasý istendi",
|
||||
|
||||
/* Texts */
|
||||
|
||||
"DD.MM.YYYY",
|
||||
"E",
|
||||
"H"
|
||||
}
|
||||
};
|
||||
|
||||
HB_LANG_ANNOUNCE( TRWIN );
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TRWIN )
|
||||
hb_langRegister( &s_lang );
|
||||
HB_CALL_ON_STARTUP_END( hb_lang_Init_TRWIN )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_lang_Init_TRWIN
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_lang_Init_TRWIN = hb_lang_Init_TRWIN;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
@@ -1472,30 +1472,68 @@ static ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
break;
|
||||
|
||||
case HB_IT_INTEGER:
|
||||
switch ( pField->uiLen )
|
||||
if( pField->uiDec )
|
||||
{
|
||||
case 1:
|
||||
hb_itemPutNILen( pItem, ( signed char ) pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ], 4 );
|
||||
break;
|
||||
case 2:
|
||||
hb_itemPutNILen( pItem, ( int ) HB_GET_LE_INT16( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 6 );
|
||||
break;
|
||||
case 3:
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT24( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
|
||||
break;
|
||||
case 4:
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
|
||||
break;
|
||||
case 8:
|
||||
double dValue;
|
||||
int iLen;
|
||||
switch ( pField->uiLen )
|
||||
{
|
||||
case 1:
|
||||
dValue = ( SCHAR ) pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ];
|
||||
iLen = 4;
|
||||
break;
|
||||
case 2:
|
||||
dValue = HB_GET_LE_INT16( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] );
|
||||
iLen = 6;
|
||||
break;
|
||||
case 3:
|
||||
dValue = HB_GET_LE_INT24( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] );
|
||||
iLen = 10;
|
||||
break;
|
||||
case 4:
|
||||
dValue = HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] );
|
||||
iLen = 10;
|
||||
break;
|
||||
case 8:
|
||||
dValue = HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] );
|
||||
iLen = 20;
|
||||
break;
|
||||
default:
|
||||
dValue = 0;
|
||||
iLen = 0;
|
||||
fError = TRUE;
|
||||
break;
|
||||
}
|
||||
hb_itemPutNDLen( pItem, hb_numDecConv( dValue, ( int ) pField->uiDec ),
|
||||
iLen, ( int ) pField->uiDec );
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ( pField->uiLen )
|
||||
{
|
||||
case 1:
|
||||
hb_itemPutNILen( pItem, ( SCHAR ) pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ], 4 );
|
||||
break;
|
||||
case 2:
|
||||
hb_itemPutNILen( pItem, ( int ) HB_GET_LE_INT16( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 6 );
|
||||
break;
|
||||
case 3:
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT24( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
|
||||
break;
|
||||
case 4:
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
|
||||
break;
|
||||
case 8:
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20 );
|
||||
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20 );
|
||||
#else
|
||||
hb_itemPutNLen( pItem, ( double ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20, 0 );
|
||||
hb_itemPutNLen( pItem, ( double ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20, 0 );
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
fError = TRUE;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
fError = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1835,31 +1873,56 @@ static ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
else if( pField->uiType == HB_IT_INTEGER )
|
||||
{
|
||||
HB_LONG lVal;
|
||||
double dVal;
|
||||
int iSize;
|
||||
|
||||
if( HB_IS_DOUBLE( pItem ) &&
|
||||
! HB_DBL_LIM_INT64( hb_itemGetND( pItem ) ) )
|
||||
if( pField->uiDec )
|
||||
{
|
||||
lVal = 0;
|
||||
iSize = 99;
|
||||
dVal = hb_numDecConv( hb_itemGetND( pItem ), - ( int ) pField->uiDec );
|
||||
lVal = ( HB_LONG ) dVal;
|
||||
if( ! HB_DBL_LIM_INT64( dVal ) )
|
||||
iSize = 99;
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
iSize = HB_LIM_INT8( lVal ) ? 1 :
|
||||
( HB_LIM_INT16( lVal ) ? 2 :
|
||||
( HB_LIM_INT24( lVal ) ? 3 :
|
||||
( HB_LIM_INT32( lVal ) ? 4 : 8 ) ) );
|
||||
#else
|
||||
iSize = HB_DBL_LIM_INT8( dVal ) ? 1 :
|
||||
( HB_DBL_LIM_INT16( dVal ) ? 2 :
|
||||
( HB_DBL_LIM_INT24( dVal ) ? 3 :
|
||||
( HB_DBL_LIM_INT32( dVal ) ? 4 : 8 ) ) );
|
||||
#endif
|
||||
}
|
||||
else if( HB_IS_DOUBLE( pItem ) )
|
||||
{
|
||||
dVal = hb_itemGetND( pItem );
|
||||
lVal = ( HB_LONG ) dVal;
|
||||
if( ! HB_DBL_LIM_INT64( dVal ) )
|
||||
iSize = 99;
|
||||
else
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
iSize = HB_LIM_INT8( lVal ) ? 1 :
|
||||
( HB_LIM_INT16( lVal ) ? 2 :
|
||||
( HB_LIM_INT24( lVal ) ? 3 :
|
||||
( HB_LIM_INT32( lVal ) ? 4 : 8 ) ) );
|
||||
#else
|
||||
iSize = HB_DBL_LIM_INT8( dVal ) ? 1 :
|
||||
( HB_DBL_LIM_INT16( dVal ) ? 2 :
|
||||
( HB_DBL_LIM_INT24( dVal ) ? 3 :
|
||||
( HB_DBL_LIM_INT32( dVal ) ? 4 : 8 ) ) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
lVal = hb_itemGetNInt( pItem );
|
||||
lVal = ( HB_LONG ) hb_itemGetNInt( pItem );
|
||||
dVal = 0.0;
|
||||
iSize = HB_LIM_INT8( lVal ) ? 1 :
|
||||
( HB_LIM_INT16( lVal ) ? 2 :
|
||||
( HB_LIM_INT24( lVal ) ? 3 :
|
||||
( HB_LIM_INT32( lVal ) ? 4 : 8 ) ) );
|
||||
#else
|
||||
double d = hb_itemGetND( pItem );
|
||||
iSize = HB_DBL_LIM_INT8( d ) ? 1 :
|
||||
( HB_DBL_LIM_INT16( d ) ? 2 :
|
||||
( HB_DBL_LIM_INT24( d ) ? 3 :
|
||||
( HB_DBL_LIM_INT32( d ) ? 4 : 8 ) ) );
|
||||
lVal = hb_itemGetNL( pItem );
|
||||
#endif
|
||||
}
|
||||
|
||||
if( iSize > pField->uiLen )
|
||||
{
|
||||
uiError = EDBF_DATAWIDTH;
|
||||
@@ -1884,7 +1947,7 @@ static ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
HB_PUT_LE_UINT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ], ( UINT64 ) lVal );
|
||||
#else
|
||||
HB_PUT_LE_UINT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ], ( double ) lVal );
|
||||
HB_PUT_LE_UINT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ], dVal );
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
@@ -2371,7 +2434,7 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
pField->uiLen = 4;
|
||||
}
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = 0;
|
||||
pThisField->bDec = ( BYTE ) pField->uiDec;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
break;
|
||||
|
||||
@@ -3134,10 +3197,12 @@ static ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
case 'Y':
|
||||
pFieldInfo.uiType = HB_IT_INTEGER;
|
||||
if( ( pFieldInfo.uiLen > 4 && pFieldInfo.uiLen != 8 ) ||
|
||||
pFieldInfo.uiLen == 0 )
|
||||
pFieldInfo.uiLen = 4;
|
||||
pFieldInfo.uiDec = pField->bDec;
|
||||
break;
|
||||
|
||||
case '2':
|
||||
@@ -3174,11 +3239,6 @@ static ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
pFieldInfo.uiType = HB_IT_INTEGER;
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
pFieldInfo.uiType = HB_IT_DOUBLE;
|
||||
pFieldInfo.uiDec = pField->bDec;
|
||||
break;
|
||||
|
||||
default:
|
||||
errCode = FAILURE;
|
||||
break;
|
||||
|
||||
@@ -332,8 +332,10 @@ ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct )
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
case 'Y':
|
||||
pFieldInfo.uiType = HB_IT_INTEGER;
|
||||
pFieldInfo.uiLen = ( ( uiLen > 0 && uiLen <= 4 ) || uiLen != 8 ) ? uiLen : 4;
|
||||
pFieldInfo.uiLen = ( ( uiLen > 0 && uiLen <= 4 ) || uiLen == 8 ) ? uiLen : 4;
|
||||
pFieldInfo.uiDec = uiDec;
|
||||
break;
|
||||
|
||||
case '2':
|
||||
|
||||
Reference in New Issue
Block a user