From ae90545eb18e65f8e550df6a50b8a5e290eaa844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 21 Jan 2016 20:42:30 +0100 Subject: [PATCH] 2016-01-21 20:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/gtalleg/gtallegd.c * contrib/hbamf/amfdec.c * contrib/hbamf/amfenc.c * contrib/hbbz2/core.c * contrib/hbbz2io/bz2io.c * contrib/hbct/atrepl.c * contrib/hbct/charrepl.c * contrib/hbct/envparam.c * contrib/hbct/pack.c * contrib/hbct/token2.c * contrib/hbfimage/fi_wrp.c * contrib/hbgd/gdwrp.c * contrib/hbgs/core.c * contrib/hbgzio/gzio.c * contrib/hbhpdf/core.c * contrib/hbhpdf/image.c * contrib/hbmlzo/core.c * contrib/hbmxml/core.c * contrib/hbodbc/odbc.c * contrib/hbsqlit3/core.c * contrib/hbssl/bio.c * contrib/hbssl/ssl.c * contrib/rddads/ads1.c * contrib/rddads/adsfunc.c * contrib/rddads/adsmgmnt.c * contrib/rddads/adsx.c * contrib/rddads/rddads.h * contrib/sddodbc/core.c * contrib/xhb/cstructc.c * include/hbapi.h * include/hbdefs.h * src/common/expropt1.c * src/common/expropt2.c * src/common/hbmem.c * src/compiler/complex.c * src/compiler/harbour.y * src/compiler/harbour.yyc * src/compiler/harbour.yyh * src/compiler/hbident.c * src/macro/macrolex.c * src/nortl/nortl.c * src/pp/ppcore.c * src/rdd/hbsix/sxcompr.c * src/rdd/hbsix/sxfname.c * src/rdd/usrrdd/usrrdd.c * src/rtl/cdpapi.c * src/rtl/filebuf.c * src/rtl/filesys.c * src/rtl/fslink.c * src/rtl/gtcrs/gtcrs.c * src/rtl/gtsln/gtsln.c * src/rtl/gtsln/mousesln.c * src/rtl/gtxwc/gtxwc.c * src/rtl/hbbfsock.c * src/rtl/hbgtcore.c * src/rtl/hbsocket.c * src/rtl/hbzlib.c * src/rtl/hbznet.c * src/rtl/hbzsock.c * src/rtl/iousr.c * src/rtl/langapi.c * src/vm/cmdarg.c * src/vm/codebloc.c * src/vm/hvm.c * src/vm/itemapi.c * src/vm/macro.c * src/vm/set.c * src/vm/strapi.c * cleaned const qualifier dropping ! fixed few bugs I found analyzing related code ; I left untouched two places in HBSSL which IMO should be fixed yet --- ChangeLog.txt | 73 ++ contrib/gtalleg/gtallegd.c | 2 +- contrib/hbamf/amfdec.c | 22 +- contrib/hbamf/amfenc.c | 2 +- contrib/hbbz2/core.c | 6 +- contrib/hbbz2io/bz2io.c | 4 +- contrib/hbct/atrepl.c | 18 +- contrib/hbct/charrepl.c | 6 +- contrib/hbct/envparam.c | 2 +- contrib/hbct/pack.c | 12 +- contrib/hbct/token2.c | 234 ++--- contrib/hbfimage/fi_wrp.c | 6 +- contrib/hbgd/gdwrp.c | 13 +- contrib/hbgs/core.c | 2 +- contrib/hbgzio/gzio.c | 4 +- contrib/hbhpdf/core.c | 4 +- contrib/hbhpdf/image.c | 2 +- contrib/hbmlzo/core.c | 8 +- contrib/hbmxml/core.c | 2 +- contrib/hbodbc/odbc.c | 30 +- contrib/hbsqlit3/core.c | 4 +- contrib/hbssl/bio.c | 4 +- contrib/hbssl/ssl.c | 4 +- contrib/rddads/ads1.c | 78 +- contrib/rddads/adsfunc.c | 200 ++-- contrib/rddads/adsmgmnt.c | 24 +- contrib/rddads/adsx.c | 10 +- contrib/rddads/rddads.h | 4 +- contrib/sddodbc/core.c | 149 +-- contrib/xhb/cstructc.c | 8 +- include/hbapi.h | 2 +- include/hbdefs.h | 3 + src/common/expropt1.c | 2 +- src/common/expropt2.c | 14 +- src/common/hbmem.c | 14 +- src/compiler/complex.c | 6 +- src/compiler/harbour.y | 2 +- src/compiler/harbour.yyc | 1768 ++++++++++++++++++------------------ src/compiler/harbour.yyh | 2 +- src/compiler/hbident.c | 4 +- src/macro/macrolex.c | 4 +- src/nortl/nortl.c | 22 +- src/pp/ppcore.c | 22 +- src/rdd/hbsix/sxcompr.c | 8 +- src/rdd/hbsix/sxfname.c | 4 +- src/rdd/usrrdd/usrrdd.c | 4 +- src/rtl/cdpapi.c | 2 +- src/rtl/filebuf.c | 2 +- src/rtl/filesys.c | 16 +- src/rtl/fslink.c | 2 +- src/rtl/gtcrs/gtcrs.c | 2 +- src/rtl/gtsln/gtsln.c | 4 +- src/rtl/gtsln/mousesln.c | 8 +- src/rtl/gtxwc/gtxwc.c | 11 +- src/rtl/hbbfsock.c | 2 +- src/rtl/hbgtcore.c | 2 +- src/rtl/hbsocket.c | 8 +- src/rtl/hbzlib.c | 6 +- src/rtl/hbznet.c | 2 +- src/rtl/hbzsock.c | 2 +- src/rtl/iousr.c | 69 +- src/rtl/langapi.c | 2 +- src/vm/cmdarg.c | 4 +- src/vm/codebloc.c | 2 +- src/vm/hvm.c | 6 +- src/vm/itemapi.c | 18 +- src/vm/macro.c | 4 +- src/vm/set.c | 4 +- src/vm/strapi.c | 20 +- 69 files changed, 1540 insertions(+), 1476 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4beab6b032..f56186d9ad 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,79 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-01-21 20:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/gtalleg/gtallegd.c + * contrib/hbamf/amfdec.c + * contrib/hbamf/amfenc.c + * contrib/hbbz2/core.c + * contrib/hbbz2io/bz2io.c + * contrib/hbct/atrepl.c + * contrib/hbct/charrepl.c + * contrib/hbct/envparam.c + * contrib/hbct/pack.c + * contrib/hbct/token2.c + * contrib/hbfimage/fi_wrp.c + * contrib/hbgd/gdwrp.c + * contrib/hbgs/core.c + * contrib/hbgzio/gzio.c + * contrib/hbhpdf/core.c + * contrib/hbhpdf/image.c + * contrib/hbmlzo/core.c + * contrib/hbmxml/core.c + * contrib/hbodbc/odbc.c + * contrib/hbsqlit3/core.c + * contrib/hbssl/bio.c + * contrib/hbssl/ssl.c + * contrib/rddads/ads1.c + * contrib/rddads/adsfunc.c + * contrib/rddads/adsmgmnt.c + * contrib/rddads/adsx.c + * contrib/rddads/rddads.h + * contrib/sddodbc/core.c + * contrib/xhb/cstructc.c + * include/hbapi.h + * include/hbdefs.h + * src/common/expropt1.c + * src/common/expropt2.c + * src/common/hbmem.c + * src/compiler/complex.c + * src/compiler/harbour.y + * src/compiler/harbour.yyc + * src/compiler/harbour.yyh + * src/compiler/hbident.c + * src/macro/macrolex.c + * src/nortl/nortl.c + * src/pp/ppcore.c + * src/rdd/hbsix/sxcompr.c + * src/rdd/hbsix/sxfname.c + * src/rdd/usrrdd/usrrdd.c + * src/rtl/cdpapi.c + * src/rtl/filebuf.c + * src/rtl/filesys.c + * src/rtl/fslink.c + * src/rtl/gtcrs/gtcrs.c + * src/rtl/gtsln/gtsln.c + * src/rtl/gtsln/mousesln.c + * src/rtl/gtxwc/gtxwc.c + * src/rtl/hbbfsock.c + * src/rtl/hbgtcore.c + * src/rtl/hbsocket.c + * src/rtl/hbzlib.c + * src/rtl/hbznet.c + * src/rtl/hbzsock.c + * src/rtl/iousr.c + * src/rtl/langapi.c + * src/vm/cmdarg.c + * src/vm/codebloc.c + * src/vm/hvm.c + * src/vm/itemapi.c + * src/vm/macro.c + * src/vm/set.c + * src/vm/strapi.c + * cleaned const qualifier dropping + ! fixed few bugs I found analyzing related code + ; I left untouched two places in HBSSL which IMO should be fixed yet + 2016-01-21 20:29 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/rddads/ads1.c * do not use long type names in array returned by dbStruct() if diff --git a/contrib/gtalleg/gtallegd.c b/contrib/gtalleg/gtallegd.c index c952f27563..4b26af2442 100644 --- a/contrib/gtalleg/gtallegd.c +++ b/contrib/gtalleg/gtallegd.c @@ -874,7 +874,7 @@ static HB_BOOL hb_gt_alleg_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case HB_GTI_WINTITLE: if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING ) - al_set_window_title( ( char * ) hb_itemGetCPtr( pInfo->pNewVal ) ); + al_set_window_title( ( char * ) HB_UNCONST( hb_itemGetCPtr( pInfo->pNewVal ) ) ); break; diff --git a/contrib/hbamf/amfdec.c b/contrib/hbamf/amfdec.c index f1e09958d3..f5c07fd76a 100644 --- a/contrib/hbamf/amfdec.c +++ b/contrib/hbamf/amfdec.c @@ -72,28 +72,28 @@ static PHB_ITEM hbamf_cls_externalizable_instance( PHB_ITEM pClassFuncStr ) return NULL; } -static char * readByte( amfContext * context ) +static const char * readByte( amfContext * context ) { HB_ISIZ new_position = context->position + 1; - char * byte_ref; + const char * byte_ref; if( new_position < 0 || new_position > context->length ) return NULL; - byte_ref = ( char * ) ( context->cBuf + context->position ); + byte_ref = context->cBuf + context->position; context->position = new_position; return byte_ref; } -static char * readBytes( amfContext * context, HB_ISIZ len ) +static const char * readBytes( amfContext * context, HB_ISIZ len ) { HB_ISIZ new_position = context->position + len; - char * result; + const char * result; if( new_position < 0 || new_position > context->length ) return NULL; - result = ( char * ) ( context->cBuf + context->position ); + result = context->cBuf + context->position; context->position = new_position; return result; } @@ -140,10 +140,10 @@ static HB_BOOL amfX_decode_double( amfContext * context, double * val ) static HB_BOOL amf3_decode_int( amfContext * context, int * iVal ) { - int result = 0; - int byte_cnt = 0; - char * byte_ref; - char byte; + const char * byte_ref; + char byte; + int result = 0; + int byte_cnt = 0; byte_ref = readByte( context ); if( ! byte_ref ) @@ -394,7 +394,7 @@ static HB_BOOL amf3_deserialize_array( amfContext * context, PHB_ITEM pItem, HB_ PHB_ITEM pHash = context->obj_ref; int array_len; HB_BOOL mixed; /* if the result will be a Hash with both numbers and strings as keys */ - char * byte_ref; + const char * byte_ref; if( ! amf3_decode_int( context, header_p ) ) return HB_FALSE; diff --git a/contrib/hbamf/amfenc.c b/contrib/hbamf/amfenc.c index cc9d52d5f0..c2e3104852 100644 --- a/contrib/hbamf/amfenc.c +++ b/contrib/hbamf/amfenc.c @@ -50,7 +50,7 @@ extern HB_BOOL hbamf_is_cls_externalizable( HB_USHORT uiClass ); static void _ref_realItemPtr( PHB_ITEM pKey, PHB_ITEM pItem ) { if( HB_IS_STRING( pItem ) ) - hb_itemPutPtr( pKey, ( void * ) hb_itemGetCPtr( pItem ) ); + hb_itemPutPtr( pKey, HB_UNCONST( hb_itemGetCPtr( pItem ) ) ); else if( HB_IS_ARRAY( pItem ) ) hb_itemPutPtr( pKey, hb_arrayId( pItem ) ); else if( HB_IS_HASH( pItem ) ) diff --git a/contrib/hbbz2/core.c b/contrib/hbbz2/core.c index 45cf7b221a..3476aed67b 100644 --- a/contrib/hbbz2/core.c +++ b/contrib/hbbz2/core.c @@ -82,7 +82,7 @@ static int hb_bz2Compress( const char * szSrc, HB_SIZE nSrc, memset( &stream, 0, sizeof( stream ) ); - stream.next_in = ( char * ) szSrc; + stream.next_in = ( char * ) HB_UNCONST( szSrc ); stream.avail_in = ( unsigned int ) nSrc; stream.next_out = szDst; @@ -127,7 +127,7 @@ static HB_SIZE hb_bz2UncompressedSize( const char * szSrc, HB_SIZE nLen, memset( &stream, 0, sizeof( stream ) ); - stream.next_in = ( char * ) szSrc; + stream.next_in = ( char * ) HB_UNCONST( szSrc ); stream.avail_in = ( unsigned int ) nLen; stream.bzalloc = hb_bz2Alloc; @@ -172,7 +172,7 @@ static int hb_bz2Uncompress( const char * szSrc, HB_SIZE nSrc, memset( &stream, 0, sizeof( stream ) ); - stream.next_in = ( char * ) szSrc; + stream.next_in = ( char * ) HB_UNCONST( szSrc ); stream.avail_in = ( unsigned int ) nSrc; stream.next_out = szDst; diff --git a/contrib/hbbz2io/bz2io.c b/contrib/hbbz2io/bz2io.c index 192597a7a3..d35a76872a 100644 --- a/contrib/hbbz2io/bz2io.c +++ b/contrib/hbbz2io/bz2io.c @@ -341,7 +341,7 @@ static PHB_FILE s_fileOpen( PHB_FILE_FUNCS pFuncs, const char * pszFileName, if( ( nExFlags & FXO_COPYNAME ) != 0 ) { if( pFile ) - hb_strncpy( ( char * ) pszFileName + iPref, pszNameBuf, + hb_strncpy( ( char * ) HB_UNCONST( pszFileName + iPref ), pszNameBuf, HB_PATH_MAX - 1 - iPref ); hb_xfree( pszNameBuf ); } @@ -488,7 +488,7 @@ static HB_SIZE s_fileWrite( PHB_FILE pFile, const void * buffer, HB_SIZE nSize, if( nTimeout == -1 ) nTimeout = pFile->nTimeout; - pFile->bz2.next_in = ( char * ) buffer; + pFile->bz2.next_in = ( char * ) HB_UNCONST( buffer ); pFile->bz2.avail_in = ( unsigned int ) nSize; while( pFile->bz2.avail_in ) diff --git a/contrib/hbct/atrepl.c b/contrib/hbct/atrepl.c index 85cf90bca9..25d74fd089 100644 --- a/contrib/hbct/atrepl.c +++ b/contrib/hbct/atrepl.c @@ -119,13 +119,13 @@ HB_FUNC( ATREPL ) switch( iAtLike ) { case CT_SETATLIKE_EXACT: - pc = ( char * ) ct_at_exact_forward( pcRetSubStr, sRetSubStrLen, pcStringToMatch, - nStrToMatchLen, &nMatchStrLen ); + pc = ( char * ) HB_UNCONST( ct_at_exact_forward( pcRetSubStr, sRetSubStrLen, pcStringToMatch, + nStrToMatchLen, &nMatchStrLen ) ); break; case CT_SETATLIKE_WILDCARD: - pc = ( char * ) ct_at_wildcard_forward( pcRetSubStr, sRetSubStrLen, pcStringToMatch, - nStrToMatchLen, cAtLike, &nMatchStrLen ); + pc = ( char * ) HB_UNCONST( ct_at_wildcard_forward( pcRetSubStr, sRetSubStrLen, pcStringToMatch, + nStrToMatchLen, cAtLike, &nMatchStrLen ) ); break; default: @@ -188,14 +188,14 @@ HB_FUNC( ATREPL ) switch( iAtLike ) { case CT_SETATLIKE_EXACT: - pc = ( char * ) ct_at_exact_backward( pcRetStr + nIgnore, nRetStrLen - nIgnore, - pcStringToMatch, nStrToMatchLen, &nMatchStrLen ); + pc = ( char * ) HB_UNCONST( ct_at_exact_backward( pcRetStr + nIgnore, nRetStrLen - nIgnore, + pcStringToMatch, nStrToMatchLen, &nMatchStrLen ) ); break; case CT_SETATLIKE_WILDCARD: - pc = ( char * ) ct_at_wildcard_backward( pcRetStr + nIgnore, nRetStrLen - nIgnore, - pcStringToMatch, nStrToMatchLen, - cAtLike, &nMatchStrLen ); + pc = ( char * ) HB_UNCONST( ct_at_wildcard_backward( pcRetStr + nIgnore, nRetStrLen - nIgnore, + pcStringToMatch, nStrToMatchLen, + cAtLike, &nMatchStrLen ) ); break; default: diff --git a/contrib/hbct/charrepl.c b/contrib/hbct/charrepl.c index cf2178f762..5715364a95 100644 --- a/contrib/hbct/charrepl.c +++ b/contrib/hbct/charrepl.c @@ -107,9 +107,9 @@ HB_FUNC( CHARREPL ) { /* multiple replacements: searching & replacing in pcRet */ char * pcw = pcRet; - while( ( pcw = ( char * ) ct_at_exact_forward( pcw, sStrLen - ( pcw - pcRet ), - pcSearch + sIndex, 1, - &sMatchStrLen ) ) != NULL ) + while( ( pcw = ( char * ) HB_UNCONST( ct_at_exact_forward( pcw, sStrLen - ( pcw - pcRet ), + pcSearch + sIndex, 1, + &sMatchStrLen ) ) ) != NULL ) { *pcw++ = *( pcReplace + sReplIndex ); } diff --git a/contrib/hbct/envparam.c b/contrib/hbct/envparam.c index a973fdf2d4..9c029d8f3d 100644 --- a/contrib/hbct/envparam.c +++ b/contrib/hbct/envparam.c @@ -100,7 +100,7 @@ HB_FUNC( ENVPARAM ) } if( pResult ) - hb_retc_buffer( ( char * ) hb_osDecodeCP( pResult, NULL, NULL ) ); + hb_retc_buffer( ( char * ) HB_UNCONST( hb_osDecodeCP( pResult, NULL, NULL ) ) ); else hb_retc_null(); #elif defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) diff --git a/contrib/hbct/pack.c b/contrib/hbct/pack.c index 479f9fa293..044dc1c02c 100644 --- a/contrib/hbct/pack.c +++ b/contrib/hbct/pack.c @@ -72,12 +72,12 @@ HB_FUNC( CHARPACK ) n_in += n_count; } if( n_out < len ) - hb_retclen( ( char * ) out, n_out ); + hb_retclen( ( const char * ) out, n_out ); hb_xfree( out ); if( n_out < len ) return; } - hb_retclen( ( char * ) in, len ); + hb_retclen( ( const char * ) in, len ); } static HB_UCHAR * buf_append( HB_UCHAR * buf, HB_SIZE * buf_size, HB_SIZE count, @@ -107,7 +107,7 @@ HB_FUNC( CHARUNPACK ) if( ! ( in[ 0 ] == 158 && in[ 1 ] == 158 ) ) { - hb_retclen( ( char * ) in, len ); + hb_retclen( ( const char * ) in, len ); return; } out = ( HB_UCHAR * ) hb_xgrab( buf_size ); @@ -116,14 +116,14 @@ HB_FUNC( CHARUNPACK ) if( in[ i ] != 0 ) { hb_xfree( out ); - hb_retclen( ( char * ) in, len ); + hb_retclen( ( const char * ) in, len ); return; } out = buf_append( out, &buf_size, in[ i + 1 ], in[ i + 2 ], &out_len ); } - hb_retclen( ( char * ) out, out_len ); + hb_retclen( ( const char * ) out, out_len ); hb_xfree( out ); return; } - hb_retclen( ( char * ) in, len ); + hb_retclen( ( const char * ) in, len ); } diff --git a/contrib/hbct/token2.c b/contrib/hbct/token2.c index 761499086b..a8cb64bc08 100644 --- a/contrib/hbct/token2.c +++ b/contrib/hbct/token2.c @@ -56,6 +56,8 @@ #include "ct.h" #include "hbvm.h" +#include "hbstack.h" + /* static functions for token environment management */ #define TOKEN_ENVIRONMENT_STEP 100 @@ -71,7 +73,7 @@ typedef struct static TOKEN_ENVIRONMENT sTokEnvNew( void ) { TOKEN_ENVIRONMENT env = ( TOKEN_ENVIRONMENT ) - hb_xalloc( sizeof( TOKEN_POSITION ) * ( 2 + TOKEN_ENVIRONMENT_STEP ) ); + hb_xalloc( sizeof( TOKEN_POSITION ) * ( 2 + TOKEN_ENVIRONMENT_STEP ) + 1 ); if( env == NULL ) return NULL; @@ -97,7 +99,7 @@ static int sTokEnvAddPos( TOKEN_ENVIRONMENT * pEnv, TOKEN_POSITION * pPos ) { env = *pEnv = ( TOKEN_ENVIRONMENT ) hb_xrealloc( env, sizeof( TOKEN_POSITION ) * - ( 2 + env[ 0 ].sEndPos + TOKEN_ENVIRONMENT_STEP ) ); + ( 2 + env[ 0 ].sEndPos + TOKEN_ENVIRONMENT_STEP ) + 1 ); env[ 0 ].sEndPos += TOKEN_ENVIRONMENT_STEP; } @@ -198,42 +200,77 @@ static void sTokEnvDel( TOKEN_ENVIRONMENT env ) hb_xfree( env ); } -/* ================= */ /* HARBOUR functions */ -/* ================= */ /* static data */ static const char * sc_spcSeparatorStr = "\x00" "\x09" "\x0A" "\x0C" "\x1A" "\x20" "\x8A" "\x8C" ",.;:!\?/\\<>()#&%+-*"; -static const HB_SIZE sc_sSeparatorStrLen = 26; -/* TODO: make thread safe */ -static TOKEN_ENVIRONMENT s_sTokenEnvironment = NULL; -static HB_BOOL s_fInit = HB_FALSE; - -static void sTokExit( void * cargo ) +static void s_token_exit( void * cargo ) { - HB_SYMBOL_UNUSED( cargo ); + TOKEN_ENVIRONMENT * penv = ( TOKEN_ENVIRONMENT * ) cargo; - if( s_sTokenEnvironment ) + if( *penv ) { - sTokEnvDel( s_sTokenEnvironment ); - s_sTokenEnvironment = NULL; + sTokEnvDel( *penv ); + *penv = NULL; } } +static HB_TSD_NEW( s_token, sizeof( TOKEN_ENVIRONMENT * ), NULL, s_token_exit ); + static void sTokSet( TOKEN_ENVIRONMENT env ) { - if( ! s_fInit && env ) + TOKEN_ENVIRONMENT * penv = ( TOKEN_ENVIRONMENT * ) hb_stackGetTSD( &s_token ); + + if( *penv != env ) { - hb_vmAtExit( sTokExit, NULL ); - s_fInit = HB_TRUE; + if( *penv ) + sTokEnvDel( *penv ); + *penv = env; } +} - if( s_sTokenEnvironment ) - sTokEnvDel( s_sTokenEnvironment ); +static TOKEN_ENVIRONMENT sTokGet( int iParam, HB_BOOL fReadOnly ) +{ + if( iParam < 0 || ( iParam > 0 && HB_ISCHAR( iParam ) ) ) + { + if( iParam < 0 || fReadOnly || HB_ISBYREF( iParam ) ) + { + HB_SIZE nLen; - s_sTokenEnvironment = env; + if( iParam < 0 ) + iParam = -iParam; + + nLen = hb_parclen( iParam ); + if( nLen >= sizeof( TOKEN_POSITION ) * 2 ) + { + TOKEN_ENVIRONMENT env = ( TOKEN_ENVIRONMENT ) HB_UNCONST( hb_parc( iParam ) ); + + if( sTokEnvGetSize( env ) == nLen ) + return fReadOnly ? env : ( TOKEN_ENVIRONMENT ) hb_xmemdup( env, nLen + 1 ); + } + } + return NULL; + } + else + return * ( TOKEN_ENVIRONMENT * ) hb_stackGetTSD( &s_token ); +} + +static int sTokSave( TOKEN_ENVIRONMENT sTokenEnvironment, int iParam ) +{ + if( iParam != 0 && HB_ISBYREF( iParam ) ) + { + if( ! hb_storclen_buffer( ( char * ) sTokenEnvironment, + sTokEnvGetSize( sTokenEnvironment ), iParam ) ) + { + sTokEnvDel( sTokenEnvironment ); + return 0; + } + } + else + sTokSet( sTokenEnvironment ); + return 1; } HB_FUNC( TOKENINIT ) @@ -244,7 +281,7 @@ HB_FUNC( TOKENINIT ) HB_SIZE sStrLen = hb_parclen( 1 ); const char * pcSeparatorStr; HB_SIZE sSeparatorStrLen; - HB_SIZE nSkipCnt, nSkip; + HB_SIZE nSkip; const char * pcSubStr, * pc; HB_SIZE sSubStrLen; TOKEN_ENVIRONMENT sTokenEnvironment; @@ -257,7 +294,7 @@ HB_FUNC( TOKENINIT ) else { pcSeparatorStr = sc_spcSeparatorStr; - sSeparatorStrLen = sc_sSeparatorStrLen; + sSeparatorStrLen = strlen( sc_spcSeparatorStr ); } /* skip width */ @@ -291,6 +328,7 @@ HB_FUNC( TOKENINIT ) for( ;; ) { HB_SIZE sMatchedPos = sSeparatorStrLen; + HB_SIZE nSkipCnt; /* nSkip */ nSkipCnt = 0; @@ -332,33 +370,22 @@ HB_FUNC( TOKENINIT ) } /* save token environment to 4th parameter OR to the static */ - if( HB_ISBYREF( 4 ) ) - { - hb_storclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ), 4 ); - sTokEnvDel( sTokenEnvironment ); - } - else - sTokSet( sTokenEnvironment ); - - hb_retl( HB_TRUE ); + hb_retl( sTokSave( sTokenEnvironment, 4 ) ); } else { /* if there is a token environment stored in either the 4th parameter or in the static variable -> rewind to first token */ - TOKEN_ENVIRONMENT sTokenEnvironment; - - if( HB_ISCHAR( 4 ) && HB_ISBYREF( 4 ) ) - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_parc( 4 ); - else - sTokenEnvironment = s_sTokenEnvironment; + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 4, HB_FALSE ); if( sTokenEnvironment != NULL ) { /* rewind to first token */ - hb_retl( sTokEnvSetPtr( sTokenEnvironment, 0 ) ); - if( HB_ISCHAR( 4 ) && HB_ISBYREF( 4 ) ) - hb_storclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ), 4 ); + int iResult = sTokEnvSetPtr( sTokenEnvironment, 0 ); + + if( ! sTokSave( sTokenEnvironment, 4 ) ) + iResult = HB_FALSE; + hb_retl( iResult ); } else { @@ -386,45 +413,20 @@ HB_FUNC( TOKENNEXT ) const char * pcString = hb_parc( 1 ); HB_SIZE sStrLen = hb_parclen( 1 ); - TOKEN_ENVIRONMENT sTokenEnvironment; + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 3, HB_FALSE ); TOKEN_POSITION * psTokenPosition; /* token environment by parameter ... */ - if( HB_ISCHAR( 3 ) && HB_ISBYREF( 3 ) ) + if( sTokenEnvironment == NULL ) { - HB_SIZE sStrLen3 = hb_parclen( 3 ); + int iArgErrorMode = ct_getargerrormode(); - if( sStrLen3 < sizeof( TOKEN_POSITION ) * 2 ) - { - int iArgErrorMode = ct_getargerrormode(); - - if( iArgErrorMode != CT_ARGERR_IGNORE ) - ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, - NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, - HB_ERR_ARGS_BASEPARAMS ); - - hb_retc_null(); - return; - } - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_xgrab( sStrLen3 ); - hb_xmemcpy( sTokenEnvironment, hb_parc( 3 ), sStrLen3 ); - } - else - { - /* ... or static ? */ - if( s_sTokenEnvironment == NULL ) - { - int iArgErrorMode = ct_getargerrormode(); - - if( iArgErrorMode != CT_ARGERR_IGNORE ) - ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, - NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, - HB_ERR_ARGS_BASEPARAMS ); - - hb_retc_null(); - return; - } - sTokenEnvironment = s_sTokenEnvironment; + if( iArgErrorMode != CT_ARGERR_IGNORE ) + ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, + NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, + HB_ERR_ARGS_BASEPARAMS ); + hb_retc_null(); + return; } /* nth token or next token ? */ @@ -448,11 +450,7 @@ HB_FUNC( TOKENNEXT ) ct_error( ( HB_USHORT ) iArgErrorMode, EG_ARG, CT_ERROR_TOKENNEXT, NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, HB_ERR_ARGS_BASEPARAMS ); - if( HB_ISCHAR( 3 ) && HB_ISBYREF( 3 ) ) - { - hb_storclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ), 3 ); - hb_xfree( sTokenEnvironment ); - } + sTokSave( sTokenEnvironment, 3 ); hb_retc_null(); return; } @@ -464,11 +462,7 @@ HB_FUNC( TOKENNEXT ) hb_retclen( pcString + psTokenPosition->sStartPos, ( psTokenPosition->sEndPos ) - ( psTokenPosition->sStartPos ) ); - if( HB_ISCHAR( 3 ) && HB_ISBYREF( 3 ) ) - { - hb_storclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ), 3 ); - hb_xfree( sTokenEnvironment ); - } + sTokSave( sTokenEnvironment, 3 ); } else { @@ -490,12 +484,7 @@ HB_FUNC( TOKENNEXT ) HB_FUNC( TOKENNUM ) { - TOKEN_ENVIRONMENT sTokenEnvironment; - - if( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ) - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_parc( 1 ); - else - sTokenEnvironment = s_sTokenEnvironment; + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 1, HB_TRUE ); if( sTokenEnvironment != NULL ) hb_retns( sTokEnvGetCnt( sTokenEnvironment ) ); @@ -518,12 +507,7 @@ HB_FUNC( TOKENNUM ) HB_FUNC( TOKENEND ) { - TOKEN_ENVIRONMENT sTokenEnvironment; - - if( HB_ISCHAR( 1 ) && HB_ISBYREF( 1 ) ) - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_parc( 1 ); - else - sTokenEnvironment = s_sTokenEnvironment; + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 1, HB_TRUE ); if( sTokenEnvironment != NULL ) hb_retl( sTokEnvEnd( sTokenEnvironment ) ); @@ -547,9 +531,11 @@ HB_FUNC( TOKENEND ) HB_FUNC( TOKENEXIT ) { - if( s_sTokenEnvironment != NULL ) + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 0, HB_TRUE ); + + if( sTokenEnvironment != NULL ) { - sTokExit( NULL ); + sTokSet( NULL ); hb_retl( HB_TRUE ); } else @@ -566,11 +552,7 @@ HB_FUNC( TOKENAT ) if( HB_ISLOG( 1 ) ) iSeparatorPos = hb_parl( 1 ); - if( HB_ISCHAR( 3 ) && HB_ISBYREF( 3 ) ) - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_parc( 3 ); - else - sTokenEnvironment = s_sTokenEnvironment; - + sTokenEnvironment = sTokGet( 3, HB_TRUE ); if( sTokenEnvironment == NULL ) { int iArgErrorMode = ct_getargerrormode(); @@ -609,54 +591,28 @@ HB_FUNC( TOKENAT ) HB_FUNC( SAVETOKEN ) { - if( s_sTokenEnvironment != NULL ) - hb_retclen( ( char * ) s_sTokenEnvironment, sTokEnvGetSize( s_sTokenEnvironment ) ); + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 0, HB_TRUE ); + + if( sTokenEnvironment != NULL ) + hb_retclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ) ); else hb_retc_null(); } HB_FUNC( RESTTOKEN ) { - TOKEN_ENVIRONMENT sTokenEnvironment = NULL; - HB_SIZE sStrLen = 1; + TOKEN_ENVIRONMENT sNewTokEnv = sTokGet( 1, HB_FALSE ); - if( HB_ISCHAR( 1 ) ) + if( sNewTokEnv != NULL || ( HB_ISCHAR( 1 ) && hb_parclen( 1 ) == 0 ) ) { - sStrLen = hb_parclen( 1 ); - if( sStrLen >= sizeof( TOKEN_POSITION ) ) - { - TOKEN_ENVIRONMENT env = ( TOKEN_ENVIRONMENT ) hb_parc( 1 ); + TOKEN_ENVIRONMENT sTokenEnvironment = sTokGet( 0, HB_FALSE ); - if( sTokEnvGetSize( env ) == sStrLen ) - { - /* alloc memory for new environment */ - sTokenEnvironment = ( TOKEN_ENVIRONMENT ) hb_xalloc( sStrLen ); - if( sTokenEnvironment == NULL ) - { - int iArgErrorMode = ct_getargerrormode(); - - if( iArgErrorMode != CT_ARGERR_IGNORE ) - ct_error( ( HB_USHORT ) iArgErrorMode, EG_MEM, CT_ERROR_RESTTOKEN, - NULL, HB_ERR_FUNCNAME, 0, EF_CANDEFAULT, - HB_ERR_ARGS_BASEPARAMS ); - - hb_retc_null(); - return; - } - hb_xmemcpy( sTokenEnvironment, env, sStrLen ); - } - } - } - - if( sTokenEnvironment != NULL || sStrLen == 0 ) - { - /* return current environment, then delete it */ - if( s_sTokenEnvironment != NULL ) - hb_retclen( ( char * ) s_sTokenEnvironment, sTokEnvGetSize( s_sTokenEnvironment ) ); + if( sTokenEnvironment != NULL ) + hb_retclen( ( char * ) sTokenEnvironment, sTokEnvGetSize( sTokenEnvironment ) ); else hb_retc_null(); - sTokSet( sTokenEnvironment ); + sTokSet( sNewTokEnv ); } else { diff --git a/contrib/hbfimage/fi_wrp.c b/contrib/hbfimage/fi_wrp.c index 9441bf67ac..1f955bdd0f 100644 --- a/contrib/hbfimage/fi_wrp.c +++ b/contrib/hbfimage/fi_wrp.c @@ -366,7 +366,7 @@ HB_FUNC( FI_LOADFROMMEMORY ) const char * szImage = hb_parc( 2 ); int flags = hb_parni( 3 ); - FIMEMORY * stream = FreeImage_OpenMemory( ( BYTE * ) szImage, ( DWORD ) hb_parclen( 2 ) ); + FIMEMORY * stream = FreeImage_OpenMemory( ( BYTE * ) HB_UNCONST( szImage ), ( DWORD ) hb_parclen( 2 ) ); FIBITMAP * dib = FreeImage_LoadFromMemory( fif, stream, flags ); FreeImage_CloseMemory( stream ); @@ -637,7 +637,7 @@ HB_FUNC( FI_GETFILETYPEFROMMEMORY ) { if( HB_ISCHAR( 1 ) ) { - FIMEMORY * stream = FreeImage_OpenMemory( ( BYTE * ) hb_parc( 1 ), ( int ) hb_parclen( 1 ) ); + FIMEMORY * stream = FreeImage_OpenMemory( ( BYTE * ) HB_UNCONST( hb_parc( 1 ) ), ( int ) hb_parclen( 1 ) ); int size = hb_parni( 1 ); hb_retni( FreeImage_GetFileTypeFromMemory( stream, size ) ); @@ -961,7 +961,7 @@ HB_FUNC( FI_SETBACKGROUNDCOLOR ) HB_ISCHAR( 2 ) && hb_parclen( 2 ) >= sizeof( RGBQUAD ) ) { FIBITMAP * dib = hb_FIBITMAP_par( 1 ); - RGBQUAD * bkcolor = ( RGBQUAD * ) hb_itemGetCPtr( hb_param( 2, HB_IT_STRING ) ); + RGBQUAD * bkcolor = ( RGBQUAD * ) HB_UNCONST( hb_itemGetCPtr( hb_param( 2, HB_IT_STRING ) ) ); hb_fi_retl( FreeImage_SetBackgroundColor( dib, bkcolor ) ); } diff --git a/contrib/hbgd/gdwrp.c b/contrib/hbgd/gdwrp.c index 17b4f9306c..ed80f4a14e 100644 --- a/contrib/hbgd/gdwrp.c +++ b/contrib/hbgd/gdwrp.c @@ -1414,7 +1414,7 @@ HB_FUNC( GDIMAGESTRING ) /* void gdImageChar(gdImagePtr im, gdFontPtr font, int int color = hb_parni( 6 ); /* Write string */ - gdImageString( im, font, x, y, ( unsigned char * ) hb_parc( 5 ), color ); + gdImageString( im, font, x, y, ( unsigned char * ) HB_UNCONST( hb_parc( 5 ) ), color ); } else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -1439,7 +1439,7 @@ HB_FUNC( GDIMAGESTRINGUP ) /* void gdImageCharUp(gdImagePtr im, gdFontPtr font, int color = hb_parni( 6 ); /* Write string */ - gdImageStringUp( im, font, x, y, ( unsigned char * ) hb_parc( 5 ), color ); + gdImageStringUp( im, font, x, y, ( unsigned char * ) HB_UNCONST( hb_parc( 5 ) ), color ); } else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -1519,7 +1519,9 @@ HB_FUNC( GDIMAGESTRINGFTEX ) } /* Write string */ - err = gdImageStringFTEx( im, &aRect[ 0 ], fgcolor, ( char * ) fontname, ptsize, angle, x, y, ( char * ) string, ( flags != 0 ? &extra : NULL ) ); + err = gdImageStringFTEx( im, &aRect[ 0 ], fgcolor, ( char * ) HB_UNCONST( fontname ), + ptsize, angle, x, y, ( char * ) HB_UNCONST( string ), + ( flags != 0 ? &extra : NULL ) ); if( ! err ) { /* Save in array the correct text rectangle dimensions */ @@ -1563,7 +1565,10 @@ HB_FUNC( GDIMAGESTRINGFTCIRCLE ) /* char *gdImageStringFTCircle(gdImagePtr im, i int fgcolor = hb_parni( 11 ); /* foreground color */ /* Write string */ - hb_retc( gdImageStringFTCircle( im, cx, cy, radius, textRadius, fillPortion, ( char * ) fontname, points, ( char * ) top, ( char * ) bottom, fgcolor ) ); + hb_retc( gdImageStringFTCircle( im, cx, cy, radius, textRadius, fillPortion, + ( char * ) HB_UNCONST( fontname ), points, + ( char * ) HB_UNCONST( top ), + ( char * ) HB_UNCONST( bottom ), fgcolor ) ); } else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/contrib/hbgs/core.c b/contrib/hbgs/core.c index ace7c640cd..6ec8ed3463 100644 --- a/contrib/hbgs/core.c +++ b/contrib/hbgs/core.c @@ -73,7 +73,7 @@ HB_FUNC( HB_GS ) for( pos = 1; pos < gsargc; ++pos ) { const char * pszParam = hb_arrayGetCPtr( pParam, pos ); - gsargv[ pos ] = ( char * ) ( pszParam ? pszParam : "" ); + gsargv[ pos ] = ( char * ) HB_UNCONST( pszParam ? pszParam : "" ); } code = gsapi_new_instance( &minst, NULL ); diff --git a/contrib/hbgzio/gzio.c b/contrib/hbgzio/gzio.c index 75e8876f56..bbaa541a60 100644 --- a/contrib/hbgzio/gzio.c +++ b/contrib/hbgzio/gzio.c @@ -340,7 +340,7 @@ static PHB_FILE s_fileOpen( PHB_FILE_FUNCS pFuncs, const char * pszFileName, if( ( nExFlags & FXO_COPYNAME ) != 0 ) { if( pFile ) - hb_strncpy( ( char * ) pszFileName + iPref, pszNameBuf, + hb_strncpy( ( char * ) HB_UNCONST( pszFileName ) + iPref, pszNameBuf, HB_PATH_MAX - 1 - iPref ); hb_xfree( pszNameBuf ); } @@ -474,7 +474,7 @@ static HB_SIZE s_fileWrite( PHB_FILE pFile, const void * buffer, HB_SIZE nSize, if( nTimeout == -1 ) nTimeout = pFile->nTimeout; - pFile->gz.next_in = ( Bytef * ) buffer; + pFile->gz.next_in = ( Bytef * ) HB_UNCONST( buffer ); pFile->gz.avail_in = ( uInt ) nSize; while( pFile->gz.avail_in ) diff --git a/contrib/hbhpdf/core.c b/contrib/hbhpdf/core.c index 23d1493d82..2c5ddee386 100644 --- a/contrib/hbhpdf/core.c +++ b/contrib/hbhpdf/core.c @@ -1369,7 +1369,7 @@ HB_FUNC( HPDF_FONT_TEXTWIDTH ) HPDF_TextWidth tw; PHB_ITEM info = hb_itemArrayNew( 4 ); - tw = HPDF_Font_TextWidth( ( HPDF_Font ) hb_parptr( 1 ), ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ) ); + tw = HPDF_Font_TextWidth( ( HPDF_Font ) hb_parptr( 1 ), ( const HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ) ); hb_arraySetNI( info, 1, tw.numchars ); hb_arraySetNI( info, 2, tw.numwords ); @@ -1384,7 +1384,7 @@ HB_FUNC( HPDF_FONT_TEXTWIDTH ) HB_FUNC( HPDF_FONT_MEASURETEXT ) { hb_retni( HPDF_Font_MeasureText( ( HPDF_Font ) hb_parptr( 1 ), - ( HPDF_BYTE * ) hb_parc( 2 ), + ( const HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ), diff --git a/contrib/hbhpdf/image.c b/contrib/hbhpdf/image.c index ae2e5ea0e2..cb32d72b2b 100644 --- a/contrib/hbhpdf/image.c +++ b/contrib/hbhpdf/image.c @@ -74,7 +74,7 @@ HB_FUNC( HPDF_LOADRAWIMAGEFROMFILE ) */ HB_FUNC( HPDF_LOADRAWIMAGEFROMMEM ) { - hb_retptr( ( void * ) HPDF_LoadRawImageFromMem( hb_HPDF_Doc_par( 1 ), ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ), hb_parni( 6 ) ) ); + hb_retptr( ( void * ) HPDF_LoadRawImageFromMem( hb_HPDF_Doc_par( 1 ), ( const HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ), hb_parni( 6 ) ) ); } /* HPDF_LoadJpegImageFromFile( hDoc, cHPEGFileName ) -> hImage diff --git a/contrib/hbmlzo/core.c b/contrib/hbmlzo/core.c index 2459ab786b..e01d36562e 100644 --- a/contrib/hbmlzo/core.c +++ b/contrib/hbmlzo/core.c @@ -134,7 +134,7 @@ HB_FUNC( HB_LZO1X_1_COMPRESS ) } else { - r = lzo1x_1_compress( ( lzo_bytep ) src, src_len, dst, &dst_len, wrkmem ); + r = lzo1x_1_compress( ( const lzo_bytep ) src, src_len, dst, &dst_len, wrkmem ); hb_xfree( wrkmem ); } @@ -184,7 +184,7 @@ HB_FUNC( HB_LZO1X_DECOMPRESS ) hb_storni( LZO_E_OUT_OF_MEMORY, 3 ); /* out of memory */ else { - int r = lzo1x_decompress( ( lzo_bytep ) src, src_len, dst, &dst_len, NULL ); + int r = lzo1x_decompress( ( const lzo_bytep ) src, src_len, dst, &dst_len, NULL ); hb_storni( r, 3 ); @@ -219,7 +219,7 @@ HB_FUNC( HB_LZO1X_DECOMPRESS_SAFE ) hb_storni( LZO_E_OUT_OF_MEMORY, 3 ); /* out of memory */ else { - int r = lzo1x_decompress_safe( ( lzo_bytep ) src, src_len, dst, &dst_len, NULL ); + int r = lzo1x_decompress_safe( ( const lzo_bytep ) src, src_len, dst, &dst_len, NULL ); hb_storni( r, 3 ); @@ -261,7 +261,7 @@ HB_FUNC( LZO_ADLER32 ) const char * src = hb_parc( 1 ); if( src ) - hb_retnint( ( HB_MAXINT ) hb_adler32( 1, ( lzo_bytep ) src, hb_parclen( 1 ) ) ); + hb_retnint( ( HB_MAXINT ) hb_adler32( 1, src, hb_parclen( 1 ) ) ); else hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/contrib/hbmxml/core.c b/contrib/hbmxml/core.c index 5fb7953f9b..16ce45e23d 100644 --- a/contrib/hbmxml/core.c +++ b/contrib/hbmxml/core.c @@ -1639,7 +1639,7 @@ HB_FUNC( MXMLGETCUSTOM ) if( node ) { - PHB_ITEM pItem = ( PHB_ITEM ) mxmlGetCustom( node ); + PHB_ITEM pItem = ( PHB_ITEM ) HB_UNCONST( mxmlGetCustom( node ) ); if( pItem ) hb_itemReturn( pItem ); diff --git a/contrib/hbodbc/odbc.c b/contrib/hbodbc/odbc.c index 57d2d22ff1..c71e19e6c2 100644 --- a/contrib/hbodbc/odbc.c +++ b/contrib/hbodbc/odbc.c @@ -440,7 +440,7 @@ HB_FUNC( SQLDRIVERCONNECT ) /* hDbc, @cConnectString --> nRetCode */ SQLRETURN ret; void * hConnStr; HB_SIZE nConnStr; - SQLTCHAR * cConnStr = ( SQLTCHAR * ) O_HB_PARSTRDEF( 2, &hConnStr, &nConnStr ); + SQLTCHAR * cConnStr = ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 2, &hConnStr, &nConnStr ) ); SQLTCHAR buffer[ 1024 ]; buffer[ 0 ] = '\0'; @@ -478,9 +478,9 @@ HB_FUNC( SQLCONNECT ) /* hDbc, cDSN, cUseName, cPassword --> nRetCode */ void * hUser; void * hPass; HB_SIZE nDSN, nUser, nPass; - SQLTCHAR * cDSN = ( SQLTCHAR * ) O_HB_PARSTRDEF( 2, &hDSN, &nDSN ); - SQLTCHAR * cUser = ( SQLTCHAR * ) O_HB_PARSTRDEF( 3, &hUser, &nUser ); - SQLTCHAR * cPass = ( SQLTCHAR * ) O_HB_PARSTRDEF( 4, &hPass, &nPass ); + SQLTCHAR * cDSN = ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 2, &hDSN, &nDSN ) ); + SQLTCHAR * cUser = ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 3, &hUser, &nUser ) ); + SQLTCHAR * cPass = ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 4, &hPass, &nPass ) ); ret = SQLConnect( hDbc, cDSN, @@ -561,7 +561,7 @@ HB_FUNC( SQLEXECDIRECT ) /* hStmt, cStatement --> nRetCode */ { void * hStatement; HB_SIZE nStatement; - SQLTCHAR * cStatement = ( SQLTCHAR * ) O_HB_PARSTRDEF( 2, &hStatement, &nStatement ); + SQLTCHAR * cStatement = ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 2, &hStatement, &nStatement ) ); hb_retni( SQLExecDirect( hStmt, cStatement, @@ -1040,12 +1040,15 @@ HB_FUNC( SQLSETCONNECTATTR ) /* hDbc, nOption, uOption */ #if ODBCVER >= 0x0300 hb_retni( SQLSetConnectAttr( hDbc, ( SQLINTEGER ) hb_parnl( 2 ), - HB_ISCHAR( 3 ) ? ( SQLPOINTER ) hb_parc( 3 ) : ( SQLPOINTER ) ( HB_PTRUINT ) hb_parnint( 3 ), - HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) ); + HB_ISCHAR( 3 ) ? ( SQLPOINTER ) HB_UNCONST( hb_parc( 3 ) ) : + ( SQLPOINTER ) ( HB_PTRUINT ) hb_parnint( 3 ), + HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : + ( SQLINTEGER ) SQL_IS_INTEGER ) ); #else hb_retni( SQLSetConnectOption( hDbc, ( SQLUSMALLINT ) hb_parni( 2 ), - HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : ( SQLULEN ) hb_parnl( 3 ) ) ); + HB_ISCHAR( 3 ) ? ( SQLULEN ) ( HB_PTRUINT ) hb_parc( 3 ) : + ( SQLULEN ) hb_parnl( 3 ) ) ); #endif } else @@ -1061,12 +1064,15 @@ HB_FUNC( SQLSETSTMTATTR ) /* hStmt, nOption, uOption --> nRetCode */ #if ODBCVER >= 0x0300 hb_retni( SQLSetStmtAttr( hStmt, ( SQLINTEGER ) hb_parnl( 2 ), - HB_ISCHAR( 3 ) ? ( SQLPOINTER ) hb_parc( 3 ) : ( SQLPOINTER ) ( HB_PTRUINT ) hb_parnint( 3 ), - HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) ); + HB_ISCHAR( 3 ) ? ( SQLPOINTER ) HB_UNCONST( hb_parc( 3 ) ) : + ( SQLPOINTER ) ( HB_PTRUINT ) hb_parnint( 3 ), + HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : + ( SQLINTEGER ) SQL_IS_INTEGER ) ); #else hb_retni( SQLSetStmtOption( hStmt, ( SQLUSMALLINT ) hb_parni( 2 ), - HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : ( SQLULEN ) hb_parnl( 3 ) ) ); + HB_ISCHAR( 3 ) ? ( SQLULEN ) ( HB_PTRUINT ) hb_parc( 3 ) : + ( SQLULEN ) hb_parnl( 3 ) ) ); #endif } else @@ -1162,7 +1168,7 @@ HB_FUNC( SQLPREPARE ) /* hStmt, cStatement --> nRetCode */ void * hStatement; hb_retni( SQLPrepare( hStmt, - ( SQLTCHAR * ) O_HB_PARSTRDEF( 2, &hStatement, NULL ), + ( SQLTCHAR * ) HB_UNCONST( O_HB_PARSTRDEF( 2, &hStatement, NULL ) ), ( SQLINTEGER ) SQL_NTS ) ); hb_strfree( hStatement ); diff --git a/contrib/hbsqlit3/core.c b/contrib/hbsqlit3/core.c index 04568461f3..2b0d97c7f1 100644 --- a/contrib/hbsqlit3/core.c +++ b/contrib/hbsqlit3/core.c @@ -1795,7 +1795,7 @@ HB_FUNC( SQLITE3_PROFILE ) if( pHbSqlite3 && pHbSqlite3->db ) sqlite3_profile( pHbSqlite3->db, hb_parl( 2 ) ? SQL3ProfileLog : NULL, - ( void * ) ( HB_ISCHAR( 3 ) ? hb_parcx( 3 ) : NULL ) ); + HB_ISCHAR( 3 ) ? HB_UNCONST( hb_parcx( 3 ) ) : NULL ); else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } @@ -1806,7 +1806,7 @@ HB_FUNC( SQLITE3_TRACE ) if( pHbSqlite3 && pHbSqlite3->db ) sqlite3_trace( pHbSqlite3->db, hb_parl( 2 ) ? SQL3TraceLog : NULL, - ( void * ) ( HB_ISCHAR( 3 ) ? hb_parcx( 3 ) : NULL ) ); + HB_ISCHAR( 3 ) ? HB_UNCONST( hb_parcx( 3 ) ) : NULL ); else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/contrib/hbssl/bio.c b/contrib/hbssl/bio.c index bc827faf90..37cf2625b7 100644 --- a/contrib/hbssl/bio.c +++ b/contrib/hbssl/bio.c @@ -635,7 +635,7 @@ HB_FUNC( BIO_NEW_CONNECT ) { if( HB_ISCHAR( 1 ) ) /* NOTE: Discarding 'const', OpenSSL will strdup() */ - hb_BIO_ret( BIO_new_connect( ( char * ) hb_parc( 1 ) ), NULL ); + hb_BIO_ret( BIO_new_connect( ( char * ) HB_UNCONST( hb_parc( 1 ) ) ), NULL ); else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } @@ -644,7 +644,7 @@ HB_FUNC( BIO_NEW_ACCEPT ) { if( HB_ISCHAR( 1 ) ) /* NOTE: Discarding 'const', OpenSSL will strdup() */ - hb_BIO_ret( BIO_new_accept( ( char * ) hb_parc( 1 ) ), NULL ); + hb_BIO_ret( BIO_new_accept( ( char * ) HB_UNCONST( hb_parc( 1 ) ) ), NULL ); else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/contrib/hbssl/ssl.c b/contrib/hbssl/ssl.c index 342ebeb9ae..6121efc9ea 100644 --- a/contrib/hbssl/ssl.c +++ b/contrib/hbssl/ssl.c @@ -655,7 +655,7 @@ HB_FUNC( SSL_GET_CURRENT_CIPHER ) SSL * ssl = hb_SSL_par( 1 ); if( ssl ) - hb_retptr( ( void * ) SSL_get_current_cipher( ssl ) ); + hb_retptr( HB_UNCONST( SSL_get_current_cipher( ssl ) ) ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -1461,7 +1461,7 @@ HB_FUNC( SSL_USE_RSAPRIVATEKEY_ASN1 ) /* 'const' not used in 2nd param because ssh.h misses it, too. Bug report sent: #1988 [vszakats] */ - hb_retni( SSL_use_RSAPrivateKey_ASN1( ssl, ( unsigned char * ) hb_parc( 2 ), ( int ) hb_parclen( 2 ) ) ); + hb_retni( SSL_use_RSAPrivateKey_ASN1( ssl, ( unsigned char * ) HB_UNCONST( hb_parc( 2 ) ), ( int ) hb_parclen( 2 ) ) ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/contrib/rddads/ads1.c b/contrib/rddads/ads1.c index 2fef9e4c6b..ee5e23b4d3 100644 --- a/contrib/rddads/ads1.c +++ b/contrib/rddads/ads1.c @@ -87,10 +87,10 @@ static void adsSetListener_callback( HB_set_enum setting, HB_set_listener_enum w switch( setting ) { case HB_SET_DATEFORMAT: - AdsSetDateFormat( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DATEFORMAT ) ); + AdsSetDateFormat( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_DATEFORMAT ) ) ); break; case HB_SET_DEFAULT: - AdsSetDefault( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DEFAULT ) ); + AdsSetDefault( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_DEFAULT ) ) ); break; case HB_SET_DELETED: AdsShowDeleted( ( UNSIGNED16 ) ! hb_setGetL( HB_SET_DELETED ) ); @@ -102,7 +102,7 @@ static void adsSetListener_callback( HB_set_enum setting, HB_set_listener_enum w AdsSetExact( ( UNSIGNED16 ) hb_setGetL( HB_SET_EXACT ) ); break; case HB_SET_PATH: - AdsSetSearchPath( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_PATH ) ); + AdsSetSearchPath( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_PATH ) ) ); break; case HB_SET_DECIMALS: @@ -130,12 +130,12 @@ static void adsSetSend( void ) { HB_TRACE( HB_TR_DEBUG, ( "adsSetSend()" ) ); - AdsSetDateFormat( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DATEFORMAT ) ); - AdsSetDefault( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DEFAULT ) ); + AdsSetDateFormat( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_DATEFORMAT ) ) ); + AdsSetDefault( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_DEFAULT ) ) ); AdsShowDeleted( ( UNSIGNED16 ) ! hb_setGetL( HB_SET_DELETED ) ); AdsSetEpoch( ( UNSIGNED16 ) hb_setGetNI( HB_SET_EPOCH ) ); AdsSetExact( ( UNSIGNED16 ) hb_setGetL( HB_SET_EXACT ) ); - AdsSetSearchPath( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_PATH ) ); + AdsSetSearchPath( ( UNSIGNED8 * ) HB_UNCONST( hb_setGetCPtr( HB_SET_PATH ) ) ); AdsSetDecimals( ( UNSIGNED16 ) hb_setGetNI( HB_SET_DECIMALS ) ); } @@ -358,7 +358,7 @@ static ADSHANDLE hb_adsFindBag( ADSAREAP pArea, const char * szBagName ) UNSIGNED32 u32Result; u32Result = AdsOpenIndex( pArea->hTable, - ( UNSIGNED8 * ) szBagName, ahIndex, &u16Count ); + ( UNSIGNED8 * ) HB_UNCONST( szBagName ), ahIndex, &u16Count ); if( u32Result == AE_INDEX_ALREADY_OPEN ) return ahIndex[ 0 ]; @@ -610,7 +610,7 @@ static HB_ERRCODE adsScopeSet( ADSAREAP pArea, ADSHANDLE hOrder, HB_USHORT nScop { UNSIGNED16 u16DataType = ADS_STRINGKEY ; UNSIGNED16 ucLen = ( UNSIGNED16 ) hb_itemGetCLen( pItem ); - UNSIGNED8 *pucScope = ( UNSIGNED8 * ) hb_itemGetCPtr( pItem ); + UNSIGNED8 * pucScope = ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ); #if defined( ADS_USE_OEM_TRANSLATION ) && ADS_LIB_VERSION < 600 UNSIGNED8 * pszKeyFree = NULL; #endif @@ -620,7 +620,7 @@ static HB_ERRCODE adsScopeSet( ADSAREAP pArea, ADSHANDLE hOrder, HB_USHORT nScop #if ADS_LIB_VERSION >= 600 u16DataType = ADS_RAWKEY; #else - pucScope = pszKeyFree = ( UNSIGNED8 * ) hb_adsOemToAnsi( ( char * ) pucScope, ucLen ); + pucScope = pszKeyFree = ( UNSIGNED8 * ) hb_adsOemToAnsi( ( const char * ) pucScope, ucLen ); #endif } #endif @@ -1024,7 +1024,7 @@ static HB_ERRCODE adsSeek( ADSAREAP pArea, HB_BOOL bSoftSeek, PHB_ITEM pKey, HB_ /* build a seek key */ if( HB_IS_STRING( pKey ) ) { - pszKey = ( UNSIGNED8* ) hb_itemGetCPtr( pKey ); + pszKey = ( UNSIGNED8* ) HB_UNCONST( hb_itemGetCPtr( pKey ) ); u16KeyLen = ( UNSIGNED16 ) hb_itemGetCLen( pKey ); #ifdef ADS_USE_OEM_TRANSLATION #if ADS_LIB_VERSION >= 600 @@ -1033,7 +1033,7 @@ static HB_ERRCODE adsSeek( ADSAREAP pArea, HB_BOOL bSoftSeek, PHB_ITEM pKey, HB_ u16KeyType = ADS_STRINGKEY; if( hb_ads_bOEM ) { - pszKey = pszKeyFree = ( UNSIGNED8 * ) hb_adsOemToAnsi( ( char * ) pszKey, u16KeyLen ); + pszKey = pszKeyFree = ( UNSIGNED8 * ) hb_adsOemToAnsi( ( const char * ) pszKey, u16KeyLen ); } #endif #else @@ -2562,7 +2562,7 @@ static HB_ERRCODE adsPutRec( ADSAREAP pArea, const HB_BYTE * pBuffer ) return HB_FAILURE; } - u32Result = AdsSetRecord( pArea->hTable, ( UNSIGNED8 * ) pBuffer, u32Len ); + u32Result = AdsSetRecord( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pBuffer ), u32Len ); return u32Result == AE_SUCCESS ? HB_SUCCESS : HB_FAILURE; } @@ -2634,7 +2634,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem if( nLen > ( HB_SIZE ) pField->uiLen ) nLen = pField->uiLen; u32RetVal = AdsSetStringW( pArea->hTable, ADSFIELD( uiIndex ), - ( WCHAR * ) pwBuffer, + HB_UNCONST( pwBuffer ), ( UNSIGNED32 ) nLen ); hb_strfree( hString ); } @@ -2649,7 +2649,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem if( hb_ads_bOEM ) { #if ADS_LIB_VERSION >= 600 - u32RetVal = AdsSetFieldRaw( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED8 * ) hb_itemGetCPtr( pItem ), ( UNSIGNED32 ) nLen ); + u32RetVal = AdsSetFieldRaw( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ), ( UNSIGNED32 ) nLen ); #else char * pBuffer = hb_adsOemToAnsi( hb_itemGetCPtr( pItem ), nLen ); u32RetVal = AdsSetString( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED8 * ) pBuffer, nLen ); @@ -2659,7 +2659,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem else #endif { - u32RetVal = AdsSetString( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED8 * ) hb_itemGetCPtr( pItem ), ( UNSIGNED32 ) nLen ); + u32RetVal = AdsSetString( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ), ( UNSIGNED32 ) nLen ); } } } @@ -2752,7 +2752,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem u32RetVal = AdsSetBinary( pArea->hTable, ADSFIELD( uiIndex ), pField->uiTypeExtended, ( UNSIGNED32 ) nLen, 0, - ( UNSIGNED8 * ) hb_itemGetCPtr( pItem ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ), ( UNSIGNED32 ) nLen ); } #if ADS_LIB_VERSION >= 1000 @@ -2762,7 +2762,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem const HB_WCHAR * pwBuffer = hb_itemGetStrU16( pItem, HB_CDP_ENDIAN_LITTLE, &hString, &nLen ); u32RetVal = AdsSetStringW( pArea->hTable, ADSFIELD( uiIndex ), - ( WCHAR * ) pwBuffer, + HB_UNCONST( pwBuffer ), ( UNSIGNED32 ) nLen ); hb_strfree( hString ); } @@ -2777,7 +2777,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem hb_adsOemAnsiFree( szRet ); #else u32RetVal = AdsSetString( pArea->hTable, ADSFIELD( uiIndex ), - ( UNSIGNED8 * ) hb_itemGetCPtr( pItem ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ), ( UNSIGNED32 ) nLen ); #endif } @@ -3170,8 +3170,8 @@ static HB_ERRCODE adsCreate( ADSAREAP pArea, LPDBOPENINFO pCreateInfo ) pArea->maxFieldLen = 24; uRetVal = AdsCreateTable( hConnection, - ( UNSIGNED8 * ) pCreateInfo->abName, - ( UNSIGNED8 * ) pCreateInfo->atomAlias, + ( UNSIGNED8 * ) HB_UNCONST( pCreateInfo->abName ), + ( UNSIGNED8 * ) HB_UNCONST( pCreateInfo->atomAlias ), ( UNSIGNED16 ) pArea->iFileType, ( UNSIGNED16 ) hb_ads_iCharType, ( UNSIGNED16 ) hb_ads_iLockType, @@ -3459,7 +3459,7 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) u32RetVal = AdsExecuteSQLDirect( hStatement, ( UNSIGNED8 * ) szSQL, &hTable ); hb_adsOemAnsiFree( szSQL ); #else - u32RetVal = AdsExecuteSQLDirect( hStatement, ( UNSIGNED8 * ) szFile, &hTable ); + u32RetVal = AdsExecuteSQLDirect( hStatement, ( UNSIGNED8 * ) HB_UNCONST( szFile ), &hTable ); #endif if( u32RetVal != AE_SUCCESS ) @@ -3486,8 +3486,8 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) do { u32RetVal = AdsOpenTable( hConnection, - ( UNSIGNED8 * ) pOpenInfo->abName, - ( UNSIGNED8 * ) pOpenInfo->atomAlias, + ( UNSIGNED8 * ) HB_UNCONST( pOpenInfo->abName ), + ( UNSIGNED8 * ) HB_UNCONST( pOpenInfo->atomAlias ), ( fDictionary ? ADS_DEFAULT : ( UNSIGNED16 ) pArea->iFileType ), ( UNSIGNED16 ) hb_ads_iCharType, ( UNSIGNED16 ) hb_ads_iLockType, @@ -3924,7 +3924,7 @@ static HB_ERRCODE adsSetRel( ADSAREAP pArea, LPDBRELINFO lpdbRelations ) HB_TRACE( HB_TR_DEBUG, ( "adsSetRel(%p, %p)", pArea, lpdbRelations ) ); - szExp = ( UNSIGNED8 * ) hb_itemGetCPtr( lpdbRelations->abKey ); + szExp = ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( lpdbRelations->abKey ) ); if( *szExp && adsGetRddType( lpdbRelations->lpaChild->rddID ) >= 0 ) { ADSHANDLE hIndex = ( ( ADSAREAP ) lpdbRelations->lpaChild )->hOrdCurrent; @@ -3951,7 +3951,7 @@ static HB_ERRCODE adsOrderListAdd( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) HB_TRACE( HB_TR_DEBUG, ( "adsOrderListAdd(%p, %p)", pArea, pOrderInfo ) ); u32RetVal = AdsOpenIndex( pArea->hTable, - ( UNSIGNED8 * ) hb_itemGetCPtr( pOrderInfo->atomBagName ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pOrderInfo->atomBagName ) ), ahIndex, &u16ArrayLen ); if( u32RetVal != AE_SUCCESS && u32RetVal != AE_INDEX_ALREADY_OPEN ) { @@ -4184,9 +4184,9 @@ static HB_ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo #if ADS_LIB_VERSION >= 610 u32RetVal = AdsCreateIndex61( hTableOrIndex, - ( UNSIGNED8 * ) pOrderInfo->abBagName, - ( UNSIGNED8 * ) pOrderInfo->atomBagName, - ( UNSIGNED8 * ) hb_itemGetCPtr( pExprItem ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->abBagName ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->atomBagName ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pExprItem ) ), pArea->area.lpdbOrdCondInfo ? ( UNSIGNED8 * ) pArea->area.lpdbOrdCondInfo->abFor : NULL, pucWhile, u32Options, @@ -4194,9 +4194,9 @@ static HB_ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo &hIndex ); #else u32RetVal = AdsCreateIndex( hTableOrIndex, - ( UNSIGNED8 * ) pOrderInfo->abBagName, - ( UNSIGNED8 * ) pOrderInfo->atomBagName, - ( UNSIGNED8 * ) hb_itemGetCPtr( pExprItem ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->abBagName ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->atomBagName ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pExprItem ) ), pArea->area.lpdbOrdCondInfo ? ( UNSIGNED8 * ) pArea->area.lpdbOrdCondInfo->abFor : NULL, pucWhile, u32Options, @@ -4219,7 +4219,7 @@ static HB_ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo UNSIGNED16 usArrayLen = 256; u32RetVal = AdsOpenIndex( pArea->hTable, - ( UNSIGNED8 * ) pOrderInfo->abBagName, ahIndex, &usArrayLen ); + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->abBagName ), ahIndex, &usArrayLen ); if( u32RetVal != AE_SUCCESS && u32RetVal != AE_INDEX_ALREADY_OPEN ) { SELF_ORDSETCOND( &pArea->area, NULL ); @@ -4531,7 +4531,7 @@ static HB_ERRCODE adsOrderInfo( ADSAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO (AE_INDEX_ALREADY_OPEN) */ u32 = AdsOpenIndex( pArea->hTable, - ( UNSIGNED8 * ) hb_itemGetCPtr( pOrderInfo->atomBagName ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pOrderInfo->atomBagName ) ), NULL, &u16 ); if( u32 != AE_INDEX_ALREADY_OPEN ) @@ -4542,7 +4542,7 @@ static HB_ERRCODE adsOrderInfo( ADSAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO ADSHANDLE ahIndex[ 1 ]; u16 = 1; if( AdsOpenIndex( pArea->hTable, - ( UNSIGNED8 * ) hb_itemGetCPtr( pOrderInfo->atomBagName ), + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pOrderInfo->atomBagName ) ), ahIndex, &u16 ) == AE_INDEX_ALREADY_OPEN ) { AdsCloseIndex( ahIndex[ 0 ] ); @@ -4817,7 +4817,7 @@ static HB_ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo ) UNSIGNED32 u32RetVal = AE_INVALID_EXPRESSION; const char * pucFilter = hb_itemGetCPtr( pFilterInfo->abFilterText ); - AdsIsExprValid( pArea->hTable, ( UNSIGNED8 * ) pucFilter, &bValidExpr ); + AdsIsExprValid( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pucFilter ), &bValidExpr ); if( bValidExpr ) { @@ -4833,9 +4833,9 @@ static HB_ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo ) hb_adsOemAnsiFree( szFilter ); #else if( hb_setGetL( HB_SET_OPTIMIZE ) ) - u32RetVal = AdsSetAOF( pArea->hTable, ( UNSIGNED8 * ) pucFilter, usResolve ); + u32RetVal = AdsSetAOF( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pucFilter ), usResolve ); else - u32RetVal = AdsSetFilter( pArea->hTable, ( UNSIGNED8 * ) pucFilter ); + u32RetVal = AdsSetFilter( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pucFilter ) ); #endif } /* else let SUPER handle filtering */ pArea->area.dbfi.fOptimized = u32RetVal == AE_SUCCESS; @@ -4998,7 +4998,7 @@ static HB_ERRCODE adsGetValueFile( ADSAREAP pArea, HB_USHORT uiIndex, const char return HB_SUCCESS; u32RetVal = AdsBinaryToFile( pArea->hTable, ADSFIELD( uiIndex ), - ( UNSIGNED8 * ) szFile ); + ( UNSIGNED8 * ) HB_UNCONST( szFile ) ); if( u32RetVal != AE_SUCCESS ) { /* commonError( pArea, EG_READ, ( HB_ERRCODE ) u32RetVal, 0, NULL, 0, NULL ); */ @@ -5035,7 +5035,7 @@ static HB_ERRCODE adsPutValueFile( ADSAREAP pArea, HB_USHORT uiIndex, const char uiMode = ADS_BINARY; u32RetVal = AdsFileToBinary( pArea->hTable, ADSFIELD( uiIndex ), uiMode, - ( UNSIGNED8 * ) szFile ); + ( UNSIGNED8 * ) HB_UNCONST( szFile ) ); if( u32RetVal != AE_SUCCESS ) { commonError( pArea, EG_WRITE, ( HB_ERRCODE ) u32RetVal, 0, NULL, 0, NULL ); diff --git a/contrib/rddads/adsfunc.c b/contrib/rddads/adsfunc.c index b5ebcc4581..87f1f74b7f 100644 --- a/contrib/rddads/adsfunc.c +++ b/contrib/rddads/adsfunc.c @@ -74,6 +74,7 @@ char * hb_adsOemToAnsi( const char * pszSrc, HB_SIZE nLen ) { if( hb_ads_bOEM ) { +#if defined( HB_OS_WIN ) int nWideLen = MultiByteToWideChar( CP_OEMCP, MB_PRECOMPOSED, pszSrc, ( int ) nLen, NULL, 0 ); LPWSTR pszWide = ( LPWSTR ) hb_xgrab( ( nWideLen + 1 ) * sizeof( wchar_t ) ); @@ -90,14 +91,18 @@ char * hb_adsOemToAnsi( const char * pszSrc, HB_SIZE nLen ) pszDst[ nLen ] = '\0'; return pszDst; +#else + HB_SYMBOL_UNUSED( nLen ); +#endif } - return ( char * ) pszSrc; + return ( char * ) HB_UNCONST( pszSrc ); } char * hb_adsAnsiToOem( const char * pszSrc, HB_SIZE nLen ) { if( hb_ads_bOEM ) { +#if defined( HB_OS_WIN ) int nWideLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, pszSrc, ( int ) nLen, NULL, 0 ); LPWSTR pszWide = ( LPWSTR ) hb_xgrab( ( nWideLen + 1 ) * sizeof( wchar_t ) ); @@ -114,8 +119,11 @@ char * hb_adsAnsiToOem( const char * pszSrc, HB_SIZE nLen ) pszDst[ nLen ] = '\0'; return pszDst; +#else + HB_SYMBOL_UNUSED( nLen ); +#endif } - return ( char * ) pszSrc; + return ( char * ) HB_UNCONST( pszSrc ); } void hb_adsOemAnsiFree( char * pszSrc ) @@ -267,7 +275,7 @@ HB_FUNC( ADSSETDATEFORMAT ) hb_retc( usLen > 0 ? ( char * ) pucFormat : NULL ); if( HB_ISCHAR( 1 ) ) - AdsSetDateFormat( ( UNSIGNED8 * ) hb_parcx( 1 ) ); + AdsSetDateFormat( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) ); } HB_FUNC( ADSSETEPOCH ) @@ -296,7 +304,7 @@ HB_FUNC( ADSISSERVERLOADED ) { UNSIGNED16 pbLoaded = 0; - hb_retni( HB_ISCHAR( 1 ) && AdsIsServerLoaded( ( UNSIGNED8 * ) hb_parcx( 1 ), + hb_retni( HB_ISCHAR( 1 ) && AdsIsServerLoaded( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ), &pbLoaded ) == AE_SUCCESS ? pbLoaded : 0 ); } @@ -334,7 +342,7 @@ HB_FUNC( ADSUNLOCKRECORD ) HB_FUNC( ADSGETMEMODATATYPE ) { - UNSIGNED8 * pszFieldName = ( UNSIGNED8 * ) hb_parc( 1 ); + UNSIGNED8 * pszFieldName = ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ); if( ! pszFieldName ) pszFieldName = ADSFIELD( hb_parni( 1 ) ); @@ -509,7 +517,7 @@ HB_FUNC( ADSSETDEFAULT ) hb_retclen( ( char * ) pucDefault, usLen ); if( HB_ISCHAR( 1 ) ) - AdsSetDefault( ( UNSIGNED8 * ) hb_parcx( 1 ) ); + AdsSetDefault( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) ); } HB_FUNC( ADSSETSEARCHPATH ) @@ -522,7 +530,7 @@ HB_FUNC( ADSSETSEARCHPATH ) hb_retclen( ( char * ) pucPath, usLen ); if( HB_ISCHAR( 1 ) ) - AdsSetSearchPath( ( UNSIGNED8 * ) hb_parcx( 1 ) ); + AdsSetSearchPath( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) ); } HB_FUNC( ADSSETDELETED ) @@ -560,8 +568,8 @@ HB_FUNC( ADSBLOB2FILE ) if( pArea ) hb_retl( AdsBinaryToFile( pArea->hTable, - ( UNSIGNED8 * ) szFieldName, - ( UNSIGNED8 * ) szFileName ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( szFieldName ), + ( UNSIGNED8 * ) HB_UNCONST( szFileName ) ) == AE_SUCCESS ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); } @@ -580,9 +588,9 @@ HB_FUNC( ADSFILE2BLOB ) if( pArea ) hb_retl( AdsFileToBinary( pArea->hTable, - ( UNSIGNED8 * ) szFieldName, + ( UNSIGNED8 * ) HB_UNCONST( szFieldName ), ( UNSIGNED16 ) ( hb_pcount() > 2 ? hb_parni( 3 ) : ADS_BINARY ) /* usBinaryType */, - ( UNSIGNED8 * ) szFileName ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( szFileName ) ) == AE_SUCCESS ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); } @@ -658,7 +666,7 @@ HB_FUNC( ADSKEYNO ) else { AdsGetIndexHandle( pArea->hTable, - ( UNSIGNED8 * ) hb_itemGetCPtr( pxOrder ) /* ordName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pxOrder ) ) /* ordName */, &hIndex ); } @@ -713,7 +721,7 @@ HB_FUNC( ADSKEYCOUNT ) else { AdsGetIndexHandle( pArea->hTable, - ( UNSIGNED8 * ) hb_itemGetCPtr( pxOrder ) /* ordName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pxOrder ) ) /* ordName */, &hIndex ); } @@ -789,7 +797,7 @@ HB_FUNC( ADSADDCUSTOMKEY ) if( HB_ISNUM( 1 ) ) AdsGetIndexHandleByOrder( pArea->hTable, ( UNSIGNED16 ) hb_parni( 1 ) /* ordNum */, &hIndex ); else - AdsGetIndexHandle( pArea->hTable, ( UNSIGNED8 * ) hb_parcx( 1 ) /* ordName */, &hIndex ); + AdsGetIndexHandle( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* ordName */, &hIndex ); hb_retnl( ( long ) AdsAddCustomKey( hIndex ) ); } @@ -815,7 +823,7 @@ HB_FUNC( ADSDELETECUSTOMKEY ) if( HB_ISNUM( 1 ) ) AdsGetIndexHandleByOrder( pArea->hTable, ( UNSIGNED16 ) hb_parni( 1 ) /* ordNum */, &hIndex ); else - AdsGetIndexHandle( pArea->hTable, ( UNSIGNED8 * ) hb_parcx( 1 ) /* ordName */, &hIndex ); + AdsGetIndexHandle( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* ordName */, &hIndex ); hb_retnl( ( long ) AdsDeleteCustomKey( hIndex ) ); } @@ -1099,7 +1107,7 @@ HB_FUNC( ADSENABLEENCRYPTION ) if( pArea ) hb_retnl( AdsEnableEncryption( pArea->hTable, - ( UNSIGNED8 * ) pucPassword ) ); + ( UNSIGNED8 * ) HB_UNCONST( pucPassword ) ) ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); } @@ -1204,7 +1212,7 @@ HB_FUNC( ADSCONNECT ) ADSHANDLE hConnect = 0; if( HB_ISCHAR( 1 ) && - AdsConnect( ( UNSIGNED8 * ) hb_parcx( 1 ), + AdsConnect( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ), &hConnect ) == AE_SUCCESS ) { hb_ads_setConnection( hConnect ); @@ -1328,7 +1336,7 @@ HB_FUNC( ADSEXECUTESQLDIRECT ) ADSHANDLE hCursor = 0; if( AdsExecuteSQLDirect( pArea->hStatement, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucStmt */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucStmt */, &hCursor ) == AE_SUCCESS ) { if( hCursor ) @@ -1363,7 +1371,7 @@ HB_FUNC( ADSPREPARESQL ) if( pArea && pArea->hStatement && HB_ISCHAR( 1 ) ) { if( AdsPrepareSQL( pArea->hStatement, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucStmt */ ) == AE_SUCCESS ) + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucStmt */ ) == AE_SUCCESS ) hb_retl( HB_TRUE ); else { @@ -1416,7 +1424,7 @@ HB_FUNC( ADSVERIFYSQL ) ADSAREAP pArea = hb_adsGetWorkAreaPointer(); if( pArea && pArea->hStatement && HB_ISCHAR( 1 ) ) - hb_retl( AdsVerifySQL( pArea->hStatement, ( UNSIGNED8 * ) hb_parc( 1 ) /* pucStmt */ ) == AE_SUCCESS ); + hb_retl( AdsVerifySQL( pArea->hStatement, ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucStmt */ ) == AE_SUCCESS ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); #else @@ -1454,7 +1462,7 @@ HB_FUNC( ADSCOPYTABLE ) if( HB_ISCHAR( 1 ) ) hb_retl( AdsCopyTable( ( pArea->hOrdCurrent ) ? pArea->hOrdCurrent : pArea->hTable /* hIndex */, /* If an index is active copy table in indexed order. */ ( UNSIGNED16 ) hb_parnidef( 2, ADS_RESPECTFILTERS ) /* usFilterOption */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucFile */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucFile */ ) == AE_SUCCESS ); else hb_errRT_DBCMD( EG_ARG, 1014, NULL, HB_ERR_FUNCNAME ); } @@ -1472,7 +1480,7 @@ HB_FUNC( ADSCONVERTTABLE ) { hb_retl( AdsConvertTable( pArea->hTable, ADS_IGNOREFILTERS, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucFile */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucFile */, ( UNSIGNED16 ) hb_parnidef( 2, ADS_ADT ) /* usTableType */ ) == AE_SUCCESS ); } else @@ -1574,7 +1582,7 @@ HB_FUNC( ADSISEXPRVALID ) /* cExpr */ if( pArea && HB_ISCHAR( 1 ) ) AdsIsExprValid( pArea->hTable, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucExpr */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucExpr */, &bValidExpr ); hb_retl( bValidExpr != 0 ); @@ -1648,7 +1656,7 @@ HB_FUNC( ADSGETNUMOPENTABLES ) HB_FUNC( ADSSHOWERROR ) { - AdsShowError( ( UNSIGNED8 * ) hb_parc( 1 ) ); + AdsShowError( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) ); } HB_FUNC( ADSBEGINTRANSACTION ) @@ -1663,7 +1671,7 @@ HB_FUNC( ADSCOMMITTRANSACTION ) HB_FUNC( ADSFAILEDTRANSACTIONRECOVERY ) { - hb_retl( AdsFailedTransactionRecovery( ( UNSIGNED8 * ) hb_parc( 1 ) /* pucServer */ ) == AE_SUCCESS ); + hb_retl( AdsFailedTransactionRecovery( ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucServer */ ) == AE_SUCCESS ); } HB_FUNC( ADSINTRANSACTION ) @@ -1763,7 +1771,7 @@ HB_FUNC( ADSISEMPTY ) ADSAREAP pArea = hb_adsGetWorkAreaPointer(); if( pArea && AdsIsEmpty( pArea->hTable, - ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) hb_parcx( 1 ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, + ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, &pbEmpty ) == AE_SUCCESS ) hb_retl( pbEmpty != 0 ); else @@ -1784,11 +1792,11 @@ HB_FUNC( ADSISNULL ) { #if ADS_LIB_VERSION >= 900 AdsIsNull( pArea->hTable, - ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) hb_parcx( 1 ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, + ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, &u16Null ); #else AdsIsEmpty( pArea->hTable, - ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) hb_parcx( 1 ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, + ( HB_ISCHAR( 1 ) ? ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) : ADSFIELD( hb_parni( 1 ) ) ) /* pucFldName */, &u16Null ); #endif hb_retl( u16Null != 0 ); @@ -1819,12 +1827,12 @@ HB_FUNC( ADSDDCREATEREFINTEGRITY ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDCreateRefIntegrity( HB_ADS_PARCONNECTION( 1 ) /* hDictionary */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucRIName */, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pucFailTable */, - ( UNSIGNED8 * ) hb_parcx( 4 ) /* pucParentTableName */, - ( UNSIGNED8 * ) hb_parcx( 5 ) /* pucParentTagName */, - ( UNSIGNED8 * ) hb_parcx( 6 ) /* pucChildTableName */, - ( UNSIGNED8 * ) hb_parcx( 7 ) /* pucChildTagName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucRIName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pucFailTable */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 4 ) ) /* pucParentTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 5 ) ) /* pucParentTagName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 6 ) ) /* pucChildTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 7 ) ) /* pucChildTagName */, ( UNSIGNED16 ) hb_parni( 8 ) /* usUpdateRule */, ( UNSIGNED16 ) hb_parni( 9 ) /* usDeleteRule */ ) == AE_SUCCESS ); #else @@ -1836,7 +1844,7 @@ HB_FUNC( ADSDDREMOVEREFINTEGRITY ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDRemoveRefIntegrity( HB_ADS_PARCONNECTION( 1 ) /* hDictionary */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucRIName */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucRIName */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -1846,11 +1854,11 @@ HB_FUNC( ADSDDADDTABLE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDAddTable( HB_ADS_PARCONNECTION( 4 ) /* hDictionary */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pTableName */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pTableFileName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pTableFileName */, ( UNSIGNED16 ) hb_ads_iFileType, ( UNSIGNED16 ) hb_ads_iCharType, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pTableIndexFileName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pTableIndexFileName */, NULL ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); @@ -1861,7 +1869,7 @@ HB_FUNC( ADSDDREMOVETABLE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDRemoveTable( HB_ADS_PARCONNECTION( 3 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pTableName */, ( UNSIGNED16 ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : hb_parl( 2 ) ) /* usDeleteFiles */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); @@ -1872,9 +1880,9 @@ HB_FUNC( ADSDDADDINDEXFILE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDAddIndexFile( HB_ADS_PARCONNECTION( 4 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pTableName */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pIndexName */, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pucComment */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pIndexName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pucComment */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -1884,8 +1892,8 @@ HB_FUNC( ADSDDREMOVEINDEXFILE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDRemoveIndexFile( HB_ADS_PARCONNECTION( 4 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pTableName */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pIndexName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pIndexName */, ( UNSIGNED16 ) ( HB_ISNUM( 3 ) ? hb_parni( 3 ) : hb_parl( 3 ) ) /* usDeleteFiles */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); @@ -1896,8 +1904,8 @@ HB_FUNC( ADSDDADDUSERTOGROUP ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDAddUserToGroup( HB_ADS_PARCONNECTION( 3 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pGroup */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pName */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pGroup */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pName */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -1907,8 +1915,8 @@ HB_FUNC( ADSDDREMOVEUSERFROMGROUP ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDRemoveUserFromGroup( HB_ADS_PARCONNECTION( 3 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pGroup */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pName */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pGroup */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pName */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -1919,10 +1927,10 @@ HB_FUNC( ADSCONNECT60 ) #if ADS_LIB_VERSION >= 600 ADSHANDLE hConnect = 0; - if( AdsConnect60( ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucServerPath */, + if( AdsConnect60( ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucServerPath */, ( UNSIGNED16 ) hb_parni( 2 ) /* usServerTypes */, - ( UNSIGNED8 * ) hb_parc( 3 ) /* pucUserName */, - ( UNSIGNED8 * ) hb_parc( 4 ) /* pucPassword */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 4 ) ) /* pucPassword */, ( UNSIGNED32 ) hb_parnldef( 5, ADS_DEFAULT ) /* ulOptions */, &hConnect ) == AE_SUCCESS ) { @@ -1944,9 +1952,9 @@ HB_FUNC( ADSDDCREATE ) #if ADS_LIB_VERSION >= 600 ADSHANDLE hConnect = 0; - if( AdsDDCreate( ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucDictionaryPath */, + if( AdsDDCreate( ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucDictionaryPath */, ( UNSIGNED16 ) hb_parl( 2 ) /* usEncrypt */, - ( UNSIGNED8 * ) hb_parc( 3 ) /* pucDescription */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ) /* pucDescription */, &hConnect ) == AE_SUCCESS ) { hb_ads_setConnection( hConnect ); @@ -1963,10 +1971,10 @@ HB_FUNC( ADSDDCREATEUSER ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDCreateUser( HB_ADS_PARCONNECTION( 5 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucGroupName */, - ( UNSIGNED8 * ) hb_parc( 2 ) /* pucUserName */, - ( UNSIGNED8 * ) hb_parc( 3 ) /* pucPassword */, - ( UNSIGNED8 * ) hb_parc( 4 ) /* pucDescription */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucGroupName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 2 ) ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ) /* pucPassword */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 4 ) ) /* pucDescription */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -1976,7 +1984,7 @@ HB_FUNC( ADSDDDELETEUSER ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDDDeleteUser( HB_ADS_PARCONNECTION( 2 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucUserName */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucUserName */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -2081,7 +2089,7 @@ HB_FUNC( ADSDDSETDATABASEPROPERTY ) case ADS_DD_ENCRYPT_TABLE_PASSWORD: ulRetVal = AdsDDSetDatabaseProperty( hConnect, ulProperty, - HB_IS_STRING( pParam ) ? ( VOID * ) hb_itemGetCPtr( pParam ) : NULL, + HB_IS_STRING( pParam ) ? HB_UNCONST( hb_itemGetCPtr( pParam ) ) : NULL, ( UNSIGNED16 ) hb_itemGetCLen( pParam ) + 1 ); break; /* String properties (NULL not accepted) */ @@ -2093,7 +2101,7 @@ HB_FUNC( ADSDDSETDATABASEPROPERTY ) case ADS_DD_LOGINS_DISABLED_ERRSTR: ulRetVal = AdsDDSetDatabaseProperty( hConnect, ulProperty, - ( VOID * ) hb_itemGetCPtr( pParam ), + HB_UNCONST( hb_itemGetCPtr( pParam ) ), ( UNSIGNED16 ) hb_itemGetCLen( pParam ) + 1 ); break; #endif @@ -2165,7 +2173,7 @@ HB_FUNC( ADSDDGETUSERPROPERTY ) UNSIGNED16 usPropertyLen = sizeof( pvProperty ); UNSIGNED32 ulRetVal = AdsDDGetUserProperty( HB_ADS_PARCONNECTION( 4 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucUserName */, ( UNSIGNED16 ) hb_parni( 2 ) /* usPropertyID */, pvProperty, &usPropertyLen ); @@ -2197,13 +2205,13 @@ HB_FUNC( ADSDDGETUSERPROPERTY ) HB_FUNC( ADSTESTLOGIN ) { #if ADS_LIB_VERSION >= 600 - UNSIGNED8 * pucUserName = ( UNSIGNED8 * ) hb_parc( 3 ); + UNSIGNED8 * pucUserName = ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ); ADSHANDLE adsTestHandle = 0; - if( AdsConnect60( ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucServerPath */, + if( AdsConnect60( ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucServerPath */, ( UNSIGNED16 ) hb_parni( 2 ) /* usServerTypes */, pucUserName, - ( UNSIGNED8 * ) hb_parc( 4 ) /* pucPassword */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 4 ) ) /* pucPassword */, ( UNSIGNED32 ) hb_parnldef( 5, ADS_DEFAULT ) /* ulOptions */, &adsTestHandle ) == AE_SUCCESS ) { @@ -2234,15 +2242,15 @@ HB_FUNC( ADSRESTRUCTURETABLE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsRestructureTable( HB_ADS_PARCONNECTION( 5 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pTableName */, NULL /* pucAlias */, ( UNSIGNED16 ) hb_ads_iFileType, ( UNSIGNED16 ) hb_ads_iCharType, ( UNSIGNED16 ) hb_ads_iLockType, ( UNSIGNED16 ) hb_ads_iCheckRights, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucAddFields */, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pucDeleteFields */, - ( UNSIGNED8 * ) hb_parcx( 4 ) /* pucChangeFields */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucAddFields */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pucDeleteFields */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 4 ) ) /* pucChangeFields */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -2298,7 +2306,7 @@ HB_FUNC( ADSDIRECTORY ) pitmDir = hb_itemArrayNew( 0 ); ulRetVal = AdsFindFirstTable( hConnect, - ( UNSIGNED8 * ) hb_parcx( 1 ), + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ), ( UNSIGNED8 * ) ucFileName, &usFileNameLen, &sHandle ); @@ -2308,7 +2316,7 @@ HB_FUNC( ADSDIRECTORY ) { while( ulRetVal == AE_SUCCESS ) { - PHB_ITEM pitmFileName = hb_itemPutCL( NULL, ( char * ) ucFileName, usFileNameLen ); + PHB_ITEM pitmFileName = hb_itemPutCL( NULL, ( const char * ) ucFileName, usFileNameLen ); hb_arrayAddForward( pitmDir, pitmFileName ); usFileNameLen = sizeof( ucFileName ); @@ -2334,7 +2342,7 @@ HB_FUNC( ADSCHECKEXISTENCE ) UNSIGNED16 usExist = 0; hb_retl( AdsCheckExistence( HB_ADS_PARCONNECTION( 2 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucFilename */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucFilename */, &usExist ) == AE_SUCCESS && usExist != 0 ); #else hb_retl( HB_FALSE ); @@ -2345,7 +2353,7 @@ HB_FUNC( ADSDELETEFILE ) { #if ADS_LIB_VERSION >= 600 hb_retl( AdsDeleteFile( HB_ADS_PARCONNECTION( 2 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucFilename */ ) == AE_SUCCESS ); + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucFilename */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); #endif @@ -2363,8 +2371,8 @@ HB_FUNC( ADSSTMTSETTABLEPASSWORD ) if( pArea && pArea->hStatement ) hb_retnl( AdsStmtSetTablePassword( pArea->hStatement, - ( UNSIGNED8 * ) pucTableName, - ( UNSIGNED8 * ) pucPassword ) ); + ( UNSIGNED8 * ) HB_UNCONST( pucTableName) , + ( UNSIGNED8 * ) HB_UNCONST( pucPassword ) ) ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); } @@ -2413,22 +2421,22 @@ HB_FUNC( ADSCREATEFTSINDEX ) if( pArea ) hb_retnl( AdsCreateFTSIndex( pArea->hTable, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucFileName */ , /* if NULL or the base name is the same as the table, then creates a compound AutoOpen index. */ - ( UNSIGNED8 * ) hb_parc( 2 ) /* pucTag */ , - ( UNSIGNED8 * ) hb_parc( 3 ) /* pucField */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucFileName */ , /* if NULL or the base name is the same as the table, then creates a compound AutoOpen index. */ + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 2 ) ) /* pucTag */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ) /* pucField */ , ( UNSIGNED32 ) hb_parnldef( 4, ADS_DEFAULT ) /* ulPageSize */ , ( UNSIGNED32 ) hb_parnldef( 5, 3 ) /* ulMinWordLen */ , ( UNSIGNED32 ) hb_parnldef( 6, 30 ) /* ulMaxWordLen */ , ( UNSIGNED16 ) hb_parldef( 7, HB_TRUE ) /* usUseDefaultDelim */ , - ( UNSIGNED8 * ) hb_parc( 8 ) /* pucDelimiters */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 8 ) ) /* pucDelimiters */ , ( UNSIGNED16 ) hb_parldef( 9, HB_TRUE ) /* usUseDefaultNoise */ , - ( UNSIGNED8 * ) hb_parc( 10 ) /* pucNoiseWords */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 10 ) ) /* pucNoiseWords */ , ( UNSIGNED16 ) hb_parldef( 11, HB_TRUE ) /* usUseDefaultDrop */ , - ( UNSIGNED8 * ) hb_parc( 12 ) /* pucDropChars */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 12 ) ) /* pucDropChars */ , ( UNSIGNED16 ) hb_parldef( 13, HB_TRUE ) /* usUseDefaultConditionals */ , - ( UNSIGNED8 * ) hb_parc( 14 ) /* pucConditionalChars */ , - ( UNSIGNED8 * ) hb_parc( 15 ) /* pucReserved1 */ , - ( UNSIGNED8 * ) hb_parc( 16 ) /* pucReserved2 */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 14 ) ) /* pucConditionalChars */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 15 ) ) /* pucReserved1 */ , + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 16 ) ) /* pucReserved2 */ , ( UNSIGNED32 ) hb_parnldef( 17, ADS_DEFAULT ) /* ulOptions */ ) ); else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); @@ -2441,7 +2449,7 @@ HB_FUNC( ADSCREATESAVEPOINT ) { #if ADS_LIB_VERSION >= 800 hb_retnl( AdsCreateSavepoint( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parc( 2 ) /* pucSavepoint */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 2 ) ) /* pucSavepoint */, ( UNSIGNED32 ) hb_parnldef( 3, ADS_DEFAULT ) /* ulOptions */ ) ); #else hb_retnl( 0 ); @@ -2452,7 +2460,7 @@ HB_FUNC( ADSROLLBACKSAVEPOINT ) { #if ADS_LIB_VERSION >= 800 hb_retnl( AdsRollbackTransaction80( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parc( 2 ) /* pucSavepoint */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 2 ) ) /* pucSavepoint */, ( UNSIGNED32 ) hb_parnldef( 3, ADS_DEFAULT ) /* ulOptions */ ) ); #else hb_retnl( 0 ); @@ -2463,10 +2471,10 @@ HB_FUNC( ADSDDCREATELINK ) { #if ADS_LIB_VERSION >= 900 hb_retl( AdsDDCreateLink( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucLinkAlias */, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pucServerPath */, - ( UNSIGNED8 * ) hb_parc( 4 ) /* pucUserName */, - ( UNSIGNED8 * ) hb_parc( 5 ) /* pucPassword */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucLinkAlias */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pucServerPath */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 4 ) ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 5 ) ) /* pucPassword */, ( UNSIGNED32 ) hb_parnldef( 6, ADS_DEFAULT ) /* ulOptions */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); @@ -2477,10 +2485,10 @@ HB_FUNC( ADSDDMODIFYLINK ) { #if ADS_LIB_VERSION >= 900 hb_retl( AdsDDModifyLink( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucLinkAlias */, - ( UNSIGNED8 * ) hb_parcx( 3 ) /* pucServerPath */, - ( UNSIGNED8 * ) hb_parc( 4 ) /* pucUserName */, - ( UNSIGNED8 * ) hb_parc( 5 ) /* pucPassword */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucLinkAlias */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 3 ) ) /* pucServerPath */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 4 ) ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 5 ) ) /* pucPassword */, ( UNSIGNED32 ) hb_parnldef( 6, ADS_DEFAULT ) /* ulOptions */ ) == AE_SUCCESS ); #else hb_retl( HB_FALSE ); @@ -2490,9 +2498,9 @@ HB_FUNC( ADSDDMODIFYLINK ) HB_FUNC( ADSDDDROPLINK ) { #if ADS_LIB_VERSION >= 900 - hb_retl( AdsDDDropLink( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, - ( UNSIGNED8 * ) hb_parcx( 2 ) /* pucLinkAlias */, - ( UNSIGNED16 ) hb_parl( 3 ) /* usDropGlobal */ ) == AE_SUCCESS ); /* NOTE: Defaults to 0/HB_FALSE for non logical parameters. */ + hb_retl( AdsDDDropLink( HB_ADS_PARCONNECTION( 1 ) /* hConnect */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 2 ) ) /* pucLinkAlias */, + ( UNSIGNED16 ) hb_parl( 3 ) /* usDropGlobal */ ) == AE_SUCCESS ); /* NOTE: Defaults to 0/HB_FALSE for non logical parameters. */ #else hb_retl( HB_FALSE ); #endif diff --git a/contrib/rddads/adsmgmnt.c b/contrib/rddads/adsmgmnt.c index b82fd05c94..b34eebc496 100644 --- a/contrib/rddads/adsmgmnt.c +++ b/contrib/rddads/adsmgmnt.c @@ -54,9 +54,9 @@ static ADSHANDLE s_hMgmtHandle = 0; HB_FUNC( ADSMGCONNECT ) { - hb_retnl( AdsMgConnect( ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucServerName */, - ( UNSIGNED8 * ) hb_parc( 2 ) /* pucUserName */, - ( UNSIGNED8 * ) hb_parc( 3 ) /* pucPassword */, + hb_retnl( AdsMgConnect( ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucServerName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 2 ) ) /* pucUserName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 3 ) ) /* pucPassword */, &s_hMgmtHandle ) ); } @@ -81,7 +81,7 @@ HB_FUNC( ADSMGSETHANDLE ) HB_FUNC( ADSMGKILLUSER ) { hb_retnl( ( UNSIGNED16 ) AdsMgKillUser( s_hMgmtHandle, - ( UNSIGNED8 * ) hb_parc( 1 ), + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ), ( UNSIGNED16 ) hb_parni( 2 ) ) ); } @@ -369,7 +369,7 @@ HB_FUNC( ADSMGGETUSERNAMES ) ADS_MGMT_USER_INFO * pastUserInfo = ( ADS_MGMT_USER_INFO * ) hb_xgrab( sizeof( ADS_MGMT_USER_INFO ) * usArrayLen ); if( AdsMgGetUserNames( s_hMgmtHandle, - ( UNSIGNED8 * ) hb_parc( 1 ) /* pucFileName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parc( 1 ) ) /* pucFileName */, pastUserInfo, &usArrayLen, &usStructSize ) == AE_SUCCESS ) @@ -433,7 +433,7 @@ HB_FUNC( ADSMGGETLOCKOWNER ) ADS_MGMT_USER_INFO * pstUserInfo = ( ADS_MGMT_USER_INFO * ) hb_xgrab( sizeof( ADS_MGMT_USER_INFO ) ); if( AdsMgGetLockOwner( s_hMgmtHandle, - ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucTableName */, + ( UNSIGNED8 * ) HB_UNCONST( hb_parcx( 1 ) ) /* pucTableName */, ( UNSIGNED32 ) hb_parnl( 2 ) /* ulRecordNumber */, pstUserInfo, &usStructSize, @@ -471,7 +471,7 @@ HB_FUNC( ADSMGGETOPENTABLES ) /* nMaxNumberOfFilesToReturn, cUserName, nConnecti ADS_MGMT_TABLE_INFO * astOpenTableInfo = ( ADS_MGMT_TABLE_INFO * ) hb_xgrab( sizeof( ADS_MGMT_TABLE_INFO ) * usArrayLen ); if( AdsMgGetOpenTables( s_hMgmtHandle, - ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? hb_parc( 2 ) : NULL ) /* pucUserName */, + ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? HB_UNCONST( hb_parc( 2 ) ) : NULL ) /* pucUserName */, ( UNSIGNED16 ) hb_parni( 3 ) /* usConnNumber */, /* = HB_ADS_PARCONNECTION( 3 ) only valid for netware so don't default to current, only take a passed value */ astOpenTableInfo, &usArrayLen, @@ -503,7 +503,7 @@ HB_FUNC( ADSMGGETOPENTABLES2 ) /* nMaxNumberOfFilesToReturn, cUserName, nConnect ADS_MGMT_TABLE_INFO * astOpenTableInfo = ( ADS_MGMT_TABLE_INFO * ) hb_xgrab( sizeof( ADS_MGMT_TABLE_INFO ) * usArrayLen ); if( AdsMgGetOpenTables( s_hMgmtHandle, - ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? hb_parc( 2 ) : NULL ) /* pucUserName */, + ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? HB_UNCONST( hb_parc( 2 ) ) : NULL ) /* pucUserName */, ( UNSIGNED16 ) hb_parni( 3 ) /* usConnNumber */, /* = HB_ADS_PARCONNECTION( 3 ) only valid for netware so don't default to current, only take a passed value */ astOpenTableInfo, &usArrayLen, @@ -541,8 +541,8 @@ HB_FUNC( ADSMGGETOPENINDEXES ) /* nMaxNumberOfFilesToReturn, cTableName, cUserNa ADS_MGMT_INDEX_INFO * astOpenIndexInfo = ( ADS_MGMT_INDEX_INFO * ) hb_xgrab( sizeof( ADS_MGMT_INDEX_INFO ) * usArrayLen ); if( AdsMgGetOpenIndexes( s_hMgmtHandle, - ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? hb_parc( 2 ) : NULL ) /* pucTableName */, /* fully qualified path to that table */ - ( UNSIGNED8 * ) ( hb_parclen( 3 ) > 0 ? hb_parc( 3 ) : NULL ) /* pucUserName */, + ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? HB_UNCONST( hb_parc( 2 ) ) : NULL ) /* pucTableName */, /* fully qualified path to that table */ + ( UNSIGNED8 * ) ( hb_parclen( 3 ) > 0 ? HB_UNCONST( hb_parc( 3 ) ) : NULL ) /* pucUserName */, ( UNSIGNED16 ) hb_parni( 4 ) /* usConnNumber */, /* = HB_ADS_PARCONNECTION( 4 ) only valid for netware so don't default to current, only take a passed value */ astOpenIndexInfo, &usArrayLen, @@ -574,8 +574,8 @@ HB_FUNC( ADSMGGETLOCKS ) ADS_MGMT_RECORD_INFO * astRecordInfo = ( ADS_MGMT_RECORD_INFO * ) hb_xgrab( sizeof( ADS_MGMT_RECORD_INFO ) * usArrayLen ); if( AdsMgGetLocks( s_hMgmtHandle, - ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? hb_parc( 2 ) : NULL ) /* pucTableName */, /* fully qualified path to that table */ - ( UNSIGNED8 * ) ( hb_parclen( 3 ) > 0 ? hb_parc( 3 ) : NULL ) /* pucUserName */, + ( UNSIGNED8 * ) ( hb_parclen( 2 ) > 0 ? HB_UNCONST( hb_parc( 2 ) ) : NULL ) /* pucTableName */, /* fully qualified path to that table */ + ( UNSIGNED8 * ) ( hb_parclen( 3 ) > 0 ? HB_UNCONST( hb_parc( 3 ) ) : NULL ) /* pucUserName */, ( UNSIGNED16 ) hb_parni( 4 ) /* usConnNumber */, /* = HB_ADS_PARCONNECTION( 4 ) only valid for netware so don't default to current, only take a passed value */ astRecordInfo, &usArrayLen, diff --git a/contrib/rddads/adsx.c b/contrib/rddads/adsx.c index c0ec978e5b..378c402e79 100644 --- a/contrib/rddads/adsx.c +++ b/contrib/rddads/adsx.c @@ -1096,7 +1096,7 @@ static HB_ERRCODE adsxOrderCreate( ADSXAREAP pArea, LPDBORDERCREATEINFO pOrderIn /* Test key expression */ bValidExpr = 0; - AdsIsExprValid( pArea->adsarea.hTable, ( UNSIGNED8 * ) hb_itemGetCPtr( pOrderInfo->abExpr ), &bValidExpr ); + AdsIsExprValid( pArea->adsarea.hTable, ( UNSIGNED8 * ) HB_UNCONST( hb_itemGetCPtr( pOrderInfo->abExpr ) ), &bValidExpr ); bKeyADS = bValidExpr; if( pArea->adsarea.area.lpdbOrdCondInfo ) @@ -1144,8 +1144,8 @@ static HB_ERRCODE adsxOrderCreate( ADSXAREAP pArea, LPDBORDERCREATEINFO pOrderIn #if ADS_LIB_VERSION >= 610 u32RetVal = AdsCreateIndex61( pArea->adsarea.area.lpdbOrdCondInfo->fUseCurrent ? pArea->adsarea.hOrdCurrent : pArea->adsarea.hTable, - ( UNSIGNED8 * ) pOrderInfo->abBagName, - ( UNSIGNED8 * ) pOrderInfo->atomBagName, + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->abBagName ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->atomBagName ), szKeyExpr[ 0 ] ? szKeyExpr : ( UNSIGNED8 * ) "1", bForADS ? ( UNSIGNED8 * ) pArea->adsarea.area.lpdbOrdCondInfo->abFor : NULL, bWhileADS ? ( UNSIGNED8 * ) pArea->adsarea.area.lpdbOrdCondInfo->abWhile : NULL, @@ -1153,8 +1153,8 @@ static HB_ERRCODE adsxOrderCreate( ADSXAREAP pArea, LPDBORDERCREATEINFO pOrderIn #else u32RetVal = AdsCreateIndex( pArea->adsarea.area.lpdbOrdCondInfo->fUseCurrent ? pArea->adsarea.hOrdCurrent : pArea->adsarea.hTable, - ( UNSIGNED8 * ) pOrderInfo->abBagName, - ( UNSIGNED8 * ) pOrderInfo->atomBagName, + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->abBagName ), + ( UNSIGNED8 * ) HB_UNCONST( pOrderInfo->atomBagName ), szKeyExpr[ 0 ] ? szKeyExpr : ( UNSIGNED8 * ) "1", bForADS ? ( UNSIGNED8 * ) pArea->adsarea.area.lpdbOrdCondInfo->abFor : NULL, bWhileADS ? ( UNSIGNED8 * ) pArea->adsarea.area.lpdbOrdCondInfo->abWhile : NULL, diff --git a/contrib/rddads/rddads.h b/contrib/rddads/rddads.h index 8a1cc8317a..61e9f2fa0f 100644 --- a/contrib/rddads/rddads.h +++ b/contrib/rddads/rddads.h @@ -212,8 +212,8 @@ extern ADSAREAP hb_adsGetWorkAreaPointer( void ); UNSIGNED32 * pulLen ); #else -# define hb_adsOemToAnsi( s, l ) ( ( char * ) ( s ) ) -# define hb_adsAnsiToOem( s, l ) ( ( char * ) ( s ) ) +# define hb_adsOemToAnsi( s, l ) ( ( char * ) HB_UNCONST( s ) ) +# define hb_adsAnsiToOem( s, l ) ( ( char * ) HB_UNCONST( s ) ) # define hb_adsOemAnsiFree( s ) #endif diff --git a/contrib/sddodbc/core.c b/contrib/sddodbc/core.c index 305c2781f8..1641bb7a2d 100644 --- a/contrib/sddodbc/core.c +++ b/contrib/sddodbc/core.c @@ -89,6 +89,9 @@ typedef unsigned long SQLULEN; #define O_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStrU16( itm, HB_CDP_ENDIAN_NATIVE, phstr, plen ) #define O_HB_ITEMPUTSTR( itm, str ) hb_itemPutStrU16( itm, HB_CDP_ENDIAN_NATIVE, str ) #define O_HB_ITEMPUTSTRLEN( itm, str, len ) hb_itemPutStrLenU16( itm, HB_CDP_ENDIAN_NATIVE, str, len ) + #define O_HB_CHARDUP( str ) hb_osStrU16Encode( str ) + #define O_HB_OSSTRDUP( str ) hb_osStrU16Decode( str ) + #define O_HB_STRLEN( str ) hb_wstrlen( str ) #define O_HB_CHAR HB_WCHAR #else #define O_HB_ARRAYGETSTR( arr, n, phstr, plen ) hb_arrayGetStr( arr, n, hb_setGetOSCP(), phstr, plen ) @@ -96,6 +99,9 @@ typedef unsigned long SQLULEN; #define O_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStr( itm, hb_setGetOSCP(), phstr, plen ) #define O_HB_ITEMPUTSTR( itm, str ) hb_itemPutStr( itm, hb_setGetOSCP(), str ) #define O_HB_ITEMPUTSTRLEN( itm, str, len ) hb_itemPutStrLen( itm, hb_setGetOSCP(), str, len ) + #define O_HB_CHARDUP( str ) hb_osStrEncode( str ) + #define O_HB_OSSTRDUP( str ) hb_osStrDecode( str ) + #define O_HB_STRLEN( str ) strlen( str ) #define O_HB_CHAR char #endif @@ -235,16 +241,19 @@ static HB_ERRCODE odbcConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) if( SQL_SUCCEEDED( SQLAllocConnect( hEnv, &hConnect ) ) ) #endif { - void * hConnStr; - SQLTCHAR cBuffer[ 1024 ]; - SQLSMALLINT iLen = HB_SIZEOFARRAY( cBuffer ); + const O_HB_CHAR * pchConStr; + void * hConnStr; + HB_SIZE nConnLen; + SQLTCHAR cBuffer[ 1024 ]; + SQLSMALLINT iLen = HB_SIZEOFARRAY( cBuffer ); cBuffer[ 0 ] = '\0'; + pchConStr = O_HB_ARRAYGETSTR( pItem, 2, &hConnStr, &nConnLen ); if( SQL_SUCCEEDED( SQLDriverConnect( hConnect, NULL, - ( SQLTCHAR * ) O_HB_ARRAYGETSTR( pItem, 2, &hConnStr, NULL ), - ( SQLSMALLINT ) hb_arrayGetCLen( pItem, 2 ), + ( SQLTCHAR * ) HB_UNCONST( pchConStr ), + ( SQLSMALLINT ) nConnLen, cBuffer, HB_SIZEOFARRAY( cBuffer ), &iLen, @@ -310,12 +319,15 @@ static HB_ERRCODE odbcDisconnect( SQLDDCONNECTION * pConnection ) static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) { - SDDCONN * pSDDConn = ( SDDCONN * ) pConnection->pSDDConn; - void * hStatement; - SQLHSTMT hStmt; - SQLLEN iCount; - char * szError; - HB_ERRCODE errCode; + SDDCONN * pSDDConn = ( SDDCONN * ) pConnection->pSDDConn; + const O_HB_CHAR * pchStatement; + void * hStatement; + HB_SIZE nStatementLen; + SQLHSTMT hStmt; + SQLLEN iCount; + char * szError; + HB_ERRCODE errCode; + SQLRETURN result; #if ODBCVER >= 0x0300 if( ! SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_STMT, pSDDConn->hConn, &hStmt ) ) ) @@ -329,11 +341,14 @@ static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) return HB_FAILURE; } - if( SQL_SUCCEEDED( SQLExecDirect( hStmt, - ( SQLTCHAR * ) O_HB_ITEMGETSTR( pItem, &hStatement, NULL ), - ( SQLINTEGER ) hb_itemGetCLen( pItem ) ) ) ) + pchStatement = O_HB_ITEMGETSTR( pItem, &hStatement, &nStatementLen ); + result = SQLExecDirect( hStmt, + ( SQLTCHAR * ) HB_UNCONST( pchStatement ), + ( SQLINTEGER ) nStatementLen ); + hb_strfree( hStatement ); + + if( SQL_SUCCEEDED( result ) ) { - hb_strfree( hStatement ); if( SQL_SUCCEEDED( SQLRowCount( hStmt, &iCount ) ) ) { @@ -347,8 +362,6 @@ static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) return HB_SUCCESS; } } - else - hb_strfree( hStatement ); szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, &errCode ); hb_rddsqlSetError( errCode, szError, hb_itemGetCPtr( pItem ), NULL, errCode ); @@ -366,7 +379,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) { SDDCONN * pSDDConn = ( SDDCONN * ) pArea->pConnection->pSDDConn; SDDDATA * pSDDData; - void * hQuery; + O_HB_CHAR * pchQuery; SQLHSTMT hStmt; SQLSMALLINT iNameLen; PHB_ITEM pItemEof, pItem; @@ -374,6 +387,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) HB_USHORT uiFields, uiIndex; HB_ERRCODE errCode; char * szError; + SQLRETURN result; pArea->pSDDData = memset( hb_xgrab( sizeof( SDDDATA ) ), 0, sizeof( SDDDATA ) ); pSDDData = ( SDDDATA * ) pArea->pSDDData; @@ -390,14 +404,14 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) return HB_FAILURE; } - pItem = hb_itemPutC( NULL, pArea->szQuery ); + pchQuery = O_HB_CHARDUP( pArea->szQuery ); + result = SQLExecDirect( hStmt, + ( SQLTCHAR * ) HB_UNCONST( pchQuery ), + ( SQLINTEGER ) O_HB_STRLEN( pchQuery ) ); + hb_xfree( pchQuery ); - if( ! SQL_SUCCEEDED( SQLExecDirect( hStmt, - ( SQLTCHAR * ) O_HB_ITEMGETSTR( pItem, &hQuery, NULL ), - ( SQLINTEGER ) hb_itemGetCLen( pItem ) ) ) ) + if( ! SQL_SUCCEEDED( result ) ) { - hb_strfree( hQuery ); - hb_itemRelease( pItem ); szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, &errCode ); #if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); @@ -408,11 +422,6 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) hb_xfree( szError ); return HB_FAILURE; } - else - { - hb_strfree( hQuery ); - hb_itemRelease( pItem ); - } if( ! SQL_SUCCEEDED( SQLNumResultCols( hStmt, &iNameLen ) ) ) { @@ -431,6 +440,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) SELF_SETFIELDEXTENT( &pArea->area, uiFields ); pItemEof = hb_itemArrayNew( uiFields ); + pItem = hb_itemNew( NULL ); #if 0 HB_TRACE( HB_TR_ALWAYS, ( "fieldcount=%d", iNameLen ) ); @@ -441,16 +451,17 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) for( uiIndex = 0; uiIndex < uiFields; uiIndex++ ) { DBFIELDINFO dbFieldInfo; - - PHB_ITEM pName; - + char * pszName; SQLTCHAR cName[ 256 ]; SQLULEN uiSize; SQLSMALLINT iDataType, iDec, iNull; - if( ! SQL_SUCCEEDED( SQLDescribeCol( hStmt, ( SQLSMALLINT ) uiIndex + 1, ( SQLTCHAR * ) cName, HB_SIZEOFARRAY( cName ), &iNameLen, &iDataType, &uiSize, &iDec, &iNull ) ) ) + if( ! SQL_SUCCEEDED( SQLDescribeCol( hStmt, ( SQLSMALLINT ) uiIndex + 1, + cName, HB_SIZEOFARRAY( cName ), + &iNameLen, &iDataType, &uiSize, &iDec, &iNull ) ) ) { hb_itemRelease( pItemEof ); + hb_itemRelease( pItem ); szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, NULL ); #if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); @@ -464,8 +475,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) memset( &dbFieldInfo, 0, sizeof( dbFieldInfo ) ); - pName = O_HB_ITEMPUTSTRLEN( NULL, ( O_HB_CHAR * ) cName, iNameLen ); - dbFieldInfo.atomName = hb_itemGetCPtr( pName ); + dbFieldInfo.atomName = pszName = O_HB_OSSTRDUP( ( O_HB_CHAR * ) cName ); /* We do mapping of many SQL types to one Harbour field type here, so, we need store @@ -573,64 +583,64 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) memset( pStr, ' ', dbFieldInfo.uiLen ); pStr[ dbFieldInfo.uiLen ] = '\0'; - pItem = hb_itemPutCL( NULL, pStr, dbFieldInfo.uiLen ); + hb_itemPutCL( pItem, pStr, dbFieldInfo.uiLen ); hb_xfree( pStr ); break; } case HB_FT_MEMO: - pItem = hb_itemPutC( NULL, NULL ); + hb_itemPutC( pItem, NULL ); break; case HB_FT_INTEGER: - pItem = hb_itemPutNI( NULL, 0 ); + hb_itemPutNI( pItem, 0 ); break; case HB_FT_LONG: if( dbFieldInfo.uiDec == 0 ) - pItem = hb_itemPutNLLen( NULL, 0, dbFieldInfo.uiLen ); + hb_itemPutNLLen( pItem, 0, dbFieldInfo.uiLen ); else - pItem = hb_itemPutNDLen( NULL, 0.0, dbFieldInfo.uiLen, dbFieldInfo.uiDec ); + hb_itemPutNDLen( pItem, 0.0, dbFieldInfo.uiLen, dbFieldInfo.uiDec ); break; case HB_FT_DOUBLE: - pItem = hb_itemPutNDLen( NULL, 0.0, dbFieldInfo.uiLen, dbFieldInfo.uiDec ); + hb_itemPutNDLen( pItem, 0.0, dbFieldInfo.uiLen, dbFieldInfo.uiDec ); break; case HB_FT_LOGICAL: - pItem = hb_itemPutL( NULL, HB_FALSE ); + hb_itemPutL( pItem, HB_FALSE ); break; case HB_FT_DATE: - pItem = hb_itemPutDL( NULL, 0 ); + hb_itemPutDL( pItem, 0 ); break; case HB_FT_TIME: - pItem = hb_itemPutTDT( NULL, 0, 0 ); + hb_itemPutTDT( pItem, 0, 0 ); break; case HB_FT_TIMESTAMP: - pItem = hb_itemPutTDT( NULL, 0, 0 ); + hb_itemPutTDT( pItem, 0, 0 ); break; default: - pItem = hb_itemNew( NULL ); + hb_itemClear( pItem ); bError = HB_TRUE; break; } hb_arraySetForward( pItemEof, uiIndex + 1, pItem ); - hb_itemRelease( pItem ); if( ! bError ) bError = ( SELF_ADDFIELD( &pArea->area, &dbFieldInfo ) == HB_FAILURE ); - } - hb_itemRelease( pName ); + hb_xfree( pszName ); + } if( bError ) break; } + hb_itemRelease( pItem ); if( bError ) { @@ -696,10 +706,10 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) } pArray = hb_itemArrayNew( pArea->area.uiFieldCount ); + pItem = NULL; for( ui = 1; ui <= pArea->area.uiFieldCount; ui++ ) { iLen = SQL_NULL_DATA; - pItem = NULL; res = 0; pField = pArea->area.lpFields + ui - 1; switch( pField->uiType ) @@ -716,7 +726,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { char * val = ( char * ) hb_xgrab( iLen + 1 ); if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_BINARY, val, iLen + 1, &iLen ) ) ) - pItem = hb_itemPutCLPtr( NULL, val, ( HB_SIZE ) iLen ); + pItem = hb_itemPutCLPtr( pItem, val, ( HB_SIZE ) iLen ); else hb_xfree( val ); } @@ -742,7 +752,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) #if defined( UNICODE ) iLen >>= 1; #endif - pItem = O_HB_ITEMPUTSTRLEN( NULL, val, ( HB_SIZE ) iLen ); + pItem = O_HB_ITEMPUTSTRLEN( pItem, val, ( HB_SIZE ) iLen ); } hb_xfree( val ); } @@ -757,14 +767,14 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) HB_I64 val = 0; /* NOTE: SQL_C_SBIGINT not available before ODBC 3.0 */ if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_SBIGINT, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutNIntLen( NULL, val, pField->uiLen ); + pItem = hb_itemPutNIntLen( pItem, val, pField->uiLen ); } else #endif { SQLINTEGER val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_LONG, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutNLLen( NULL, val, pField->uiLen ); + pItem = hb_itemPutNLLen( pItem, val, pField->uiLen ); } break; @@ -773,13 +783,13 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { SQLINTEGER val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_LONG, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutNLLen( NULL, val, pField->uiLen ); + pItem = hb_itemPutNLLen( pItem, val, pField->uiLen ); } else { double val = 0.0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DOUBLE, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutNDLen( NULL, val, pField->uiLen, pField->uiDec ); + pItem = hb_itemPutNDLen( pItem, val, pField->uiLen, pField->uiDec ); } break; @@ -787,7 +797,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { double val = 0.0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DOUBLE, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutNDLen( NULL, val, pField->uiLen, pField->uiDec ); + pItem = hb_itemPutNDLen( pItem, val, pField->uiLen, pField->uiDec ); break; } @@ -795,7 +805,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { unsigned char val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_BIT, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutL( NULL, val != 0 ); + pItem = hb_itemPutL( pItem, val != 0 ); break; } @@ -803,7 +813,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { DATE_STRUCT val = { 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DATE, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutD( NULL, val.year, val.month, val.day ); + pItem = hb_itemPutD( pItem, val.year, val.month, val.day ); break; } @@ -811,7 +821,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { TIME_STRUCT val = { 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_TIME, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutTDT( NULL, 0, hb_timeEncode( val.hour, val.minute, val.second, 0 ) ); + pItem = hb_itemPutTDT( pItem, 0, hb_timeEncode( val.hour, val.minute, val.second, 0 ) ); break; } @@ -819,7 +829,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { TIMESTAMP_STRUCT val = { 0, 0, 0, 0, 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_TIMESTAMP, &val, sizeof( val ), &iLen ) ) ) - pItem = hb_itemPutTDT( NULL, hb_dateEncode( val.year, val.month, val.day ), + pItem = hb_itemPutTDT( pItem, hb_dateEncode( val.year, val.month, val.day ), hb_timeEncode( val.hour, val.minute, val.second, val.fraction / 1000000 ) ); break; } @@ -829,19 +839,18 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) /* TODO: check for SQL_NO_TOTAL. What does this mean? */ HB_SYMBOL_UNUSED( res ); - /* NULL -> NIL */ - if( iLen == SQL_NULL_DATA ) - { - hb_itemRelease( pItem ); - pItem = NULL; - } - if( pItem ) { - hb_arraySetForward( pArray, ui, pItem ); - hb_itemRelease( pItem ); + /* NULL -> NIL */ + if( iLen == SQL_NULL_DATA ) + hb_itemClear( pItem ); + else + hb_arraySetForward( pArray, ui, pItem ); } } + if( pItem ) + hb_itemRelease( pItem ); + if( pArea->ulRecCount + 1 >= pArea->ulRecMax ) { pArea->pRow = ( void ** ) hb_xrealloc( pArea->pRow, ( pArea->ulRecMax + SQLDD_ROWSET_RESIZE ) * sizeof( void * ) ); diff --git a/contrib/xhb/cstructc.c b/contrib/xhb/cstructc.c index 9eec0815a1..910ebc4576 100644 --- a/contrib/xhb/cstructc.c +++ b/contrib/xhb/cstructc.c @@ -70,12 +70,12 @@ static PHB_ITEM hb_itemPutCRaw( PHB_ITEM pItem, const char * szText, HB_SIZE nLe if( nLen == 0 ) { if( szText ) - hb_xfree( ( void * ) szText ); + hb_xfree( HB_UNCONST( szText ) ); szText = ""; } pItem->type = HB_IT_STRING; pItem->item.asString.length = nLen; - pItem->item.asString.value = ( char * ) szText; + pItem->item.asString.value = ( char * ) HB_UNCONST( szText ); pItem->item.asString.allocated = nLen; return pItem; @@ -97,7 +97,7 @@ static PHB_ITEM hb_itemPutCRawStatic( PHB_ITEM pItem, const char * szText, HB_SI pItem->type = HB_IT_STRING; pItem->item.asString.allocated = 0; pItem->item.asString.length = nLen; - pItem->item.asString.value = ( char * ) szText; + pItem->item.asString.value = ( char * ) HB_UNCONST( szText ); return pItem; } @@ -1412,7 +1412,7 @@ HB_FUNC( HB_STRING2POINTER ) const char * pszString = hb_parc( 1 ); if( pszString ) - hb_retptr( ( void * ) pszString ); + hb_retptr( HB_UNCONST( pszString ) ); else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); } diff --git a/include/hbapi.h b/include/hbapi.h index d92c933b73..b7e4eadd10 100644 --- a/include/hbapi.h +++ b/include/hbapi.h @@ -555,7 +555,7 @@ extern void * hb_xRefResize( void * pMem, HB_SIZE nSave, HB_SIZE nSize, HB_S #else /* NOTE: otherwise, the hb_xmemcpy and hb_xmemset functions will be used to copy and/or set HB_SIZE data blocks */ -extern HB_EXPORT void * hb_xmemcpy( void * pDestArg, void * pSourceArg, HB_SIZE nLen ); /* copy more than memcpy() can */ +extern HB_EXPORT void * hb_xmemcpy( void * pDestArg, const void * pSourceArg, HB_SIZE nLen ); /* copy more than memcpy() can */ extern HB_EXPORT void * hb_xmemset( void * pDestArg, int iFill, HB_SIZE nLen ); /* set more than memset() can */ #endif diff --git a/include/hbdefs.h b/include/hbdefs.h index 220d919449..85959c74b7 100644 --- a/include/hbdefs.h +++ b/include/hbdefs.h @@ -1463,6 +1463,9 @@ typedef HB_U32 HB_FATTR; #define HB_SIZEOFARRAY( var ) ( sizeof( var ) / sizeof( *var ) ) +#define HB_UNCONST( p ) ( ( void * ) ( HB_PTRUINT ) ( const void * ) ( p ) ) +#define HB_DECONST( c, p ) ( ( c ) HB_UNCONST( p ) ) + #if defined( __POCC__ ) || defined( __XCC__ ) #define HB_SYMBOL_UNUSED( symbol ) do if( symbol ) {;} while( 0 ) diff --git a/src/common/expropt1.c b/src/common/expropt1.c index 5f532724e5..31ba1d1d63 100644 --- a/src/common/expropt1.c +++ b/src/common/expropt1.c @@ -363,7 +363,7 @@ PHB_EXPR hb_compExprNewString( const char * szValue, HB_SIZE nLen, HB_BOOL fDeal pExpr = HB_COMP_EXPR_NEW( HB_ET_STRING ); - pExpr->value.asString.string = ( char * ) szValue; + pExpr->value.asString.string = ( char * ) HB_UNCONST( szValue ); pExpr->value.asString.dealloc = fDealloc; pExpr->nLength = nLen; pExpr->ValType = HB_EV_STRING; diff --git a/src/common/expropt2.c b/src/common/expropt2.c index 316762224c..f6cb017a07 100644 --- a/src/common/expropt2.c +++ b/src/common/expropt2.c @@ -2066,14 +2066,14 @@ HB_BOOL hb_compExprReduceCHR( PHB_EXPR pSelf, HB_COMP_DECL ) } else { - pExpr->value.asString.string = ( char * ) hb_szAscii[ ( int ) pArg->value.asNum.val.l & 0xff ]; + pExpr->value.asString.string = ( char * ) HB_UNCONST( hb_szAscii[ ( int ) pArg->value.asNum.val.l & 0xff ] ); pExpr->value.asString.dealloc = HB_FALSE; pExpr->nLength = 1; } } else { - pExpr->value.asString.string = ( char * ) hb_szAscii[ ( unsigned int ) pArg->value.asNum.val.d & 0xff ]; + pExpr->value.asString.string = ( char * ) HB_UNCONST( hb_szAscii[ ( unsigned int ) pArg->value.asNum.val.d & 0xff ] ); pExpr->value.asString.dealloc = HB_FALSE; pExpr->nLength = 1; } @@ -2099,9 +2099,9 @@ HB_BOOL hb_compExprReduceBCHAR( PHB_EXPR pSelf, HB_COMP_DECL ) pExpr->ValType = HB_EV_STRING; pExpr->value.asString.string = - ( char * ) hb_szAscii[ ( pArg->value.asNum.NumType == HB_ET_LONG ? - ( unsigned int ) pArg->value.asNum.val.l : - ( unsigned int ) pArg->value.asNum.val.d ) & 0xff ]; + ( char * ) HB_UNCONST( hb_szAscii[ ( pArg->value.asNum.NumType == HB_ET_LONG ? + ( unsigned int ) pArg->value.asNum.val.l : + ( unsigned int ) pArg->value.asNum.val.d ) & 0xff ] ); pExpr->value.asString.dealloc = HB_FALSE; pExpr->nLength = 1; @@ -2410,8 +2410,8 @@ HB_BOOL hb_compExprReduceUPPER( PHB_EXPR pSelf, HB_COMP_DECL ) { if( pArg->nLength == 1 ) { - szValue = ( char * ) hb_szAscii[ HB_TOUPPER( ( unsigned char ) - pArg->value.asString.string[ 0 ] ) ]; + szValue = ( char * ) HB_UNCONST( hb_szAscii[ HB_TOUPPER( ( unsigned char ) + pArg->value.asString.string[ 0 ] ) ] ); fDealloc = HB_FALSE; } else diff --git a/src/common/hbmem.c b/src/common/hbmem.c index 953be9140f..b522a19d0f 100644 --- a/src/common/hbmem.c +++ b/src/common/hbmem.c @@ -58,17 +58,17 @@ #if UINT_MAX != ULONG_MAX */ #ifndef hb_xmemcpy -void * hb_xmemcpy( void * pDestArg, void * pSourceArg, HB_SIZE nLen ) +void * hb_xmemcpy( void * pDestArg, const void * pSourceArg, HB_SIZE nLen ) { HB_BYTE * pDest; - HB_BYTE * pSource; - HB_SIZE nRemaining; - int iCopySize; + const HB_BYTE * pSource; + HB_SIZE nRemaining; + int iCopySize; HB_TRACE( HB_TR_DEBUG, ( "hb_xmemcpy(%p, %p, %" HB_PFS "u)", pDestArg, pSourceArg, nLen ) ); pDest = ( HB_BYTE * ) pDestArg; - pSource = ( HB_BYTE * ) pSourceArg; + pSource = ( const HB_BYTE * ) pSourceArg; nRemaining = nLen; while( nRemaining ) @@ -97,8 +97,8 @@ void * hb_xmemcpy( void * pDestArg, void * pSourceArg, HB_SIZE nLen ) void * hb_xmemset( void * pDestArg, int iFill, HB_SIZE nLen ) { HB_BYTE * pDest; - HB_SIZE nRemaining; - int iSetSize; + HB_SIZE nRemaining; + int iSetSize; HB_TRACE( HB_TR_DEBUG, ( "hb_xmemset(%p, %d, %" HB_PFS "u)", pDestArg, iFill, nLen ) ); diff --git a/src/compiler/complex.c b/src/compiler/complex.c index 38973dd03a..7b4d1fa568 100644 --- a/src/compiler/complex.c +++ b/src/compiler/complex.c @@ -251,7 +251,7 @@ static int hb_comp_keywordType( PHB_PP_TOKEN pToken ) { if( HB_PP_TOKEN_ALLOC( pToken->type ) && pToken->len == pKey->maxlen ) { - hb_xfree( ( void * ) pToken->value ); + hb_xfree( HB_UNCONST( pToken->value ) ); pToken->value = pKey->value; pToken->type |= HB_PP_TOKEN_STATIC; } @@ -277,7 +277,7 @@ static const char * hb_comp_tokenIdentifer( HB_COMP_DECL, PHB_PP_TOKEN pToken ) static const char * hb_comp_tokenString( YYSTYPE * yylval_ptr, HB_COMP_DECL, PHB_PP_TOKEN pToken ) { yylval_ptr->valChar.length = pToken->len; - yylval_ptr->valChar.string = ( char * ) pToken->value; + yylval_ptr->valChar.string = ( char * ) HB_UNCONST( pToken->value ); yylval_ptr->valChar.dealloc = HB_FALSE; if( HB_PP_TOKEN_ALLOC( pToken->type ) ) { @@ -285,7 +285,7 @@ static const char * hb_comp_tokenString( YYSTYPE * yylval_ptr, HB_COMP_DECL, PHB pToken->value = hb_compIdentifierNew( HB_COMP_PARAM, pToken->value, yylval_ptr->valChar.dealloc ? HB_IDENT_COPY : HB_IDENT_FREE ); if( ! yylval_ptr->valChar.dealloc ) - yylval_ptr->valChar.string = ( char * ) pToken->value; + yylval_ptr->valChar.string = ( char * ) HB_UNCONST( pToken->value ); pToken->type |= HB_PP_TOKEN_STATIC; } return pToken->value; diff --git a/src/compiler/harbour.y b/src/compiler/harbour.y index 8275ad3518..007c222bdf 100644 --- a/src/compiler/harbour.y +++ b/src/compiler/harbour.y @@ -467,7 +467,7 @@ Statement : ExecFlow CrlfStmnt CompTimeStr : LITERAL { if( $1.dealloc ) { - $1.string = ( char * ) hb_compIdentifierNew( HB_COMP_PARAM, $1.string, HB_IDENT_FREE ); + $1.string = ( char * ) HB_UNCONST( hb_compIdentifierNew( HB_COMP_PARAM, $1.string, HB_IDENT_FREE ) ); $1.dealloc = HB_FALSE; } hb_compModuleAdd( HB_COMP_PARAM, $1.string, HB_FALSE ); diff --git a/src/compiler/harbour.yyc b/src/compiler/harbour.yyc index 210853969f..a650ff26c0 100644 --- a/src/compiler/harbour.yyc +++ b/src/compiler/harbour.yyc @@ -184,7 +184,7 @@ static PHB_EXPR hb_compCheckPassByRef( HB_COMP_DECL, PHB_EXPR pExpr ); static void hb_compDebugStart( void ) { } -#line 190 "harboury.c" /* yacc.c:339 */ +#line 188 "harboury.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -336,7 +336,7 @@ extern int hb_comp_yydebug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 124 "harbour.y" /* yacc.c:355 */ +#line 122 "harbour.y" /* yacc.c:355 */ const char * string; /* to hold a string returned by lex */ int iNumber; /* to hold a temporary integer number */ @@ -375,7 +375,7 @@ union YYSTYPE } asCodeblock; PHB_VARTYPE asVarType; -#line 381 "harboury.c" /* yacc.c:355 */ +#line 379 "harboury.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -388,7 +388,7 @@ int hb_comp_yyparse (PHB_COMP pComp); #endif /* !YY_HB_COMP_YY_HARBOURY_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 163 "harbour.y" /* yacc.c:358 */ +#line 161 "harbour.y" /* yacc.c:358 */ /* This must be placed after the above union - the union is * typedef-ined to YYSTYPE @@ -396,7 +396,7 @@ int hb_comp_yyparse (PHB_COMP pComp); extern int yylex( YYSTYPE *, HB_COMP_DECL ); /* main lex token function, called by yyparse() */ extern void yyerror( HB_COMP_DECL, const char * ); /* parsing error management function */ -#line 402 "harboury.c" /* yacc.c:358 */ +#line 400 "harboury.c" /* yacc.c:358 */ #ifdef short # undef short @@ -704,68 +704,68 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 290, 290, 291, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 308, 311, 316, 324, - 324, 325, 325, 326, 326, 327, 327, 330, 331, 332, - 333, 336, 337, 338, 339, 342, 343, 346, 347, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 372, 373, 381, - 382, 383, 384, 385, 386, 392, 393, 394, 395, 396, - 397, 398, 399, 401, 401, 407, 408, 409, 422, 422, - 443, 445, 443, 449, 451, 449, 455, 456, 457, 458, - 459, 460, 460, 466, 469, 477, 496, 496, 499, 500, - 501, 502, 503, 504, 517, 518, 519, 520, 523, 524, - 525, 526, 529, 530, 533, 534, 537, 538, 541, 542, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 560, 561, 562, 563, 568, - 569, 572, 575, 578, 579, 584, 587, 592, 598, 603, - 608, 609, 612, 617, 620, 631, 634, 639, 642, 645, - 646, 649, 652, 653, 658, 661, 666, 667, 670, 675, - 678, 681, 682, 689, 690, 695, 696, 697, 698, 699, - 700, 701, 702, 703, 704, 705, 706, 707, 708, 711, - 712, 715, 716, 717, 718, 719, 720, 721, 722, 723, - 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, - 734, 743, 744, 745, 746, 747, 748, 753, 754, 755, - 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 773, 777, 780, 781, 785, - 788, 791, 792, 795, 796, 799, 800, 801, 802, 803, - 806, 807, 812, 813, 814, 820, 821, 824, 827, 832, - 835, 844, 845, 846, 847, 848, 849, 850, 851, 852, - 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, - 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, - 873, 874, 875, 878, 879, 880, 881, 882, 883, 886, - 887, 890, 891, 894, 895, 896, 897, 898, 899, 900, - 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, - 927, 933, 934, 937, 940, 941, 944, 945, 946, 949, - 952, 955, 958, 961, 964, 967, 970, 973, 974, 975, - 976, 977, 978, 981, 982, 983, 984, 985, 986, 989, - 990, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, - 1004, 1010, 1011, 1012, 1015, 1016, 1019, 1019, 1025, 1026, - 1027, 1028, 1031, 1032, 1035, 1036, 1040, 1043, 1039, 1046, - 1045, 1082, 1083, 1085, 1088, 1097, 1101, 1104, 1104, 1106, - 1106, 1108, 1108, 1110, 1110, 1120, 1121, 1124, 1125, 1133, - 1134, 1136, 1140, 1147, 1165, 1165, 1194, 1200, 1203, 1204, - 1205, 1208, 1208, 1215, 1216, 1219, 1220, 1223, 1223, 1226, - 1227, 1230, 1230, 1249, 1249, 1250, 1251, 1252, 1253, 1253, - 1256, 1257, 1260, 1261, 1262, 1263, 1266, 1266, 1285, 1285, - 1340, 1341, 1342, 1343, 1346, 1347, 1348, 1349, 1350, 1351, - 1352, 1355, 1356, 1359, 1362, 1363, 1364, 1365, 1366, 1367, - 1370, 1371, 1372, 1373, 1374, 1375, 1378, 1379, 1380, 1381, - 1382, 1383, 1384, 1385, 1388, 1389, 1390, 1391, 1395, 1397, - 1394, 1402, 1402, 1406, 1408, 1406, 1416, 1418, 1416, 1427, - 1435, 1436, 1439, 1443, 1447, 1450, 1456, 1463, 1464, 1467, - 1467, 1470, 1471, 1479, 1480, 1479, 1491, 1492, 1491, 1504, - 1504, 1504, 1506, 1506, 1511, 1516, 1510, 1530, 1539, 1543, - 1544, 1548, 1561, 1566, 1547, 1614, 1615, 1618, 1619, 1622, - 1630, 1631, 1632, 1633, 1636, 1637, 1640, 1641, 1644, 1645, - 1648, 1649, 1654, 1660, 1670, 1653, 1689, 1690, 1694, 1693, - 1706, 1713, 1721, 1722, 1726, 1725, 1736, 1737, 1746, 1746, - 1749, 1749, 1752, 1754, 1757, 1757, 1757, 1762, 1770, 1781, - 1791, 1761, 1822, 1823, 1826, 1827, 1835, 1836, 1839, 1848, - 1849, 1850, 1853, 1864, 1882, 1886, 1894, 1895, 1898, 1899, - 1900, 1901, 1902, 1905, 1906, 1907, 1908, 1909, 1913, 1912, - 1935, 1936, 1939, 1940 + 0, 288, 288, 289, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 306, 309, 314, 322, + 322, 323, 323, 324, 324, 325, 325, 328, 329, 330, + 331, 334, 335, 336, 337, 340, 341, 344, 345, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 370, 371, 379, + 380, 381, 382, 383, 384, 390, 391, 392, 393, 394, + 395, 396, 397, 399, 399, 405, 406, 407, 420, 420, + 441, 443, 441, 447, 449, 447, 453, 454, 455, 456, + 457, 458, 458, 464, 467, 475, 494, 494, 497, 498, + 499, 500, 501, 502, 515, 516, 517, 518, 521, 522, + 523, 524, 527, 528, 531, 532, 535, 536, 539, 540, + 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 560, 561, 566, + 567, 570, 573, 576, 577, 582, 585, 590, 596, 601, + 606, 607, 610, 615, 618, 629, 632, 637, 640, 643, + 644, 647, 650, 651, 656, 659, 664, 665, 668, 673, + 676, 679, 680, 687, 688, 693, 694, 695, 696, 697, + 698, 699, 700, 701, 702, 703, 704, 705, 706, 709, + 710, 713, 714, 715, 716, 717, 718, 719, 720, 721, + 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 741, 742, 743, 744, 745, 746, 751, 752, 753, + 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, + 764, 765, 766, 767, 768, 771, 775, 778, 779, 783, + 786, 789, 790, 793, 794, 797, 798, 799, 800, 801, + 804, 805, 810, 811, 812, 818, 819, 822, 825, 830, + 833, 842, 843, 844, 845, 846, 847, 848, 849, 850, + 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, + 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 876, 877, 878, 879, 880, 881, 884, + 885, 888, 889, 892, 893, 894, 895, 896, 897, 898, + 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, + 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, + 925, 931, 932, 935, 938, 939, 942, 943, 944, 947, + 950, 953, 956, 959, 962, 965, 968, 971, 972, 973, + 974, 975, 976, 979, 980, 981, 982, 983, 984, 987, + 988, 991, 992, 993, 994, 995, 996, 997, 998, 999, + 1002, 1008, 1009, 1010, 1013, 1014, 1017, 1017, 1023, 1024, + 1025, 1026, 1029, 1030, 1033, 1034, 1038, 1041, 1037, 1044, + 1043, 1080, 1081, 1083, 1086, 1095, 1099, 1102, 1102, 1104, + 1104, 1106, 1106, 1108, 1108, 1118, 1119, 1122, 1123, 1131, + 1132, 1134, 1138, 1145, 1163, 1163, 1192, 1198, 1201, 1202, + 1203, 1206, 1206, 1213, 1214, 1217, 1218, 1221, 1221, 1224, + 1225, 1228, 1228, 1247, 1247, 1248, 1249, 1250, 1251, 1251, + 1254, 1255, 1258, 1259, 1260, 1261, 1264, 1264, 1283, 1283, + 1338, 1339, 1340, 1341, 1344, 1345, 1346, 1347, 1348, 1349, + 1350, 1353, 1354, 1357, 1360, 1361, 1362, 1363, 1364, 1365, + 1368, 1369, 1370, 1371, 1372, 1373, 1376, 1377, 1378, 1379, + 1380, 1381, 1382, 1383, 1386, 1387, 1388, 1389, 1393, 1395, + 1392, 1400, 1400, 1404, 1406, 1404, 1414, 1416, 1414, 1425, + 1433, 1434, 1437, 1441, 1445, 1448, 1454, 1461, 1462, 1465, + 1465, 1468, 1469, 1477, 1478, 1477, 1489, 1490, 1489, 1502, + 1502, 1502, 1504, 1504, 1509, 1514, 1508, 1528, 1537, 1541, + 1542, 1546, 1559, 1564, 1545, 1612, 1613, 1616, 1617, 1620, + 1628, 1629, 1630, 1631, 1634, 1635, 1638, 1639, 1642, 1643, + 1646, 1647, 1652, 1658, 1668, 1651, 1687, 1688, 1692, 1691, + 1704, 1711, 1719, 1720, 1724, 1723, 1734, 1735, 1744, 1744, + 1747, 1747, 1750, 1752, 1755, 1755, 1755, 1760, 1768, 1779, + 1789, 1759, 1820, 1821, 1824, 1825, 1833, 1834, 1837, 1846, + 1847, 1848, 1851, 1862, 1880, 1884, 1892, 1893, 1896, 1897, + 1898, 1899, 1900, 1903, 1904, 1905, 1906, 1907, 1911, 1910, + 1933, 1934, 1937, 1938 }; #endif @@ -3588,15 +3588,15 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, PHB_COMP pComp) switch (yytype) { case 19: /* LITERAL */ -#line 286 "harbour.y" /* yacc.c:1257 */ +#line 284 "harbour.y" /* yacc.c:1257 */ { if( ((*yyvaluep).valChar).dealloc ) hb_xfree( ((*yyvaluep).valChar).string ); } -#line 3596 "harboury.c" /* yacc.c:1257 */ +#line 3594 "harboury.c" /* yacc.c:1257 */ break; case 96: /* CBSTART */ -#line 285 "harbour.y" /* yacc.c:1257 */ +#line 283 "harbour.y" /* yacc.c:1257 */ { if( ((*yyvaluep).asCodeblock).string ) hb_xfree( ((*yyvaluep).asCodeblock).string ); } -#line 3602 "harboury.c" /* yacc.c:1257 */ +#line 3600 "harboury.c" /* yacc.c:1257 */ break; @@ -3862,349 +3862,349 @@ yyreduce: switch (yyn) { case 9: -#line 299 "harbour.y" /* yacc.c:1646 */ +#line 297 "harbour.y" /* yacc.c:1646 */ { yyclearin; yyerrok; } -#line 3870 "harboury.c" /* yacc.c:1646 */ +#line 3868 "harboury.c" /* yacc.c:1646 */ break; case 15: -#line 305 "harbour.y" /* yacc.c:1646 */ +#line 303 "harbour.y" /* yacc.c:1646 */ { yyclearin; yyerrok; } -#line 3876 "harboury.c" /* yacc.c:1646 */ +#line 3874 "harboury.c" /* yacc.c:1646 */ break; case 16: -#line 309 "harbour.y" /* yacc.c:1646 */ +#line 307 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->currLine = ( int ) (yyvsp[-1].valLong).lNumber; HB_COMP_PARAM->pLex->fEol = HB_FALSE; } -#line 3883 "harboury.c" /* yacc.c:1646 */ +#line 3881 "harboury.c" /* yacc.c:1646 */ break; case 17: -#line 312 "harbour.y" /* yacc.c:1646 */ +#line 310 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->currModule = hb_compIdentifierNew( HB_COMP_PARAM, (yyvsp[-1].valChar).string, (yyvsp[-1].valChar).dealloc ? HB_IDENT_FREE : HB_IDENT_STATIC ); HB_COMP_PARAM->currLine = ( int ) (yyvsp[-2].valLong).lNumber; HB_COMP_PARAM->pLex->fEol = HB_FALSE; (yyvsp[-1].valChar).dealloc = HB_FALSE; } -#line 3892 "harboury.c" /* yacc.c:1646 */ +#line 3890 "harboury.c" /* yacc.c:1646 */ break; case 18: -#line 317 "harbour.y" /* yacc.c:1646 */ +#line 315 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->currModule = hb_compIdentifierNew( HB_COMP_PARAM, (yyvsp[-1].valChar).string, (yyvsp[-1].valChar).dealloc ? HB_IDENT_FREE : HB_IDENT_STATIC ); HB_COMP_PARAM->currLine = ( int ) (yyvsp[-4].valLong).lNumber; HB_COMP_PARAM->pLex->fEol = HB_FALSE; if( (yyvsp[-3].valChar).dealloc ) { hb_xfree( (yyvsp[-3].valChar).string ); (yyvsp[-3].valChar).dealloc = HB_FALSE; } (yyvsp[-1].valChar).dealloc = HB_FALSE; } -#line 3902 "harboury.c" /* yacc.c:1646 */ +#line 3900 "harboury.c" /* yacc.c:1646 */ break; case 19: -#line 324 "harbour.y" /* yacc.c:1646 */ +#line 322 "harbour.y" /* yacc.c:1646 */ { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[0].string), ( HB_SYMBOLSCOPE ) (yyvsp[-2].iNumber), 0 ); } -#line 3908 "harboury.c" /* yacc.c:1646 */ +#line 3906 "harboury.c" /* yacc.c:1646 */ break; case 21: -#line 325 "harbour.y" /* yacc.c:1646 */ +#line 323 "harbour.y" /* yacc.c:1646 */ { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[0].string), ( HB_SYMBOLSCOPE ) (yyvsp[-2].iNumber), HB_FUNF_PROCEDURE ); } -#line 3914 "harboury.c" /* yacc.c:1646 */ +#line 3912 "harboury.c" /* yacc.c:1646 */ break; case 23: -#line 326 "harbour.y" /* yacc.c:1646 */ +#line 324 "harbour.y" /* yacc.c:1646 */ { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[0].string), ( HB_SYMBOLSCOPE ) (yyvsp[-2].iNumber), 0 ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; } -#line 3920 "harboury.c" /* yacc.c:1646 */ +#line 3918 "harboury.c" /* yacc.c:1646 */ break; case 25: -#line 327 "harbour.y" /* yacc.c:1646 */ +#line 325 "harbour.y" /* yacc.c:1646 */ { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[0].string), ( HB_SYMBOLSCOPE ) (yyvsp[-2].iNumber), HB_FUNF_PROCEDURE ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER;} -#line 3926 "harboury.c" /* yacc.c:1646 */ +#line 3924 "harboury.c" /* yacc.c:1646 */ break; case 27: -#line 330 "harbour.y" /* yacc.c:1646 */ +#line 328 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = HB_FS_PUBLIC; } -#line 3932 "harboury.c" /* yacc.c:1646 */ +#line 3930 "harboury.c" /* yacc.c:1646 */ break; case 28: -#line 331 "harbour.y" /* yacc.c:1646 */ +#line 329 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = HB_FS_STATIC; } -#line 3938 "harboury.c" /* yacc.c:1646 */ +#line 3936 "harboury.c" /* yacc.c:1646 */ break; case 29: -#line 332 "harbour.y" /* yacc.c:1646 */ +#line 330 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = HB_FS_INIT; } -#line 3944 "harboury.c" /* yacc.c:1646 */ +#line 3942 "harboury.c" /* yacc.c:1646 */ break; case 30: -#line 333 "harbour.y" /* yacc.c:1646 */ +#line 331 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = HB_FS_EXIT; } -#line 3950 "harboury.c" /* yacc.c:1646 */ +#line 3948 "harboury.c" /* yacc.c:1646 */ break; case 31: -#line 336 "harbour.y" /* yacc.c:1646 */ +#line 334 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = 0; } -#line 3956 "harboury.c" /* yacc.c:1646 */ +#line 3954 "harboury.c" /* yacc.c:1646 */ break; case 32: -#line 337 "harbour.y" /* yacc.c:1646 */ +#line 335 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->fVParams = HB_TRUE; (yyval.iNumber) = 0; } -#line 3962 "harboury.c" /* yacc.c:1646 */ +#line 3960 "harboury.c" /* yacc.c:1646 */ break; case 34: -#line 339 "harbour.y" /* yacc.c:1646 */ +#line 337 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->fVParams = HB_TRUE; (yyval.iNumber) = (yyvsp[-2].iNumber); } -#line 3968 "harboury.c" /* yacc.c:1646 */ +#line 3966 "harboury.c" /* yacc.c:1646 */ break; case 35: -#line 342 "harbour.y" /* yacc.c:1646 */ +#line 340 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, ' ', NULL ); } -#line 3974 "harboury.c" /* yacc.c:1646 */ +#line 3972 "harboury.c" /* yacc.c:1646 */ break; case 37: -#line 346 "harbour.y" /* yacc.c:1646 */ +#line 344 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, ' ', NULL ); } -#line 3980 "harboury.c" /* yacc.c:1646 */ +#line 3978 "harboury.c" /* yacc.c:1646 */ break; case 39: -#line 350 "harbour.y" /* yacc.c:1646 */ +#line 348 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'N', NULL ); } -#line 3986 "harboury.c" /* yacc.c:1646 */ +#line 3984 "harboury.c" /* yacc.c:1646 */ break; case 40: -#line 351 "harbour.y" /* yacc.c:1646 */ +#line 349 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'C', NULL ); } -#line 3992 "harboury.c" /* yacc.c:1646 */ +#line 3990 "harboury.c" /* yacc.c:1646 */ break; case 41: -#line 352 "harbour.y" /* yacc.c:1646 */ +#line 350 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'D', NULL ); } -#line 3998 "harboury.c" /* yacc.c:1646 */ +#line 3996 "harboury.c" /* yacc.c:1646 */ break; case 42: -#line 353 "harbour.y" /* yacc.c:1646 */ +#line 351 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'L', NULL ); } -#line 4004 "harboury.c" /* yacc.c:1646 */ +#line 4002 "harboury.c" /* yacc.c:1646 */ break; case 43: -#line 354 "harbour.y" /* yacc.c:1646 */ +#line 352 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'B', NULL ); } -#line 4010 "harboury.c" /* yacc.c:1646 */ +#line 4008 "harboury.c" /* yacc.c:1646 */ break; case 44: -#line 355 "harbour.y" /* yacc.c:1646 */ +#line 353 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'O', NULL ); } -#line 4016 "harboury.c" /* yacc.c:1646 */ +#line 4014 "harboury.c" /* yacc.c:1646 */ break; case 45: -#line 356 "harbour.y" /* yacc.c:1646 */ +#line 354 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'S', (yyvsp[0].string) ); } -#line 4022 "harboury.c" /* yacc.c:1646 */ +#line 4020 "harboury.c" /* yacc.c:1646 */ break; case 46: -#line 357 "harbour.y" /* yacc.c:1646 */ +#line 355 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, ' ', NULL ); } -#line 4028 "harboury.c" /* yacc.c:1646 */ +#line 4026 "harboury.c" /* yacc.c:1646 */ break; case 48: -#line 361 "harbour.y" /* yacc.c:1646 */ +#line 359 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'A', NULL ); } -#line 4034 "harboury.c" /* yacc.c:1646 */ +#line 4032 "harboury.c" /* yacc.c:1646 */ break; case 49: -#line 362 "harbour.y" /* yacc.c:1646 */ +#line 360 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'n', NULL ); } -#line 4040 "harboury.c" /* yacc.c:1646 */ +#line 4038 "harboury.c" /* yacc.c:1646 */ break; case 50: -#line 363 "harbour.y" /* yacc.c:1646 */ +#line 361 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'c', NULL ); } -#line 4046 "harboury.c" /* yacc.c:1646 */ +#line 4044 "harboury.c" /* yacc.c:1646 */ break; case 51: -#line 364 "harbour.y" /* yacc.c:1646 */ +#line 362 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'd', NULL ); } -#line 4052 "harboury.c" /* yacc.c:1646 */ +#line 4050 "harboury.c" /* yacc.c:1646 */ break; case 52: -#line 365 "harbour.y" /* yacc.c:1646 */ +#line 363 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'l', NULL ); } -#line 4058 "harboury.c" /* yacc.c:1646 */ +#line 4056 "harboury.c" /* yacc.c:1646 */ break; case 53: -#line 366 "harbour.y" /* yacc.c:1646 */ +#line 364 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'a', NULL ); } -#line 4064 "harboury.c" /* yacc.c:1646 */ +#line 4062 "harboury.c" /* yacc.c:1646 */ break; case 54: -#line 367 "harbour.y" /* yacc.c:1646 */ +#line 365 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'b', NULL ); } -#line 4070 "harboury.c" /* yacc.c:1646 */ +#line 4068 "harboury.c" /* yacc.c:1646 */ break; case 55: -#line 368 "harbour.y" /* yacc.c:1646 */ +#line 366 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 'o', NULL ); } -#line 4076 "harboury.c" /* yacc.c:1646 */ +#line 4074 "harboury.c" /* yacc.c:1646 */ break; case 56: -#line 369 "harbour.y" /* yacc.c:1646 */ +#line 367 "harbour.y" /* yacc.c:1646 */ { (yyval.asVarType) = hb_compVarTypeNew( HB_COMP_PARAM, 's', (yyvsp[0].string) ); } -#line 4082 "harboury.c" /* yacc.c:1646 */ +#line 4080 "harboury.c" /* yacc.c:1646 */ break; case 57: -#line 372 "harbour.y" /* yacc.c:1646 */ +#line 370 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); (yyval.iNumber) = 1; } -#line 4088 "harboury.c" /* yacc.c:1646 */ +#line 4086 "harboury.c" /* yacc.c:1646 */ break; case 58: -#line 373 "harbour.y" /* yacc.c:1646 */ +#line 371 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); (yyval.iNumber)++; } -#line 4094 "harboury.c" /* yacc.c:1646 */ +#line 4092 "harboury.c" /* yacc.c:1646 */ break; case 60: -#line 382 "harbour.y" /* yacc.c:1646 */ +#line 380 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4100 "harboury.c" /* yacc.c:1646 */ +#line 4098 "harboury.c" /* yacc.c:1646 */ break; case 61: -#line 383 "harbour.y" /* yacc.c:1646 */ +#line 381 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4106 "harboury.c" /* yacc.c:1646 */ +#line 4104 "harboury.c" /* yacc.c:1646 */ break; case 62: -#line 384 "harbour.y" /* yacc.c:1646 */ +#line 382 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4112 "harboury.c" /* yacc.c:1646 */ +#line 4110 "harboury.c" /* yacc.c:1646 */ break; case 63: -#line 385 "harbour.y" /* yacc.c:1646 */ +#line 383 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4118 "harboury.c" /* yacc.c:1646 */ +#line 4116 "harboury.c" /* yacc.c:1646 */ break; case 64: -#line 386 "harbour.y" /* yacc.c:1646 */ +#line 384 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); else HB_COMP_EXPR_FREE( HB_COMP_ERROR_SYNTAX( (yyvsp[-1].asExpr) ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4129 "harboury.c" /* yacc.c:1646 */ +#line 4127 "harboury.c" /* yacc.c:1646 */ break; case 65: -#line 392 "harbour.y" /* yacc.c:1646 */ +#line 390 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4135 "harboury.c" /* yacc.c:1646 */ +#line 4133 "harboury.c" /* yacc.c:1646 */ break; case 66: -#line 393 "harbour.y" /* yacc.c:1646 */ +#line 391 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4141 "harboury.c" /* yacc.c:1646 */ +#line 4139 "harboury.c" /* yacc.c:1646 */ break; case 67: -#line 394 "harbour.y" /* yacc.c:1646 */ +#line 392 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4147 "harboury.c" /* yacc.c:1646 */ +#line 4145 "harboury.c" /* yacc.c:1646 */ break; case 68: -#line 395 "harbour.y" /* yacc.c:1646 */ +#line 393 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4153 "harboury.c" /* yacc.c:1646 */ +#line 4151 "harboury.c" /* yacc.c:1646 */ break; case 69: -#line 396 "harbour.y" /* yacc.c:1646 */ +#line 394 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4159 "harboury.c" /* yacc.c:1646 */ +#line 4157 "harboury.c" /* yacc.c:1646 */ break; case 70: -#line 397 "harbour.y" /* yacc.c:1646 */ +#line 395 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4165 "harboury.c" /* yacc.c:1646 */ +#line 4163 "harboury.c" /* yacc.c:1646 */ break; case 71: -#line 398 "harbour.y" /* yacc.c:1646 */ +#line 396 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4171 "harboury.c" /* yacc.c:1646 */ +#line 4169 "harboury.c" /* yacc.c:1646 */ break; case 72: -#line 399 "harbour.y" /* yacc.c:1646 */ +#line 397 "harbour.y" /* yacc.c:1646 */ { hb_compGenBreak( HB_COMP_PARAM ); hb_compGenPCode2( HB_P_DOSHORT, 0, HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } -#line 4178 "harboury.c" /* yacc.c:1646 */ +#line 4176 "harboury.c" /* yacc.c:1646 */ break; case 73: -#line 401 "harbour.y" /* yacc.c:1646 */ +#line 399 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 4184 "harboury.c" /* yacc.c:1646 */ +#line 4182 "harboury.c" /* yacc.c:1646 */ break; case 74: -#line 402 "harbour.y" /* yacc.c:1646 */ +#line 400 "harbour.y" /* yacc.c:1646 */ { hb_compGenBreak( HB_COMP_PARAM ); HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); hb_compGenPCode2( HB_P_DOSHORT, 1, HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } -#line 4194 "harboury.c" /* yacc.c:1646 */ +#line 4192 "harboury.c" /* yacc.c:1646 */ break; case 75: -#line 407 "harbour.y" /* yacc.c:1646 */ +#line 405 "harbour.y" /* yacc.c:1646 */ { hb_compLoopExit( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } -#line 4200 "harboury.c" /* yacc.c:1646 */ +#line 4198 "harboury.c" /* yacc.c:1646 */ break; case 76: -#line 408 "harbour.y" /* yacc.c:1646 */ +#line 406 "harbour.y" /* yacc.c:1646 */ { hb_compLoopLoop( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } -#line 4206 "harboury.c" /* yacc.c:1646 */ +#line 4204 "harboury.c" /* yacc.c:1646 */ break; case 77: -#line 409 "harbour.y" /* yacc.c:1646 */ +#line 407 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) { @@ -4218,17 +4218,17 @@ yyreduce: } HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } -#line 4224 "harboury.c" /* yacc.c:1646 */ +#line 4222 "harboury.c" /* yacc.c:1646 */ break; case 78: -#line 422 "harbour.y" /* yacc.c:1646 */ +#line 420 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 4230 "harboury.c" /* yacc.c:1646 */ +#line 4228 "harboury.c" /* yacc.c:1646 */ break; case 79: -#line 424 "harbour.y" /* yacc.c:1646 */ +#line 422 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) { @@ -4248,65 +4248,65 @@ yyreduce: } HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } -#line 4254 "harboury.c" /* yacc.c:1646 */ +#line 4252 "harboury.c" /* yacc.c:1646 */ break; case 80: -#line 443 "harbour.y" /* yacc.c:1646 */ +#line 441 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PUBLIC; } -#line 4260 "harboury.c" /* yacc.c:1646 */ +#line 4258 "harboury.c" /* yacc.c:1646 */ break; case 81: -#line 445 "harbour.y" /* yacc.c:1646 */ +#line 443 "harbour.y" /* yacc.c:1646 */ { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPUBLIC" ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4269 "harboury.c" /* yacc.c:1646 */ +#line 4267 "harboury.c" /* yacc.c:1646 */ break; case 83: -#line 449 "harbour.y" /* yacc.c:1646 */ +#line 447 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PRIVATE; } -#line 4275 "harboury.c" /* yacc.c:1646 */ +#line 4273 "harboury.c" /* yacc.c:1646 */ break; case 84: -#line 451 "harbour.y" /* yacc.c:1646 */ +#line 449 "harbour.y" /* yacc.c:1646 */ { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPRIVATE" ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 4284 "harboury.c" /* yacc.c:1646 */ +#line 4282 "harboury.c" /* yacc.c:1646 */ break; case 91: -#line 460 "harbour.y" /* yacc.c:1646 */ +#line 458 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->szAnnounce == NULL ) HB_COMP_PARAM->szAnnounce = (yyvsp[0].string); else hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_DUPL_ANNOUNCE, (yyvsp[0].string), NULL ); } -#line 4295 "harboury.c" /* yacc.c:1646 */ +#line 4293 "harboury.c" /* yacc.c:1646 */ break; case 94: -#line 469 "harbour.y" /* yacc.c:1646 */ +#line 467 "harbour.y" /* yacc.c:1646 */ { if( (yyvsp[0].valChar).dealloc ) { - (yyvsp[0].valChar).string = ( char * ) hb_compIdentifierNew( HB_COMP_PARAM, (yyvsp[0].valChar).string, HB_IDENT_FREE ); + (yyvsp[0].valChar).string = ( char * ) HB_UNCONST( hb_compIdentifierNew( HB_COMP_PARAM, (yyvsp[0].valChar).string, HB_IDENT_FREE ) ); (yyvsp[0].valChar).dealloc = HB_FALSE; } hb_compModuleAdd( HB_COMP_PARAM, (yyvsp[0].valChar).string, HB_FALSE ); } -#line 4308 "harboury.c" /* yacc.c:1646 */ +#line 4306 "harboury.c" /* yacc.c:1646 */ break; case 95: -#line 477 "harbour.y" /* yacc.c:1646 */ +#line 475 "harbour.y" /* yacc.c:1646 */ { { char szFileName[ HB_PATH_MAX ]; @@ -4324,47 +4324,47 @@ yyreduce: } } } -#line 4330 "harboury.c" /* yacc.c:1646 */ +#line 4328 "harboury.c" /* yacc.c:1646 */ break; case 96: -#line 496 "harbour.y" /* yacc.c:1646 */ +#line 494 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 4336 "harboury.c" /* yacc.c:1646 */ +#line 4334 "harboury.c" /* yacc.c:1646 */ break; case 98: -#line 499 "harbour.y" /* yacc.c:1646 */ +#line 497 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 0; } -#line 4342 "harboury.c" /* yacc.c:1646 */ +#line 4340 "harboury.c" /* yacc.c:1646 */ break; case 99: -#line 500 "harbour.y" /* yacc.c:1646 */ +#line 498 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 1; } -#line 4348 "harboury.c" /* yacc.c:1646 */ +#line 4346 "harboury.c" /* yacc.c:1646 */ break; case 100: -#line 501 "harbour.y" /* yacc.c:1646 */ +#line 499 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 1; } -#line 4354 "harboury.c" /* yacc.c:1646 */ +#line 4352 "harboury.c" /* yacc.c:1646 */ break; case 101: -#line 502 "harbour.y" /* yacc.c:1646 */ +#line 500 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 0; } -#line 4360 "harboury.c" /* yacc.c:1646 */ +#line 4358 "harboury.c" /* yacc.c:1646 */ break; case 102: -#line 503 "harbour.y" /* yacc.c:1646 */ +#line 501 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 0; hb_compCheckUnclosedStru( HB_COMP_PARAM, HB_COMP_PARAM->functions.pLast ); } -#line 4366 "harboury.c" /* yacc.c:1646 */ +#line 4364 "harboury.c" /* yacc.c:1646 */ break; case 103: -#line 504 "harbour.y" /* yacc.c:1646 */ +#line 502 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->ilastLineErr && HB_COMP_PARAM->ilastLineErr == HB_COMP_PARAM->currLine ) { yyclearin; @@ -4376,1128 +4376,1128 @@ yyreduce: } (yyval.lNumber) = 0; } -#line 4382 "harboury.c" /* yacc.c:1646 */ +#line 4380 "harboury.c" /* yacc.c:1646 */ break; case 113: -#line 530 "harbour.y" /* yacc.c:1646 */ +#line 528 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) += (yyvsp[0].lNumber); } -#line 4388 "harboury.c" /* yacc.c:1646 */ +#line 4386 "harboury.c" /* yacc.c:1646 */ break; case 114: -#line 533 "harbour.y" /* yacc.c:1646 */ +#line 531 "harbour.y" /* yacc.c:1646 */ { (yyval.lNumber) = 0; } -#line 4394 "harboury.c" /* yacc.c:1646 */ +#line 4392 "harboury.c" /* yacc.c:1646 */ break; case 116: -#line 537 "harbour.y" /* yacc.c:1646 */ +#line 535 "harbour.y" /* yacc.c:1646 */ { hb_compExternAdd( HB_COMP_PARAM, (yyvsp[0].string), 0 ); } -#line 4400 "harboury.c" /* yacc.c:1646 */ +#line 4398 "harboury.c" /* yacc.c:1646 */ break; case 117: -#line 538 "harbour.y" /* yacc.c:1646 */ +#line 536 "harbour.y" /* yacc.c:1646 */ { hb_compExternAdd( HB_COMP_PARAM, (yyvsp[0].string), 0 ); } -#line 4406 "harboury.c" /* yacc.c:1646 */ +#line 4404 "harboury.c" /* yacc.c:1646 */ break; case 118: -#line 541 "harbour.y" /* yacc.c:1646 */ +#line 539 "harbour.y" /* yacc.c:1646 */ { hb_compExternAdd( HB_COMP_PARAM, (yyvsp[0].string), HB_FS_DEFERRED ); } -#line 4412 "harboury.c" /* yacc.c:1646 */ +#line 4410 "harboury.c" /* yacc.c:1646 */ break; case 119: -#line 542 "harbour.y" /* yacc.c:1646 */ +#line 540 "harbour.y" /* yacc.c:1646 */ { hb_compExternAdd( HB_COMP_PARAM, (yyvsp[0].string), HB_FS_DEFERRED ); } -#line 4418 "harboury.c" /* yacc.c:1646 */ +#line 4416 "harboury.c" /* yacc.c:1646 */ break; case 121: -#line 546 "harbour.y" /* yacc.c:1646 */ +#line 544 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = "STEP"; } -#line 4424 "harboury.c" /* yacc.c:1646 */ +#line 4422 "harboury.c" /* yacc.c:1646 */ break; case 122: -#line 547 "harbour.y" /* yacc.c:1646 */ +#line 545 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = "TO"; } -#line 4430 "harboury.c" /* yacc.c:1646 */ +#line 4428 "harboury.c" /* yacc.c:1646 */ break; case 123: -#line 548 "harbour.y" /* yacc.c:1646 */ +#line 546 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = "LOOP"; } -#line 4436 "harboury.c" /* yacc.c:1646 */ +#line 4434 "harboury.c" /* yacc.c:1646 */ break; case 124: -#line 549 "harbour.y" /* yacc.c:1646 */ +#line 547 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = "EXIT"; } -#line 4442 "harboury.c" /* yacc.c:1646 */ +#line 4440 "harboury.c" /* yacc.c:1646 */ break; case 125: -#line 550 "harbour.y" /* yacc.c:1646 */ +#line 548 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = "IN"; } -#line 4448 "harboury.c" /* yacc.c:1646 */ +#line 4446 "harboury.c" /* yacc.c:1646 */ break; case 126: -#line 551 "harbour.y" /* yacc.c:1646 */ +#line 549 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4454 "harboury.c" /* yacc.c:1646 */ +#line 4452 "harboury.c" /* yacc.c:1646 */ break; case 127: -#line 552 "harbour.y" /* yacc.c:1646 */ +#line 550 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4460 "harboury.c" /* yacc.c:1646 */ +#line 4458 "harboury.c" /* yacc.c:1646 */ break; case 128: -#line 553 "harbour.y" /* yacc.c:1646 */ +#line 551 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4466 "harboury.c" /* yacc.c:1646 */ +#line 4464 "harboury.c" /* yacc.c:1646 */ break; case 129: -#line 554 "harbour.y" /* yacc.c:1646 */ +#line 552 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4472 "harboury.c" /* yacc.c:1646 */ +#line 4470 "harboury.c" /* yacc.c:1646 */ break; case 130: -#line 555 "harbour.y" /* yacc.c:1646 */ +#line 553 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4478 "harboury.c" /* yacc.c:1646 */ +#line 4476 "harboury.c" /* yacc.c:1646 */ break; case 131: -#line 556 "harbour.y" /* yacc.c:1646 */ +#line 554 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4484 "harboury.c" /* yacc.c:1646 */ +#line 4482 "harboury.c" /* yacc.c:1646 */ break; case 132: -#line 557 "harbour.y" /* yacc.c:1646 */ +#line 555 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4490 "harboury.c" /* yacc.c:1646 */ +#line 4488 "harboury.c" /* yacc.c:1646 */ break; case 133: -#line 558 "harbour.y" /* yacc.c:1646 */ +#line 556 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4496 "harboury.c" /* yacc.c:1646 */ +#line 4494 "harboury.c" /* yacc.c:1646 */ break; case 134: -#line 559 "harbour.y" /* yacc.c:1646 */ +#line 557 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4502 "harboury.c" /* yacc.c:1646 */ +#line 4500 "harboury.c" /* yacc.c:1646 */ break; case 135: -#line 560 "harbour.y" /* yacc.c:1646 */ +#line 558 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4508 "harboury.c" /* yacc.c:1646 */ +#line 4506 "harboury.c" /* yacc.c:1646 */ break; case 136: -#line 561 "harbour.y" /* yacc.c:1646 */ +#line 559 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4514 "harboury.c" /* yacc.c:1646 */ +#line 4512 "harboury.c" /* yacc.c:1646 */ break; case 137: -#line 562 "harbour.y" /* yacc.c:1646 */ +#line 560 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4520 "harboury.c" /* yacc.c:1646 */ +#line 4518 "harboury.c" /* yacc.c:1646 */ break; case 138: -#line 563 "harbour.y" /* yacc.c:1646 */ +#line 561 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 4526 "harboury.c" /* yacc.c:1646 */ +#line 4524 "harboury.c" /* yacc.c:1646 */ break; case 139: -#line 568 "harbour.y" /* yacc.c:1646 */ +#line 566 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewDouble( (yyvsp[0].valDouble).dNumber, (yyvsp[0].valDouble).bWidth, (yyvsp[0].valDouble).bDec, HB_COMP_PARAM ); } -#line 4532 "harboury.c" /* yacc.c:1646 */ +#line 4530 "harboury.c" /* yacc.c:1646 */ break; case 140: -#line 569 "harbour.y" /* yacc.c:1646 */ +#line 567 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[0].valLong).lNumber, HB_COMP_PARAM ); } -#line 4538 "harboury.c" /* yacc.c:1646 */ +#line 4536 "harboury.c" /* yacc.c:1646 */ break; case 141: -#line 572 "harbour.y" /* yacc.c:1646 */ +#line 570 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewDate( ( long ) (yyvsp[0].valLong).lNumber, HB_COMP_PARAM ); } -#line 4544 "harboury.c" /* yacc.c:1646 */ +#line 4542 "harboury.c" /* yacc.c:1646 */ break; case 142: -#line 575 "harbour.y" /* yacc.c:1646 */ +#line 573 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewTimeStamp( (yyvsp[0].valTimeStamp).date, (yyvsp[0].valTimeStamp).time, HB_COMP_PARAM ); } -#line 4550 "harboury.c" /* yacc.c:1646 */ +#line 4548 "harboury.c" /* yacc.c:1646 */ break; case 143: -#line 578 "harbour.y" /* yacc.c:1646 */ +#line 576 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[-1].valLong).lNumber, HB_COMP_PARAM ); } -#line 4556 "harboury.c" /* yacc.c:1646 */ +#line 4554 "harboury.c" /* yacc.c:1646 */ break; case 144: -#line 579 "harbour.y" /* yacc.c:1646 */ +#line 577 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, hb_compExprNewDouble( (yyvsp[-1].valDouble).dNumber, (yyvsp[-1].valDouble).bWidth, (yyvsp[-1].valDouble).bDec, HB_COMP_PARAM ) ); } -#line 4562 "harboury.c" /* yacc.c:1646 */ +#line 4560 "harboury.c" /* yacc.c:1646 */ break; case 145: -#line 584 "harbour.y" /* yacc.c:1646 */ +#line 582 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewNil( HB_COMP_PARAM ); } -#line 4568 "harboury.c" /* yacc.c:1646 */ +#line 4566 "harboury.c" /* yacc.c:1646 */ break; case 147: -#line 592 "harbour.y" /* yacc.c:1646 */ +#line 590 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewString( (yyvsp[0].valChar).string, (yyvsp[0].valChar).length, (yyvsp[0].valChar).dealloc, HB_COMP_PARAM ); (yyvsp[0].valChar).dealloc = HB_FALSE; } -#line 4577 "harboury.c" /* yacc.c:1646 */ +#line 4575 "harboury.c" /* yacc.c:1646 */ break; case 150: -#line 608 "harbour.y" /* yacc.c:1646 */ +#line 606 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewLogical( HB_TRUE, HB_COMP_PARAM ); } -#line 4583 "harboury.c" /* yacc.c:1646 */ +#line 4581 "harboury.c" /* yacc.c:1646 */ break; case 151: -#line 609 "harbour.y" /* yacc.c:1646 */ +#line 607 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewLogical( HB_FALSE, HB_COMP_PARAM ); } -#line 4589 "harboury.c" /* yacc.c:1646 */ +#line 4587 "harboury.c" /* yacc.c:1646 */ break; case 153: -#line 617 "harbour.y" /* yacc.c:1646 */ +#line 615 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewSelf( HB_COMP_PARAM ); } -#line 4595 "harboury.c" /* yacc.c:1646 */ +#line 4593 "harboury.c" /* yacc.c:1646 */ break; case 155: -#line 631 "harbour.y" /* yacc.c:1646 */ +#line 629 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArray( (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 4601 "harboury.c" /* yacc.c:1646 */ +#line 4599 "harboury.c" /* yacc.c:1646 */ break; case 157: -#line 639 "harbour.y" /* yacc.c:1646 */ +#line 637 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4607 "harboury.c" /* yacc.c:1646 */ +#line 4605 "harboury.c" /* yacc.c:1646 */ break; case 159: -#line 645 "harbour.y" /* yacc.c:1646 */ +#line 643 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewHash( NULL, HB_COMP_PARAM ); } -#line 4613 "harboury.c" /* yacc.c:1646 */ +#line 4611 "harboury.c" /* yacc.c:1646 */ break; case 160: -#line 646 "harbour.y" /* yacc.c:1646 */ +#line 644 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewHash( (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 4619 "harboury.c" /* yacc.c:1646 */ +#line 4617 "harboury.c" /* yacc.c:1646 */ break; case 162: -#line 652 "harbour.y" /* yacc.c:1646 */ +#line 650 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr) ); } -#line 4625 "harboury.c" /* yacc.c:1646 */ +#line 4623 "harboury.c" /* yacc.c:1646 */ break; case 163: -#line 653 "harbour.y" /* yacc.c:1646 */ +#line 651 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprAddListExpr( (yyvsp[-4].asExpr), (yyvsp[-2].asExpr) ), (yyvsp[0].asExpr) ); } -#line 4631 "harboury.c" /* yacc.c:1646 */ +#line 4629 "harboury.c" /* yacc.c:1646 */ break; case 164: -#line 658 "harbour.y" /* yacc.c:1646 */ +#line 656 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 4637 "harboury.c" /* yacc.c:1646 */ +#line 4635 "harboury.c" /* yacc.c:1646 */ break; case 165: -#line 661 "harbour.y" /* yacc.c:1646 */ +#line 659 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAlias( (yyvsp[-1].string), HB_COMP_PARAM ); } -#line 4643 "harboury.c" /* yacc.c:1646 */ +#line 4641 "harboury.c" /* yacc.c:1646 */ break; case 166: -#line 666 "harbour.y" /* yacc.c:1646 */ +#line 664 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMacro( NULL, '&', (yyvsp[0].string), HB_COMP_PARAM ); } -#line 4649 "harboury.c" /* yacc.c:1646 */ +#line 4647 "harboury.c" /* yacc.c:1646 */ break; case 167: -#line 667 "harbour.y" /* yacc.c:1646 */ +#line 665 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMacro( NULL, 0, (yyvsp[0].string), HB_COMP_PARAM ); } -#line 4655 "harboury.c" /* yacc.c:1646 */ +#line 4653 "harboury.c" /* yacc.c:1646 */ break; case 169: -#line 675 "harbour.y" /* yacc.c:1646 */ +#line 673 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMacro( (yyvsp[0].asExpr), 0, NULL, HB_COMP_PARAM ); } -#line 4661 "harboury.c" /* yacc.c:1646 */ +#line 4659 "harboury.c" /* yacc.c:1646 */ break; case 173: -#line 689 "harbour.y" /* yacc.c:1646 */ +#line 687 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAlias( "FIELD", HB_COMP_PARAM ); } -#line 4667 "harboury.c" /* yacc.c:1646 */ +#line 4665 "harboury.c" /* yacc.c:1646 */ break; case 174: -#line 690 "harbour.y" /* yacc.c:1646 */ +#line 688 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4673 "harboury.c" /* yacc.c:1646 */ +#line 4671 "harboury.c" /* yacc.c:1646 */ break; case 175: -#line 695 "harbour.y" /* yacc.c:1646 */ +#line 693 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4679 "harboury.c" /* yacc.c:1646 */ +#line 4677 "harboury.c" /* yacc.c:1646 */ break; case 176: -#line 696 "harbour.y" /* yacc.c:1646 */ +#line 694 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4685 "harboury.c" /* yacc.c:1646 */ +#line 4683 "harboury.c" /* yacc.c:1646 */ break; case 177: -#line 697 "harbour.y" /* yacc.c:1646 */ +#line 695 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4691 "harboury.c" /* yacc.c:1646 */ +#line 4689 "harboury.c" /* yacc.c:1646 */ break; case 178: -#line 698 "harbour.y" /* yacc.c:1646 */ +#line 696 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4697 "harboury.c" /* yacc.c:1646 */ +#line 4695 "harboury.c" /* yacc.c:1646 */ break; case 179: -#line 699 "harbour.y" /* yacc.c:1646 */ +#line 697 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4703 "harboury.c" /* yacc.c:1646 */ +#line 4701 "harboury.c" /* yacc.c:1646 */ break; case 180: -#line 700 "harbour.y" /* yacc.c:1646 */ +#line 698 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4709 "harboury.c" /* yacc.c:1646 */ +#line 4707 "harboury.c" /* yacc.c:1646 */ break; case 181: -#line 701 "harbour.y" /* yacc.c:1646 */ +#line 699 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4715 "harboury.c" /* yacc.c:1646 */ +#line 4713 "harboury.c" /* yacc.c:1646 */ break; case 182: -#line 702 "harbour.y" /* yacc.c:1646 */ +#line 700 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4721 "harboury.c" /* yacc.c:1646 */ +#line 4719 "harboury.c" /* yacc.c:1646 */ break; case 183: -#line 703 "harbour.y" /* yacc.c:1646 */ +#line 701 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4727 "harboury.c" /* yacc.c:1646 */ +#line 4725 "harboury.c" /* yacc.c:1646 */ break; case 184: -#line 704 "harbour.y" /* yacc.c:1646 */ +#line 702 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4733 "harboury.c" /* yacc.c:1646 */ +#line 4731 "harboury.c" /* yacc.c:1646 */ break; case 185: -#line 705 "harbour.y" /* yacc.c:1646 */ +#line 703 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4739 "harboury.c" /* yacc.c:1646 */ +#line 4737 "harboury.c" /* yacc.c:1646 */ break; case 186: -#line 706 "harbour.y" /* yacc.c:1646 */ +#line 704 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4745 "harboury.c" /* yacc.c:1646 */ +#line 4743 "harboury.c" /* yacc.c:1646 */ break; case 187: -#line 707 "harbour.y" /* yacc.c:1646 */ +#line 705 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4751 "harboury.c" /* yacc.c:1646 */ +#line 4749 "harboury.c" /* yacc.c:1646 */ break; case 188: -#line 708 "harbour.y" /* yacc.c:1646 */ +#line 706 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4757 "harboury.c" /* yacc.c:1646 */ +#line 4755 "harboury.c" /* yacc.c:1646 */ break; case 189: -#line 711 "harbour.y" /* yacc.c:1646 */ +#line 709 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 4763 "harboury.c" /* yacc.c:1646 */ +#line 4761 "harboury.c" /* yacc.c:1646 */ break; case 191: -#line 715 "harbour.y" /* yacc.c:1646 */ +#line 713 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4769 "harboury.c" /* yacc.c:1646 */ +#line 4767 "harboury.c" /* yacc.c:1646 */ break; case 192: -#line 716 "harbour.y" /* yacc.c:1646 */ +#line 714 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4775 "harboury.c" /* yacc.c:1646 */ +#line 4773 "harboury.c" /* yacc.c:1646 */ break; case 193: -#line 717 "harbour.y" /* yacc.c:1646 */ +#line 715 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4781 "harboury.c" /* yacc.c:1646 */ +#line 4779 "harboury.c" /* yacc.c:1646 */ break; case 194: -#line 718 "harbour.y" /* yacc.c:1646 */ +#line 716 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4787 "harboury.c" /* yacc.c:1646 */ +#line 4785 "harboury.c" /* yacc.c:1646 */ break; case 195: -#line 719 "harbour.y" /* yacc.c:1646 */ +#line 717 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4793 "harboury.c" /* yacc.c:1646 */ +#line 4791 "harboury.c" /* yacc.c:1646 */ break; case 196: -#line 720 "harbour.y" /* yacc.c:1646 */ +#line 718 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4799 "harboury.c" /* yacc.c:1646 */ +#line 4797 "harboury.c" /* yacc.c:1646 */ break; case 197: -#line 721 "harbour.y" /* yacc.c:1646 */ +#line 719 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4805 "harboury.c" /* yacc.c:1646 */ +#line 4803 "harboury.c" /* yacc.c:1646 */ break; case 198: -#line 722 "harbour.y" /* yacc.c:1646 */ +#line 720 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4811 "harboury.c" /* yacc.c:1646 */ +#line 4809 "harboury.c" /* yacc.c:1646 */ break; case 199: -#line 723 "harbour.y" /* yacc.c:1646 */ +#line 721 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4817 "harboury.c" /* yacc.c:1646 */ +#line 4815 "harboury.c" /* yacc.c:1646 */ break; case 200: -#line 724 "harbour.y" /* yacc.c:1646 */ +#line 722 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4823 "harboury.c" /* yacc.c:1646 */ +#line 4821 "harboury.c" /* yacc.c:1646 */ break; case 201: -#line 725 "harbour.y" /* yacc.c:1646 */ +#line 723 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4829 "harboury.c" /* yacc.c:1646 */ +#line 4827 "harboury.c" /* yacc.c:1646 */ break; case 202: -#line 726 "harbour.y" /* yacc.c:1646 */ +#line 724 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4835 "harboury.c" /* yacc.c:1646 */ +#line 4833 "harboury.c" /* yacc.c:1646 */ break; case 203: -#line 727 "harbour.y" /* yacc.c:1646 */ +#line 725 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4841 "harboury.c" /* yacc.c:1646 */ +#line 4839 "harboury.c" /* yacc.c:1646 */ break; case 204: -#line 728 "harbour.y" /* yacc.c:1646 */ +#line 726 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4847 "harboury.c" /* yacc.c:1646 */ +#line 4845 "harboury.c" /* yacc.c:1646 */ break; case 205: -#line 729 "harbour.y" /* yacc.c:1646 */ +#line 727 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4853 "harboury.c" /* yacc.c:1646 */ +#line 4851 "harboury.c" /* yacc.c:1646 */ break; case 206: -#line 730 "harbour.y" /* yacc.c:1646 */ +#line 728 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4859 "harboury.c" /* yacc.c:1646 */ +#line 4857 "harboury.c" /* yacc.c:1646 */ break; case 207: -#line 731 "harbour.y" /* yacc.c:1646 */ +#line 729 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[-1].asExpr) ); } -#line 4865 "harboury.c" /* yacc.c:1646 */ +#line 4863 "harboury.c" /* yacc.c:1646 */ break; case 208: -#line 732 "harbour.y" /* yacc.c:1646 */ +#line 730 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4871 "harboury.c" /* yacc.c:1646 */ +#line 4869 "harboury.c" /* yacc.c:1646 */ break; case 209: -#line 733 "harbour.y" /* yacc.c:1646 */ +#line 731 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4877 "harboury.c" /* yacc.c:1646 */ +#line 4875 "harboury.c" /* yacc.c:1646 */ break; case 210: -#line 734 "harbour.y" /* yacc.c:1646 */ +#line 732 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4883 "harboury.c" /* yacc.c:1646 */ +#line 4881 "harboury.c" /* yacc.c:1646 */ break; case 211: -#line 743 "harbour.y" /* yacc.c:1646 */ +#line 741 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4889 "harboury.c" /* yacc.c:1646 */ +#line 4887 "harboury.c" /* yacc.c:1646 */ break; case 212: -#line 744 "harbour.y" /* yacc.c:1646 */ +#line 742 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4895 "harboury.c" /* yacc.c:1646 */ +#line 4893 "harboury.c" /* yacc.c:1646 */ break; case 213: -#line 745 "harbour.y" /* yacc.c:1646 */ +#line 743 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4901 "harboury.c" /* yacc.c:1646 */ +#line 4899 "harboury.c" /* yacc.c:1646 */ break; case 214: -#line 746 "harbour.y" /* yacc.c:1646 */ +#line 744 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4907 "harboury.c" /* yacc.c:1646 */ +#line 4905 "harboury.c" /* yacc.c:1646 */ break; case 215: -#line 747 "harbour.y" /* yacc.c:1646 */ +#line 745 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 4913 "harboury.c" /* yacc.c:1646 */ +#line 4911 "harboury.c" /* yacc.c:1646 */ break; case 216: -#line 748 "harbour.y" /* yacc.c:1646 */ +#line 746 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 4919 "harboury.c" /* yacc.c:1646 */ +#line 4917 "harboury.c" /* yacc.c:1646 */ break; case 217: -#line 753 "harbour.y" /* yacc.c:1646 */ +#line 751 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4925 "harboury.c" /* yacc.c:1646 */ +#line 4923 "harboury.c" /* yacc.c:1646 */ break; case 218: -#line 754 "harbour.y" /* yacc.c:1646 */ +#line 752 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4931 "harboury.c" /* yacc.c:1646 */ +#line 4929 "harboury.c" /* yacc.c:1646 */ break; case 219: -#line 755 "harbour.y" /* yacc.c:1646 */ +#line 753 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4937 "harboury.c" /* yacc.c:1646 */ +#line 4935 "harboury.c" /* yacc.c:1646 */ break; case 220: -#line 756 "harbour.y" /* yacc.c:1646 */ +#line 754 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4943 "harboury.c" /* yacc.c:1646 */ +#line 4941 "harboury.c" /* yacc.c:1646 */ break; case 221: -#line 757 "harbour.y" /* yacc.c:1646 */ +#line 755 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4949 "harboury.c" /* yacc.c:1646 */ +#line 4947 "harboury.c" /* yacc.c:1646 */ break; case 222: -#line 758 "harbour.y" /* yacc.c:1646 */ +#line 756 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4955 "harboury.c" /* yacc.c:1646 */ +#line 4953 "harboury.c" /* yacc.c:1646 */ break; case 223: -#line 759 "harbour.y" /* yacc.c:1646 */ +#line 757 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4961 "harboury.c" /* yacc.c:1646 */ +#line 4959 "harboury.c" /* yacc.c:1646 */ break; case 224: -#line 760 "harbour.y" /* yacc.c:1646 */ +#line 758 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4967 "harboury.c" /* yacc.c:1646 */ +#line 4965 "harboury.c" /* yacc.c:1646 */ break; case 225: -#line 761 "harbour.y" /* yacc.c:1646 */ +#line 759 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4973 "harboury.c" /* yacc.c:1646 */ +#line 4971 "harboury.c" /* yacc.c:1646 */ break; case 226: -#line 762 "harbour.y" /* yacc.c:1646 */ +#line 760 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4979 "harboury.c" /* yacc.c:1646 */ +#line 4977 "harboury.c" /* yacc.c:1646 */ break; case 227: -#line 763 "harbour.y" /* yacc.c:1646 */ +#line 761 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4985 "harboury.c" /* yacc.c:1646 */ +#line 4983 "harboury.c" /* yacc.c:1646 */ break; case 228: -#line 764 "harbour.y" /* yacc.c:1646 */ +#line 762 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4991 "harboury.c" /* yacc.c:1646 */ +#line 4989 "harboury.c" /* yacc.c:1646 */ break; case 229: -#line 765 "harbour.y" /* yacc.c:1646 */ +#line 763 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 4997 "harboury.c" /* yacc.c:1646 */ +#line 4995 "harboury.c" /* yacc.c:1646 */ break; case 230: -#line 766 "harbour.y" /* yacc.c:1646 */ +#line 764 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5003 "harboury.c" /* yacc.c:1646 */ +#line 5001 "harboury.c" /* yacc.c:1646 */ break; case 231: -#line 767 "harbour.y" /* yacc.c:1646 */ +#line 765 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5009 "harboury.c" /* yacc.c:1646 */ +#line 5007 "harboury.c" /* yacc.c:1646 */ break; case 232: -#line 768 "harbour.y" /* yacc.c:1646 */ +#line 766 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5015 "harboury.c" /* yacc.c:1646 */ +#line 5013 "harboury.c" /* yacc.c:1646 */ break; case 233: -#line 769 "harbour.y" /* yacc.c:1646 */ +#line 767 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5021 "harboury.c" /* yacc.c:1646 */ +#line 5019 "harboury.c" /* yacc.c:1646 */ break; case 234: -#line 770 "harbour.y" /* yacc.c:1646 */ +#line 768 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5027 "harboury.c" /* yacc.c:1646 */ +#line 5025 "harboury.c" /* yacc.c:1646 */ break; case 236: -#line 777 "harbour.y" /* yacc.c:1646 */ +#line 775 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewFunName( (yyvsp[-3].string), HB_COMP_PARAM ), (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 5033 "harboury.c" /* yacc.c:1646 */ +#line 5031 "harboury.c" /* yacc.c:1646 */ break; case 238: -#line 781 "harbour.y" /* yacc.c:1646 */ +#line 779 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[-3].asExpr), (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 5039 "harboury.c" /* yacc.c:1646 */ +#line 5037 "harboury.c" /* yacc.c:1646 */ break; case 239: -#line 785 "harbour.y" /* yacc.c:1646 */ +#line 783 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, (yyvsp[0].asExpr) ); } -#line 5045 "harboury.c" /* yacc.c:1646 */ +#line 5043 "harboury.c" /* yacc.c:1646 */ break; case 241: -#line 791 "harbour.y" /* yacc.c:1646 */ +#line 789 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5051 "harboury.c" /* yacc.c:1646 */ +#line 5049 "harboury.c" /* yacc.c:1646 */ break; case 242: -#line 792 "harbour.y" /* yacc.c:1646 */ +#line 790 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 5057 "harboury.c" /* yacc.c:1646 */ +#line 5055 "harboury.c" /* yacc.c:1646 */ break; case 245: -#line 799 "harbour.y" /* yacc.c:1646 */ +#line 797 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, hb_compExprNewVarRef( (yyvsp[0].string), HB_COMP_PARAM ) ); } -#line 5063 "harboury.c" /* yacc.c:1646 */ +#line 5061 "harboury.c" /* yacc.c:1646 */ break; case 246: -#line 800 "harbour.y" /* yacc.c:1646 */ +#line 798 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ) ); } -#line 5069 "harboury.c" /* yacc.c:1646 */ +#line 5067 "harboury.c" /* yacc.c:1646 */ break; case 247: -#line 801 "harbour.y" /* yacc.c:1646 */ +#line 799 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ) ); } -#line 5075 "harboury.c" /* yacc.c:1646 */ +#line 5073 "harboury.c" /* yacc.c:1646 */ break; case 248: -#line 802 "harbour.y" /* yacc.c:1646 */ +#line 800 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ) ); } -#line 5081 "harboury.c" /* yacc.c:1646 */ +#line 5079 "harboury.c" /* yacc.c:1646 */ break; case 249: -#line 803 "harbour.y" /* yacc.c:1646 */ +#line 801 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckPassByRef( HB_COMP_PARAM, (yyvsp[0].asExpr) ); (yyval.asExpr)->value.asList.reference = HB_TRUE; } -#line 5087 "harboury.c" /* yacc.c:1646 */ +#line 5085 "harboury.c" /* yacc.c:1646 */ break; case 250: -#line 806 "harbour.y" /* yacc.c:1646 */ +#line 804 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); } -#line 5093 "harboury.c" /* yacc.c:1646 */ +#line 5091 "harboury.c" /* yacc.c:1646 */ break; case 252: -#line 812 "harbour.y" /* yacc.c:1646 */ +#line 810 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compCheckMethod( HB_COMP_PARAM, hb_compExprNewMethodObject( (yyvsp[0].asExpr), (yyvsp[-2].asExpr) ) ); } -#line 5099 "harboury.c" /* yacc.c:1646 */ +#line 5097 "harboury.c" /* yacc.c:1646 */ break; case 253: -#line 813 "harbour.y" /* yacc.c:1646 */ +#line 811 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMethodObject( (yyvsp[0].asExpr), (yyvsp[-2].asExpr) ); } -#line 5105 "harboury.c" /* yacc.c:1646 */ +#line 5103 "harboury.c" /* yacc.c:1646 */ break; case 254: -#line 814 "harbour.y" /* yacc.c:1646 */ +#line 812 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wWithObjectCnt == 0 ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_WITHOBJECT, NULL, NULL ); (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5114 "harboury.c" /* yacc.c:1646 */ +#line 5112 "harboury.c" /* yacc.c:1646 */ break; case 255: -#line 820 "harbour.y" /* yacc.c:1646 */ +#line 818 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewSend( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 5120 "harboury.c" /* yacc.c:1646 */ +#line 5118 "harboury.c" /* yacc.c:1646 */ break; case 256: -#line 821 "harbour.y" /* yacc.c:1646 */ +#line 819 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMacroSend( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5126 "harboury.c" /* yacc.c:1646 */ +#line 5124 "harboury.c" /* yacc.c:1646 */ break; case 257: -#line 824 "harbour.y" /* yacc.c:1646 */ +#line 822 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[-1].string), HB_COMP_PARAM ); } -#line 5132 "harboury.c" /* yacc.c:1646 */ +#line 5130 "harboury.c" /* yacc.c:1646 */ break; case 259: -#line 832 "harbour.y" /* yacc.c:1646 */ +#line 830 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewMethodCall( (yyvsp[-3].asExpr), (yyvsp[-1].asExpr) ); } -#line 5138 "harboury.c" /* yacc.c:1646 */ +#line 5136 "harboury.c" /* yacc.c:1646 */ break; case 269: -#line 852 "harbour.y" /* yacc.c:1646 */ +#line 850 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5144 "harboury.c" /* yacc.c:1646 */ +#line 5142 "harboury.c" /* yacc.c:1646 */ break; case 279: -#line 862 "harbour.y" /* yacc.c:1646 */ +#line 860 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5150 "harboury.c" /* yacc.c:1646 */ +#line 5148 "harboury.c" /* yacc.c:1646 */ break; case 282: -#line 865 "harbour.y" /* yacc.c:1646 */ +#line 863 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5156 "harboury.c" /* yacc.c:1646 */ +#line 5154 "harboury.c" /* yacc.c:1646 */ break; case 284: -#line 867 "harbour.y" /* yacc.c:1646 */ +#line 865 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5162 "harboury.c" /* yacc.c:1646 */ +#line 5160 "harboury.c" /* yacc.c:1646 */ break; case 296: -#line 881 "harbour.y" /* yacc.c:1646 */ +#line 879 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5168 "harboury.c" /* yacc.c:1646 */ +#line 5166 "harboury.c" /* yacc.c:1646 */ break; case 297: -#line 882 "harbour.y" /* yacc.c:1646 */ +#line 880 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5174 "harboury.c" /* yacc.c:1646 */ +#line 5172 "harboury.c" /* yacc.c:1646 */ break; case 299: -#line 886 "harbour.y" /* yacc.c:1646 */ +#line 884 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); } -#line 5180 "harboury.c" /* yacc.c:1646 */ +#line 5178 "harboury.c" /* yacc.c:1646 */ break; case 301: -#line 890 "harbour.y" /* yacc.c:1646 */ +#line 888 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewEmpty( HB_COMP_PARAM ); } -#line 5186 "harboury.c" /* yacc.c:1646 */ +#line 5184 "harboury.c" /* yacc.c:1646 */ break; case 303: -#line 894 "harbour.y" /* yacc.c:1646 */ +#line 892 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 5192 "harboury.c" /* yacc.c:1646 */ +#line 5190 "harboury.c" /* yacc.c:1646 */ break; case 309: -#line 900 "harbour.y" /* yacc.c:1646 */ +#line 898 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprListStrip( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5198 "harboury.c" /* yacc.c:1646 */ +#line 5196 "harboury.c" /* yacc.c:1646 */ break; case 331: -#line 933 "harbour.y" /* yacc.c:1646 */ +#line 931 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewPostInc( (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 5204 "harboury.c" /* yacc.c:1646 */ +#line 5202 "harboury.c" /* yacc.c:1646 */ break; case 332: -#line 934 "harbour.y" /* yacc.c:1646 */ +#line 932 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewPostDec( (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 5210 "harboury.c" /* yacc.c:1646 */ +#line 5208 "harboury.c" /* yacc.c:1646 */ break; case 333: -#line 937 "harbour.y" /* yacc.c:1646 */ +#line 935 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5216 "harboury.c" /* yacc.c:1646 */ +#line 5214 "harboury.c" /* yacc.c:1646 */ break; case 334: -#line 940 "harbour.y" /* yacc.c:1646 */ +#line 938 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewPreInc( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5222 "harboury.c" /* yacc.c:1646 */ +#line 5220 "harboury.c" /* yacc.c:1646 */ break; case 335: -#line 941 "harbour.y" /* yacc.c:1646 */ +#line 939 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewPreDec( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5228 "harboury.c" /* yacc.c:1646 */ +#line 5226 "harboury.c" /* yacc.c:1646 */ break; case 336: -#line 944 "harbour.y" /* yacc.c:1646 */ +#line 942 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewNot( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5234 "harboury.c" /* yacc.c:1646 */ +#line 5232 "harboury.c" /* yacc.c:1646 */ break; case 337: -#line 945 "harbour.y" /* yacc.c:1646 */ +#line 943 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewNegate( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5240 "harboury.c" /* yacc.c:1646 */ +#line 5238 "harboury.c" /* yacc.c:1646 */ break; case 338: -#line 946 "harbour.y" /* yacc.c:1646 */ +#line 944 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5246 "harboury.c" /* yacc.c:1646 */ +#line 5244 "harboury.c" /* yacc.c:1646 */ break; case 339: -#line 949 "harbour.y" /* yacc.c:1646 */ +#line 947 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAssign( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5252 "harboury.c" /* yacc.c:1646 */ +#line 5250 "harboury.c" /* yacc.c:1646 */ break; case 340: -#line 952 "harbour.y" /* yacc.c:1646 */ +#line 950 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAssign( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5258 "harboury.c" /* yacc.c:1646 */ +#line 5256 "harboury.c" /* yacc.c:1646 */ break; case 341: -#line 955 "harbour.y" /* yacc.c:1646 */ +#line 953 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5264 "harboury.c" /* yacc.c:1646 */ +#line 5262 "harboury.c" /* yacc.c:1646 */ break; case 342: -#line 958 "harbour.y" /* yacc.c:1646 */ +#line 956 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5270 "harboury.c" /* yacc.c:1646 */ +#line 5268 "harboury.c" /* yacc.c:1646 */ break; case 343: -#line 961 "harbour.y" /* yacc.c:1646 */ +#line 959 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5276 "harboury.c" /* yacc.c:1646 */ +#line 5274 "harboury.c" /* yacc.c:1646 */ break; case 344: -#line 964 "harbour.y" /* yacc.c:1646 */ +#line 962 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5282 "harboury.c" /* yacc.c:1646 */ +#line 5280 "harboury.c" /* yacc.c:1646 */ break; case 345: -#line 967 "harbour.y" /* yacc.c:1646 */ +#line 965 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5288 "harboury.c" /* yacc.c:1646 */ +#line 5286 "harboury.c" /* yacc.c:1646 */ break; case 346: -#line 970 "harbour.y" /* yacc.c:1646 */ +#line 968 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5294 "harboury.c" /* yacc.c:1646 */ +#line 5292 "harboury.c" /* yacc.c:1646 */ break; case 353: -#line 981 "harbour.y" /* yacc.c:1646 */ +#line 979 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlus( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5300 "harboury.c" /* yacc.c:1646 */ +#line 5298 "harboury.c" /* yacc.c:1646 */ break; case 354: -#line 982 "harbour.y" /* yacc.c:1646 */ +#line 980 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinus( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5306 "harboury.c" /* yacc.c:1646 */ +#line 5304 "harboury.c" /* yacc.c:1646 */ break; case 355: -#line 983 "harbour.y" /* yacc.c:1646 */ +#line 981 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMult( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5312 "harboury.c" /* yacc.c:1646 */ +#line 5310 "harboury.c" /* yacc.c:1646 */ break; case 356: -#line 984 "harbour.y" /* yacc.c:1646 */ +#line 982 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDiv( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5318 "harboury.c" /* yacc.c:1646 */ +#line 5316 "harboury.c" /* yacc.c:1646 */ break; case 357: -#line 985 "harbour.y" /* yacc.c:1646 */ +#line 983 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMod( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5324 "harboury.c" /* yacc.c:1646 */ +#line 5322 "harboury.c" /* yacc.c:1646 */ break; case 358: -#line 986 "harbour.y" /* yacc.c:1646 */ +#line 984 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPower( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5330 "harboury.c" /* yacc.c:1646 */ +#line 5328 "harboury.c" /* yacc.c:1646 */ break; case 359: -#line 989 "harbour.y" /* yacc.c:1646 */ +#line 987 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewAnd( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5336 "harboury.c" /* yacc.c:1646 */ +#line 5334 "harboury.c" /* yacc.c:1646 */ break; case 360: -#line 990 "harbour.y" /* yacc.c:1646 */ +#line 988 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewOr( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5342 "harboury.c" /* yacc.c:1646 */ +#line 5340 "harboury.c" /* yacc.c:1646 */ break; case 361: -#line 993 "harbour.y" /* yacc.c:1646 */ +#line 991 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEQ( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5348 "harboury.c" /* yacc.c:1646 */ +#line 5346 "harboury.c" /* yacc.c:1646 */ break; case 362: -#line 994 "harbour.y" /* yacc.c:1646 */ +#line 992 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLT( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5354 "harboury.c" /* yacc.c:1646 */ +#line 5352 "harboury.c" /* yacc.c:1646 */ break; case 363: -#line 995 "harbour.y" /* yacc.c:1646 */ +#line 993 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGT( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5360 "harboury.c" /* yacc.c:1646 */ +#line 5358 "harboury.c" /* yacc.c:1646 */ break; case 364: -#line 996 "harbour.y" /* yacc.c:1646 */ +#line 994 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5366 "harboury.c" /* yacc.c:1646 */ +#line 5364 "harboury.c" /* yacc.c:1646 */ break; case 365: -#line 997 "harbour.y" /* yacc.c:1646 */ +#line 995 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5372 "harboury.c" /* yacc.c:1646 */ +#line 5370 "harboury.c" /* yacc.c:1646 */ break; case 366: -#line 998 "harbour.y" /* yacc.c:1646 */ +#line 996 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5378 "harboury.c" /* yacc.c:1646 */ +#line 5376 "harboury.c" /* yacc.c:1646 */ break; case 367: -#line 999 "harbour.y" /* yacc.c:1646 */ +#line 997 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5384 "harboury.c" /* yacc.c:1646 */ +#line 5382 "harboury.c" /* yacc.c:1646 */ break; case 368: -#line 1000 "harbour.y" /* yacc.c:1646 */ +#line 998 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewIN( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5390 "harboury.c" /* yacc.c:1646 */ +#line 5388 "harboury.c" /* yacc.c:1646 */ break; case 369: -#line 1001 "harbour.y" /* yacc.c:1646 */ +#line 999 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEqual( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5396 "harboury.c" /* yacc.c:1646 */ +#line 5394 "harboury.c" /* yacc.c:1646 */ break; case 371: -#line 1010 "harbour.y" /* yacc.c:1646 */ +#line 1008 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5402 "harboury.c" /* yacc.c:1646 */ +#line 5400 "harboury.c" /* yacc.c:1646 */ break; case 372: -#line 1011 "harbour.y" /* yacc.c:1646 */ +#line 1009 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5408 "harboury.c" /* yacc.c:1646 */ +#line 5406 "harboury.c" /* yacc.c:1646 */ break; case 373: -#line 1012 "harbour.y" /* yacc.c:1646 */ +#line 1010 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[-3].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5414 "harboury.c" /* yacc.c:1646 */ +#line 5412 "harboury.c" /* yacc.c:1646 */ break; case 374: -#line 1015 "harbour.y" /* yacc.c:1646 */ +#line 1013 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5420 "harboury.c" /* yacc.c:1646 */ +#line 5418 "harboury.c" /* yacc.c:1646 */ break; case 375: -#line 1016 "harbour.y" /* yacc.c:1646 */ +#line 1014 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 5426 "harboury.c" /* yacc.c:1646 */ +#line 5424 "harboury.c" /* yacc.c:1646 */ break; case 376: -#line 1019 "harbour.y" /* yacc.c:1646 */ +#line 1017 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewCodeBlock( (yyvsp[0].asCodeblock).string, (yyvsp[0].asCodeblock).length, (yyvsp[0].asCodeblock).flags, HB_COMP_PARAM ); (yyvsp[0].asCodeblock).string = NULL; } -#line 5432 "harboury.c" /* yacc.c:1646 */ +#line 5430 "harboury.c" /* yacc.c:1646 */ break; case 377: -#line 1020 "harbour.y" /* yacc.c:1646 */ +#line 1018 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-2].asExpr); } -#line 5438 "harboury.c" /* yacc.c:1646 */ +#line 5436 "harboury.c" /* yacc.c:1646 */ break; case 378: -#line 1025 "harbour.y" /* yacc.c:1646 */ +#line 1023 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = NULL; } -#line 5444 "harboury.c" /* yacc.c:1646 */ +#line 5442 "harboury.c" /* yacc.c:1646 */ break; case 379: -#line 1026 "harbour.y" /* yacc.c:1646 */ +#line 1024 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = NULL; (yyvsp[-1].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; } -#line 5450 "harboury.c" /* yacc.c:1646 */ +#line 5448 "harboury.c" /* yacc.c:1646 */ break; case 380: -#line 1027 "harbour.y" /* yacc.c:1646 */ +#line 1025 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 5456 "harboury.c" /* yacc.c:1646 */ +#line 5454 "harboury.c" /* yacc.c:1646 */ break; case 381: -#line 1028 "harbour.y" /* yacc.c:1646 */ +#line 1026 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-2].asExpr); (yyvsp[-3].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; } -#line 5462 "harboury.c" /* yacc.c:1646 */ +#line 5460 "harboury.c" /* yacc.c:1646 */ break; case 382: -#line 1031 "harbour.y" /* yacc.c:1646 */ +#line 1029 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[-2].asExpr), (yyvsp[-1].string), (yyvsp[0].asVarType)->cVarType, HB_COMP_PARAM ); } -#line 5468 "harboury.c" /* yacc.c:1646 */ +#line 5466 "harboury.c" /* yacc.c:1646 */ break; case 383: -#line 1032 "harbour.y" /* yacc.c:1646 */ +#line 1030 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[-4].asExpr), (yyvsp[-1].string), (yyvsp[0].asVarType)->cVarType, HB_COMP_PARAM ); } -#line 5474 "harboury.c" /* yacc.c:1646 */ +#line 5472 "harboury.c" /* yacc.c:1646 */ break; case 384: -#line 1035 "harbour.y" /* yacc.c:1646 */ +#line 1033 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-1) - (1)].asExpr), (yyvsp[0].asExpr) ); } -#line 5480 "harboury.c" /* yacc.c:1646 */ +#line 5478 "harboury.c" /* yacc.c:1646 */ break; case 385: -#line 1036 "harbour.y" /* yacc.c:1646 */ +#line 1034 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-1) - (3)].asExpr), (yyvsp[0].asExpr) ); } -#line 5486 "harboury.c" /* yacc.c:1646 */ +#line 5484 "harboury.c" /* yacc.c:1646 */ break; case 386: -#line 1040 "harbour.y" /* yacc.c:1646 */ +#line 1038 "harbour.y" /* yacc.c:1646 */ { (yyval.bTrue) = HB_COMP_PARAM->functions.pLast->bBlock; HB_COMP_PARAM->functions.pLast->bBlock = HB_TRUE; } -#line 5493 "harboury.c" /* yacc.c:1646 */ +#line 5491 "harboury.c" /* yacc.c:1646 */ break; case 387: -#line 1043 "harbour.y" /* yacc.c:1646 */ +#line 1041 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->bBlock = (yyvsp[-1].bTrue); } -#line 5499 "harboury.c" /* yacc.c:1646 */ +#line 5497 "harboury.c" /* yacc.c:1646 */ break; case 389: -#line 1046 "harbour.y" /* yacc.c:1646 */ +#line 1044 "harbour.y" /* yacc.c:1646 */ { /* 3 */ PHB_CBVAR pVar; (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; @@ -5523,11 +5523,11 @@ yyreduce: pVar =pVar->pNext; } } -#line 5529 "harboury.c" /* yacc.c:1646 */ +#line 5527 "harboury.c" /* yacc.c:1646 */ break; case 390: -#line 1072 "harbour.y" /* yacc.c:1646 */ +#line 1070 "harbour.y" /* yacc.c:1646 */ { /* 6 */ hb_compCodeBlockEnd( HB_COMP_PARAM ); (yyval.asExpr) = hb_compExprSetCodeblockBody( (yyvsp[-4].asExpr), @@ -5536,53 +5536,53 @@ yyreduce: HB_COMP_PARAM->functions.pLast->nPCodePos = (yyvsp[-2].sNumber); HB_COMP_PARAM->lastLine = (yyvsp[-3].sNumber); } -#line 5542 "harboury.c" /* yacc.c:1646 */ +#line 5540 "harboury.c" /* yacc.c:1646 */ break; case 391: -#line 1082 "harbour.y" /* yacc.c:1646 */ +#line 1080 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5548 "harboury.c" /* yacc.c:1646 */ +#line 5546 "harboury.c" /* yacc.c:1646 */ break; case 392: -#line 1083 "harbour.y" /* yacc.c:1646 */ +#line 1081 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 5554 "harboury.c" /* yacc.c:1646 */ +#line 5552 "harboury.c" /* yacc.c:1646 */ break; case 393: -#line 1085 "harbour.y" /* yacc.c:1646 */ +#line 1083 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[-1].asExpr); } -#line 5560 "harboury.c" /* yacc.c:1646 */ +#line 5558 "harboury.c" /* yacc.c:1646 */ break; case 395: -#line 1098 "harbour.y" /* yacc.c:1646 */ +#line 1096 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewIIF( hb_compExprAddListExpr( hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[-5].asExpr), HB_COMP_PARAM ), (yyvsp[-3].asExpr) ), (yyvsp[-1].asExpr) ) ); } -#line 5566 "harboury.c" /* yacc.c:1646 */ +#line 5564 "harboury.c" /* yacc.c:1646 */ break; case 397: -#line 1104 "harbour.y" /* yacc.c:1646 */ +#line 1102 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; hb_compLinePush( HB_COMP_PARAM ); } -#line 5572 "harboury.c" /* yacc.c:1646 */ +#line 5570 "harboury.c" /* yacc.c:1646 */ break; case 399: -#line 1106 "harbour.y" /* yacc.c:1646 */ +#line 1104 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_STATIC; hb_compLinePush( HB_COMP_PARAM ); } -#line 5578 "harboury.c" /* yacc.c:1646 */ +#line 5576 "harboury.c" /* yacc.c:1646 */ break; case 401: -#line 1108 "harbour.y" /* yacc.c:1646 */ +#line 1106 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_TH_STATIC; hb_compLinePush( HB_COMP_PARAM ); } -#line 5584 "harboury.c" /* yacc.c:1646 */ +#line 5582 "harboury.c" /* yacc.c:1646 */ break; case 403: -#line 1110 "harbour.y" /* yacc.c:1646 */ +#line 1108 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_PARAMETERS_NOT_ALLOWED, NULL, NULL ); else @@ -5591,64 +5591,64 @@ yyreduce: HB_COMP_PARAM->iVarScope = ( HB_VSCOMP_PRIVATE | HB_VSCOMP_PARAMETER ); } } -#line 5597 "harboury.c" /* yacc.c:1646 */ +#line 5595 "harboury.c" /* yacc.c:1646 */ break; case 404: -#line 1117 "harbour.y" /* yacc.c:1646 */ +#line 1115 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5603 "harboury.c" /* yacc.c:1646 */ +#line 5601 "harboury.c" /* yacc.c:1646 */ break; case 405: -#line 1120 "harbour.y" /* yacc.c:1646 */ +#line 1118 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = 1; } -#line 5609 "harboury.c" /* yacc.c:1646 */ +#line 5607 "harboury.c" /* yacc.c:1646 */ break; case 406: -#line 1121 "harbour.y" /* yacc.c:1646 */ +#line 1119 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber)++; } -#line 5615 "harboury.c" /* yacc.c:1646 */ +#line 5613 "harboury.c" /* yacc.c:1646 */ break; case 407: -#line 1124 "harbour.y" /* yacc.c:1646 */ +#line 1122 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = 1; } -#line 5621 "harboury.c" /* yacc.c:1646 */ +#line 5619 "harboury.c" /* yacc.c:1646 */ break; case 408: -#line 1125 "harbour.y" /* yacc.c:1646 */ +#line 1123 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber)++; } -#line 5627 "harboury.c" /* yacc.c:1646 */ +#line 5625 "harboury.c" /* yacc.c:1646 */ break; case 410: -#line 1135 "harbour.y" /* yacc.c:1646 */ +#line 1133 "harbour.y" /* yacc.c:1646 */ { hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( NULL, (yyvsp[-1].asExpr), HB_COMP_PARAM ), HB_FALSE ); } -#line 5633 "harboury.c" /* yacc.c:1646 */ +#line 5631 "harboury.c" /* yacc.c:1646 */ break; case 411: -#line 1137 "harbour.y" /* yacc.c:1646 */ +#line 1135 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[0].asExpr), HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( NULL, (yyvsp[-3].asExpr), HB_COMP_PARAM ), HB_TRUE ); } -#line 5641 "harboury.c" /* yacc.c:1646 */ +#line 5639 "harboury.c" /* yacc.c:1646 */ break; case 412: -#line 1141 "harbour.y" /* yacc.c:1646 */ +#line 1139 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compArrayDimPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( NULL, (yyvsp[-2].asExpr), HB_COMP_PARAM ), HB_TRUE ); } -#line 5650 "harboury.c" /* yacc.c:1646 */ +#line 5648 "harboury.c" /* yacc.c:1646 */ break; case 413: -#line 1148 "harbour.y" /* yacc.c:1646 */ +#line 1146 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) @@ -5666,19 +5666,19 @@ yyreduce: HB_COMP_EXPR_FREE( hb_compExprGenPush( hb_compExprNewNil( HB_COMP_PARAM ), HB_COMP_PARAM ) ); } } -#line 5672 "harboury.c" /* yacc.c:1646 */ +#line 5670 "harboury.c" /* yacc.c:1646 */ break; case 414: -#line 1165 "harbour.y" /* yacc.c:1646 */ +#line 1163 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = HB_COMP_PARAM->iVarScope; hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5680 "harboury.c" /* yacc.c:1646 */ +#line 5678 "harboury.c" /* yacc.c:1646 */ break; case 415: -#line 1169 "harbour.y" /* yacc.c:1646 */ +#line 1167 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = (yyvsp[-2].iNumber); if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) @@ -5703,97 +5703,97 @@ yyreduce: } HB_COMP_PARAM->iVarScope = (yyvsp[-2].iNumber); } -#line 5709 "harboury.c" /* yacc.c:1646 */ +#line 5707 "harboury.c" /* yacc.c:1646 */ break; case 416: -#line 1194 "harbour.y" /* yacc.c:1646 */ +#line 1192 "harbour.y" /* yacc.c:1646 */ { hb_compVariableDim( (yyvsp[-2].string), (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 5715 "harboury.c" /* yacc.c:1646 */ +#line 5713 "harboury.c" /* yacc.c:1646 */ break; case 418: -#line 1203 "harbour.y" /* yacc.c:1646 */ +#line 1201 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 5721 "harboury.c" /* yacc.c:1646 */ +#line 5719 "harboury.c" /* yacc.c:1646 */ break; case 419: -#line 1204 "harbour.y" /* yacc.c:1646 */ +#line 1202 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 5727 "harboury.c" /* yacc.c:1646 */ +#line 5725 "harboury.c" /* yacc.c:1646 */ break; case 420: -#line 1205 "harbour.y" /* yacc.c:1646 */ +#line 1203 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-3].asExpr), (yyvsp[0].asExpr) ); } -#line 5733 "harboury.c" /* yacc.c:1646 */ +#line 5731 "harboury.c" /* yacc.c:1646 */ break; case 421: -#line 1208 "harbour.y" /* yacc.c:1646 */ +#line 1206 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_FIELD; } -#line 5739 "harboury.c" /* yacc.c:1646 */ +#line 5737 "harboury.c" /* yacc.c:1646 */ break; case 422: -#line 1210 "harbour.y" /* yacc.c:1646 */ +#line 1208 "harbour.y" /* yacc.c:1646 */ { if( (yyvsp[-1].string) ) hb_compFieldSetAlias( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[-2].iNumber) ); } -#line 5747 "harboury.c" /* yacc.c:1646 */ +#line 5745 "harboury.c" /* yacc.c:1646 */ break; case 423: -#line 1215 "harbour.y" /* yacc.c:1646 */ +#line 1213 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = hb_compFieldsCount( HB_COMP_PARAM ); hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5753 "harboury.c" /* yacc.c:1646 */ +#line 5751 "harboury.c" /* yacc.c:1646 */ break; case 424: -#line 1216 "harbour.y" /* yacc.c:1646 */ +#line 1214 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5759 "harboury.c" /* yacc.c:1646 */ +#line 5757 "harboury.c" /* yacc.c:1646 */ break; case 425: -#line 1219 "harbour.y" /* yacc.c:1646 */ +#line 1217 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = NULL; } -#line 5765 "harboury.c" /* yacc.c:1646 */ +#line 5763 "harboury.c" /* yacc.c:1646 */ break; case 426: -#line 1220 "harbour.y" /* yacc.c:1646 */ +#line 1218 "harbour.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 5771 "harboury.c" /* yacc.c:1646 */ +#line 5769 "harboury.c" /* yacc.c:1646 */ break; case 427: -#line 1223 "harbour.y" /* yacc.c:1646 */ +#line 1221 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_MEMVAR; } -#line 5777 "harboury.c" /* yacc.c:1646 */ +#line 5775 "harboury.c" /* yacc.c:1646 */ break; case 429: -#line 1226 "harbour.y" /* yacc.c:1646 */ +#line 1224 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5783 "harboury.c" /* yacc.c:1646 */ +#line 5781 "harboury.c" /* yacc.c:1646 */ break; case 430: -#line 1227 "harbour.y" /* yacc.c:1646 */ +#line 1225 "harbour.y" /* yacc.c:1646 */ { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5789 "harboury.c" /* yacc.c:1646 */ +#line 5787 "harboury.c" /* yacc.c:1646 */ break; case 431: -#line 1230 "harbour.y" /* yacc.c:1646 */ +#line 1228 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredAdd( HB_COMP_PARAM, (yyvsp[-1].string) ); HB_COMP_PARAM->szDeclaredFun = (yyvsp[-1].string); } -#line 5795 "harboury.c" /* yacc.c:1646 */ +#line 5793 "harboury.c" /* yacc.c:1646 */ break; case 432: -#line 1231 "harbour.y" /* yacc.c:1646 */ +#line 1229 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->pLastDeclared ) { @@ -5812,59 +5812,59 @@ yyreduce: HB_COMP_PARAM->szDeclaredFun = NULL; HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5818 "harboury.c" /* yacc.c:1646 */ +#line 5816 "harboury.c" /* yacc.c:1646 */ break; case 433: -#line 1249 "harbour.y" /* yacc.c:1646 */ +#line 1247 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[0].string), NULL ); } -#line 5824 "harboury.c" /* yacc.c:1646 */ +#line 5822 "harboury.c" /* yacc.c:1646 */ break; case 434: -#line 1249 "harbour.y" /* yacc.c:1646 */ +#line 1247 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5830 "harboury.c" /* yacc.c:1646 */ +#line 5828 "harboury.c" /* yacc.c:1646 */ break; case 435: -#line 1250 "harbour.y" /* yacc.c:1646 */ +#line 1248 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[-1].string), NULL ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5836 "harboury.c" /* yacc.c:1646 */ +#line 5834 "harboury.c" /* yacc.c:1646 */ break; case 436: -#line 1251 "harbour.y" /* yacc.c:1646 */ +#line 1249 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[-2].string), (yyvsp[-1].string) ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5842 "harboury.c" /* yacc.c:1646 */ +#line 5840 "harboury.c" /* yacc.c:1646 */ break; case 437: -#line 1252 "harbour.y" /* yacc.c:1646 */ +#line 1250 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5848 "harboury.c" /* yacc.c:1646 */ +#line 5846 "harboury.c" /* yacc.c:1646 */ break; case 438: -#line 1253 "harbour.y" /* yacc.c:1646 */ +#line 1251 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->cDataListType = (yyvsp[0].asVarType)->cVarType; } -#line 5854 "harboury.c" /* yacc.c:1646 */ +#line 5852 "harboury.c" /* yacc.c:1646 */ break; case 439: -#line 1253 "harbour.y" /* yacc.c:1646 */ +#line 1251 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->cDataListType = 0; HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } -#line 5860 "harboury.c" /* yacc.c:1646 */ +#line 5858 "harboury.c" /* yacc.c:1646 */ break; case 446: -#line 1266 "harbour.y" /* yacc.c:1646 */ +#line 1264 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->pLastMethod = hb_compMethodAdd( HB_COMP_PARAM, HB_COMP_PARAM->pLastClass, (yyvsp[-1].string) ); } -#line 5866 "harboury.c" /* yacc.c:1646 */ +#line 5864 "harboury.c" /* yacc.c:1646 */ break; case 447: -#line 1267 "harbour.y" /* yacc.c:1646 */ +#line 1265 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->pLastMethod ) { @@ -5881,17 +5881,17 @@ yyreduce: } HB_COMP_PARAM->pLastMethod = NULL; } -#line 5887 "harboury.c" /* yacc.c:1646 */ +#line 5885 "harboury.c" /* yacc.c:1646 */ break; case 448: -#line 1285 "harbour.y" /* yacc.c:1646 */ +#line 1283 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->pLastMethod = hb_compMethodAdd( HB_COMP_PARAM, HB_COMP_PARAM->pLastClass, (yyvsp[0].string) ); } -#line 5893 "harboury.c" /* yacc.c:1646 */ +#line 5891 "harboury.c" /* yacc.c:1646 */ break; case 449: -#line 1286 "harbour.y" /* yacc.c:1646 */ +#line 1284 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->pLastMethod ) { @@ -5944,315 +5944,315 @@ yyreduce: HB_COMP_PARAM->pLastMethod = NULL; } -#line 5950 "harboury.c" /* yacc.c:1646 */ +#line 5948 "harboury.c" /* yacc.c:1646 */ break; case 463: -#line 1359 "harbour.y" /* yacc.c:1646 */ +#line 1357 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[0].asExpr) ); } -#line 5956 "harboury.c" /* yacc.c:1646 */ +#line 5954 "harboury.c" /* yacc.c:1646 */ break; case 464: -#line 1362 "harbour.y" /* yacc.c:1646 */ +#line 1360 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5962 "harboury.c" /* yacc.c:1646 */ +#line 5960 "harboury.c" /* yacc.c:1646 */ break; case 465: -#line 1363 "harbour.y" /* yacc.c:1646 */ +#line 1361 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 5968 "harboury.c" /* yacc.c:1646 */ +#line 5966 "harboury.c" /* yacc.c:1646 */ break; case 466: -#line 1364 "harbour.y" /* yacc.c:1646 */ +#line 1362 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-3].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F', NULL ) ); } -#line 5974 "harboury.c" /* yacc.c:1646 */ +#line 5972 "harboury.c" /* yacc.c:1646 */ break; case 467: -#line 1365 "harbour.y" /* yacc.c:1646 */ +#line 1363 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), (yyvsp[0].asVarType) ); } -#line 5980 "harboury.c" /* yacc.c:1646 */ +#line 5978 "harboury.c" /* yacc.c:1646 */ break; case 468: -#line 1366 "harbour.y" /* yacc.c:1646 */ +#line 1364 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 5986 "harboury.c" /* yacc.c:1646 */ +#line 5984 "harboury.c" /* yacc.c:1646 */ break; case 469: -#line 1367 "harbour.y" /* yacc.c:1646 */ +#line 1365 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-3].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F', NULL ) ); } -#line 5992 "harboury.c" /* yacc.c:1646 */ +#line 5990 "harboury.c" /* yacc.c:1646 */ break; case 470: -#line 1370 "harbour.y" /* yacc.c:1646 */ +#line 1368 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } -#line 5998 "harboury.c" /* yacc.c:1646 */ +#line 5996 "harboury.c" /* yacc.c:1646 */ break; case 471: -#line 1371 "harbour.y" /* yacc.c:1646 */ +#line 1369 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 6004 "harboury.c" /* yacc.c:1646 */ +#line 6002 "harboury.c" /* yacc.c:1646 */ break; case 472: -#line 1372 "harbour.y" /* yacc.c:1646 */ +#line 1370 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-3].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 6010 "harboury.c" /* yacc.c:1646 */ +#line 6008 "harboury.c" /* yacc.c:1646 */ break; case 473: -#line 1373 "harbour.y" /* yacc.c:1646 */ +#line 1371 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } -#line 6016 "harboury.c" /* yacc.c:1646 */ +#line 6014 "harboury.c" /* yacc.c:1646 */ break; case 474: -#line 1374 "harbour.y" /* yacc.c:1646 */ +#line 1372 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-1].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[0].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 6022 "harboury.c" /* yacc.c:1646 */ +#line 6020 "harboury.c" /* yacc.c:1646 */ break; case 475: -#line 1375 "harbour.y" /* yacc.c:1646 */ +#line 1373 "harbour.y" /* yacc.c:1646 */ { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[-3].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } -#line 6028 "harboury.c" /* yacc.c:1646 */ +#line 6026 "harboury.c" /* yacc.c:1646 */ break; case 484: -#line 1388 "harbour.y" /* yacc.c:1646 */ +#line 1386 "harbour.y" /* yacc.c:1646 */ { hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6034 "harboury.c" /* yacc.c:1646 */ +#line 6032 "harboury.c" /* yacc.c:1646 */ break; case 485: -#line 1389 "harbour.y" /* yacc.c:1646 */ +#line 1387 "harbour.y" /* yacc.c:1646 */ { hb_compGenJumpHere( (yyvsp[-2].sNumber), HB_COMP_PARAM ); } -#line 6040 "harboury.c" /* yacc.c:1646 */ +#line 6038 "harboury.c" /* yacc.c:1646 */ break; case 486: -#line 1390 "harbour.y" /* yacc.c:1646 */ +#line 1388 "harbour.y" /* yacc.c:1646 */ { hb_compGenJumpHere( (yyvsp[-2].sNumber), HB_COMP_PARAM ); hb_compElseIfFix( HB_COMP_PARAM, (yyvsp[-1].pVoid) ); } -#line 6046 "harboury.c" /* yacc.c:1646 */ +#line 6044 "harboury.c" /* yacc.c:1646 */ break; case 487: -#line 1391 "harbour.y" /* yacc.c:1646 */ +#line 1389 "harbour.y" /* yacc.c:1646 */ { hb_compGenJumpHere( (yyvsp[-3].sNumber), HB_COMP_PARAM ); hb_compElseIfFix( HB_COMP_PARAM, (yyvsp[-2].pVoid) ); } -#line 6052 "harboury.c" /* yacc.c:1646 */ +#line 6050 "harboury.c" /* yacc.c:1646 */ break; case 488: -#line 1395 "harbour.y" /* yacc.c:1646 */ +#line 1393 "harbour.y" /* yacc.c:1646 */ { ++HB_COMP_PARAM->functions.pLast->wIfCounter; hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 6058 "harboury.c" /* yacc.c:1646 */ +#line 6056 "harboury.c" /* yacc.c:1646 */ break; case 489: -#line 1397 "harbour.y" /* yacc.c:1646 */ +#line 1395 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-2].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6064 "harboury.c" /* yacc.c:1646 */ +#line 6062 "harboury.c" /* yacc.c:1646 */ break; case 490: -#line 1399 "harbour.y" /* yacc.c:1646 */ +#line 1397 "harbour.y" /* yacc.c:1646 */ { (yyval.sNumber) = hb_compGenJump( 0, HB_COMP_PARAM ); hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6070 "harboury.c" /* yacc.c:1646 */ +#line 6068 "harboury.c" /* yacc.c:1646 */ break; case 491: -#line 1402 "harbour.y" /* yacc.c:1646 */ +#line 1400 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } -#line 6076 "harboury.c" /* yacc.c:1646 */ +#line 6074 "harboury.c" /* yacc.c:1646 */ break; case 493: -#line 1406 "harbour.y" /* yacc.c:1646 */ +#line 1404 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } -#line 6082 "harboury.c" /* yacc.c:1646 */ +#line 6080 "harboury.c" /* yacc.c:1646 */ break; case 494: -#line 1408 "harbour.y" /* yacc.c:1646 */ +#line 1406 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6090 "harboury.c" /* yacc.c:1646 */ +#line 6088 "harboury.c" /* yacc.c:1646 */ break; case 495: -#line 1412 "harbour.y" /* yacc.c:1646 */ +#line 1410 "harbour.y" /* yacc.c:1646 */ { (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, NULL, hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6098 "harboury.c" /* yacc.c:1646 */ +#line 6096 "harboury.c" /* yacc.c:1646 */ break; case 496: -#line 1416 "harbour.y" /* yacc.c:1646 */ +#line 1414 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } -#line 6104 "harboury.c" /* yacc.c:1646 */ +#line 6102 "harboury.c" /* yacc.c:1646 */ break; case 497: -#line 1418 "harbour.y" /* yacc.c:1646 */ +#line 1416 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6112 "harboury.c" /* yacc.c:1646 */ +#line 6110 "harboury.c" /* yacc.c:1646 */ break; case 498: -#line 1422 "harbour.y" /* yacc.c:1646 */ +#line 1420 "harbour.y" /* yacc.c:1646 */ { (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, (yyvsp[-6].pVoid), hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6120 "harboury.c" /* yacc.c:1646 */ +#line 6118 "harboury.c" /* yacc.c:1646 */ break; case 499: -#line 1428 "harbour.y" /* yacc.c:1646 */ +#line 1426 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wIfCounter ) --HB_COMP_PARAM->functions.pLast->wIfCounter; HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } -#line 6130 "harboury.c" /* yacc.c:1646 */ +#line 6128 "harboury.c" /* yacc.c:1646 */ break; case 502: -#line 1441 "harbour.y" /* yacc.c:1646 */ +#line 1439 "harbour.y" /* yacc.c:1646 */ { hb_compElseIfFix( HB_COMP_PARAM, (yyvsp[-1].pVoid) ); } -#line 6136 "harboury.c" /* yacc.c:1646 */ +#line 6134 "harboury.c" /* yacc.c:1646 */ break; case 505: -#line 1453 "harbour.y" /* yacc.c:1646 */ +#line 1451 "harbour.y" /* yacc.c:1646 */ { hb_compElseIfFix( HB_COMP_PARAM, (yyvsp[-2].pVoid) ); } -#line 6142 "harboury.c" /* yacc.c:1646 */ +#line 6140 "harboury.c" /* yacc.c:1646 */ break; case 506: -#line 1457 "harbour.y" /* yacc.c:1646 */ +#line 1455 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wCaseCounter ) --HB_COMP_PARAM->functions.pLast->wCaseCounter; HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } -#line 6151 "harboury.c" /* yacc.c:1646 */ +#line 6149 "harboury.c" /* yacc.c:1646 */ break; case 509: -#line 1467 "harbour.y" /* yacc.c:1646 */ +#line 1465 "harbour.y" /* yacc.c:1646 */ { ++HB_COMP_PARAM->functions.pLast->wCaseCounter; hb_compLinePushIfDebugger( HB_COMP_PARAM );} -#line 6157 "harboury.c" /* yacc.c:1646 */ +#line 6155 "harboury.c" /* yacc.c:1646 */ break; case 512: -#line 1471 "harbour.y" /* yacc.c:1646 */ +#line 1469 "harbour.y" /* yacc.c:1646 */ { if( (yyvsp[0].lNumber) > 0 ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } } -#line 6168 "harboury.c" /* yacc.c:1646 */ +#line 6166 "harboury.c" /* yacc.c:1646 */ break; case 513: -#line 1479 "harbour.y" /* yacc.c:1646 */ +#line 1477 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 6174 "harboury.c" /* yacc.c:1646 */ +#line 6172 "harboury.c" /* yacc.c:1646 */ break; case 514: -#line 1480 "harbour.y" /* yacc.c:1646 */ +#line 1478 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6183 "harboury.c" /* yacc.c:1646 */ +#line 6181 "harboury.c" /* yacc.c:1646 */ break; case 515: -#line 1485 "harbour.y" /* yacc.c:1646 */ +#line 1483 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, NULL, hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6193 "harboury.c" /* yacc.c:1646 */ +#line 6191 "harboury.c" /* yacc.c:1646 */ break; case 516: -#line 1491 "harbour.y" /* yacc.c:1646 */ +#line 1489 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 6199 "harboury.c" /* yacc.c:1646 */ +#line 6197 "harboury.c" /* yacc.c:1646 */ break; case 517: -#line 1492 "harbour.y" /* yacc.c:1646 */ +#line 1490 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6208 "harboury.c" /* yacc.c:1646 */ +#line 6206 "harboury.c" /* yacc.c:1646 */ break; case 518: -#line 1497 "harbour.y" /* yacc.c:1646 */ +#line 1495 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, (yyvsp[-6].pVoid), hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[-1].sNumber), HB_COMP_PARAM ); } -#line 6218 "harboury.c" /* yacc.c:1646 */ +#line 6216 "harboury.c" /* yacc.c:1646 */ break; case 519: -#line 1504 "harbour.y" /* yacc.c:1646 */ +#line 1502 "harbour.y" /* yacc.c:1646 */ {hb_compLinePushIfDebugger( HB_COMP_PARAM ); } -#line 6224 "harboury.c" /* yacc.c:1646 */ +#line 6222 "harboury.c" /* yacc.c:1646 */ break; case 520: -#line 1504 "harbour.y" /* yacc.c:1646 */ +#line 1502 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } -#line 6230 "harboury.c" /* yacc.c:1646 */ +#line 6228 "harboury.c" /* yacc.c:1646 */ break; case 522: -#line 1506 "harbour.y" /* yacc.c:1646 */ +#line 1504 "harbour.y" /* yacc.c:1646 */ { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } -#line 6236 "harboury.c" /* yacc.c:1646 */ +#line 6234 "harboury.c" /* yacc.c:1646 */ break; case 524: -#line 1511 "harbour.y" /* yacc.c:1646 */ +#line 1509 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6245 "harboury.c" /* yacc.c:1646 */ +#line 6243 "harboury.c" /* yacc.c:1646 */ break; case 525: -#line 1516 "harbour.y" /* yacc.c:1646 */ +#line 1514 "harbour.y" /* yacc.c:1646 */ { hb_compLoopHere( HB_COMP_PARAM ); hb_compGenJump( (yyvsp[-4].sNumber) - HB_COMP_PARAM->functions.pLast->nPCodePos, HB_COMP_PARAM ); } -#line 6254 "harboury.c" /* yacc.c:1646 */ +#line 6252 "harboury.c" /* yacc.c:1646 */ break; case 526: -#line 1521 "harbour.y" /* yacc.c:1646 */ +#line 1519 "harbour.y" /* yacc.c:1646 */ { hb_compGenJumpHere( (yyvsp[-3].sNumber), HB_COMP_PARAM ); if( HB_COMP_PARAM->functions.pLast->wWhileCounter ) @@ -6260,28 +6260,28 @@ yyreduce: hb_compLoopEnd( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } -#line 6266 "harboury.c" /* yacc.c:1646 */ +#line 6264 "harboury.c" /* yacc.c:1646 */ break; case 527: -#line 1531 "harbour.y" /* yacc.c:1646 */ +#line 1529 "harbour.y" /* yacc.c:1646 */ { (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; hb_compLinePushIfInside( HB_COMP_PARAM ); ++HB_COMP_PARAM->functions.pLast->wWhileCounter; hb_compLoopStart( HB_COMP_PARAM, HB_TRUE ); } -#line 6277 "harboury.c" /* yacc.c:1646 */ +#line 6275 "harboury.c" /* yacc.c:1646 */ break; case 528: -#line 1540 "harbour.y" /* yacc.c:1646 */ +#line 1538 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } -#line 6283 "harboury.c" /* yacc.c:1646 */ +#line 6281 "harboury.c" /* yacc.c:1646 */ break; case 531: -#line 1548 "harbour.y" /* yacc.c:1646 */ +#line 1546 "harbour.y" /* yacc.c:1646 */ { /* 5 */ hb_compLinePushIfInside( HB_COMP_PARAM ); (yyvsp[-3].iNumber) = HB_COMP_PARAM->currLine; @@ -6294,28 +6294,28 @@ yyreduce: hb_compForStart( HB_COMP_PARAM, hb_compExprAsSymbol( (yyvsp[-2].asExpr) ), 0 ); } } -#line 6300 "harboury.c" /* yacc.c:1646 */ +#line 6298 "harboury.c" /* yacc.c:1646 */ break; case 532: -#line 1561 "harbour.y" /* yacc.c:1646 */ +#line 1559 "harbour.y" /* yacc.c:1646 */ { /* 9 */ hb_compLoopStart( HB_COMP_PARAM, HB_TRUE ); (yyval.sNumber) = hb_compGenJump( 0, HB_COMP_PARAM ); } -#line 6309 "harboury.c" /* yacc.c:1646 */ +#line 6307 "harboury.c" /* yacc.c:1646 */ break; case 533: -#line 1566 "harbour.y" /* yacc.c:1646 */ +#line 1564 "harbour.y" /* yacc.c:1646 */ { /* 11 */ (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; } -#line 6317 "harboury.c" /* yacc.c:1646 */ +#line 6315 "harboury.c" /* yacc.c:1646 */ break; case 534: -#line 1570 "harbour.y" /* yacc.c:1646 */ +#line 1568 "harbour.y" /* yacc.c:1646 */ { int iSign, iLine; @@ -6358,85 +6358,85 @@ yyreduce: HB_COMP_EXPR_FREE( (yyvsp[-7].asExpr) ); /* deletes $5, $2, $4 */ HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } -#line 6364 "harboury.c" /* yacc.c:1646 */ +#line 6362 "harboury.c" /* yacc.c:1646 */ break; case 537: -#line 1618 "harbour.y" /* yacc.c:1646 */ +#line 1616 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = NULL; } -#line 6370 "harboury.c" /* yacc.c:1646 */ +#line 6368 "harboury.c" /* yacc.c:1646 */ break; case 538: -#line 1619 "harbour.y" /* yacc.c:1646 */ +#line 1617 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprReduce( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6376 "harboury.c" /* yacc.c:1646 */ +#line 6374 "harboury.c" /* yacc.c:1646 */ break; case 539: -#line 1623 "harbour.y" /* yacc.c:1646 */ +#line 1621 "harbour.y" /* yacc.c:1646 */ { hb_compLinePush( HB_COMP_PARAM ); if( HB_COMP_PARAM->functions.pLast->wForCounter ) --HB_COMP_PARAM->functions.pLast->wForCounter; } -#line 6386 "harboury.c" /* yacc.c:1646 */ +#line 6384 "harboury.c" /* yacc.c:1646 */ break; case 544: -#line 1636 "harbour.y" /* yacc.c:1646 */ +#line 1634 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 6392 "harboury.c" /* yacc.c:1646 */ +#line 6390 "harboury.c" /* yacc.c:1646 */ break; case 545: -#line 1637 "harbour.y" /* yacc.c:1646 */ +#line 1635 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6398 "harboury.c" /* yacc.c:1646 */ +#line 6396 "harboury.c" /* yacc.c:1646 */ break; case 546: -#line 1640 "harbour.y" /* yacc.c:1646 */ +#line 1638 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6404 "harboury.c" /* yacc.c:1646 */ +#line 6402 "harboury.c" /* yacc.c:1646 */ break; case 547: -#line 1641 "harbour.y" /* yacc.c:1646 */ +#line 1639 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 6410 "harboury.c" /* yacc.c:1646 */ +#line 6408 "harboury.c" /* yacc.c:1646 */ break; case 548: -#line 1644 "harbour.y" /* yacc.c:1646 */ +#line 1642 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 6416 "harboury.c" /* yacc.c:1646 */ +#line 6414 "harboury.c" /* yacc.c:1646 */ break; case 550: -#line 1648 "harbour.y" /* yacc.c:1646 */ +#line 1646 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6422 "harboury.c" /* yacc.c:1646 */ +#line 6420 "harboury.c" /* yacc.c:1646 */ break; case 551: -#line 1649 "harbour.y" /* yacc.c:1646 */ +#line 1647 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 6428 "harboury.c" /* yacc.c:1646 */ +#line 6426 "harboury.c" /* yacc.c:1646 */ break; case 552: -#line 1654 "harbour.y" /* yacc.c:1646 */ +#line 1652 "harbour.y" /* yacc.c:1646 */ { ++HB_COMP_PARAM->functions.pLast->wForCounter; /* 5 */ hb_compLinePushIfInside( HB_COMP_PARAM ); hb_compDebugStart(); } -#line 6438 "harboury.c" /* yacc.c:1646 */ +#line 6436 "harboury.c" /* yacc.c:1646 */ break; case 553: -#line 1660 "harbour.y" /* yacc.c:1646 */ +#line 1658 "harbour.y" /* yacc.c:1646 */ { /* 7 */ (yyvsp[-4].asExpr) = hb_compExprReduce( (yyvsp[-4].asExpr), HB_COMP_PARAM ); @@ -6446,20 +6446,20 @@ yyreduce: hb_compLoopStart( HB_COMP_PARAM, HB_TRUE ); (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; } -#line 6452 "harboury.c" /* yacc.c:1646 */ +#line 6450 "harboury.c" /* yacc.c:1646 */ break; case 554: -#line 1670 "harbour.y" /* yacc.c:1646 */ +#line 1668 "harbour.y" /* yacc.c:1646 */ { /* 9 */ (yyval.sNumber) = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); } -#line 6461 "harboury.c" /* yacc.c:1646 */ +#line 6459 "harboury.c" /* yacc.c:1646 */ break; case 555: -#line 1675 "harbour.y" /* yacc.c:1646 */ +#line 1673 "harbour.y" /* yacc.c:1646 */ { hb_compLoopHere( HB_COMP_PARAM ); hb_compEnumNext( HB_COMP_PARAM, (yyvsp[-8].asExpr), (yyvsp[-4].iNumber) ); @@ -6472,122 +6472,122 @@ yyreduce: HB_COMP_EXPR_FREE( (yyvsp[-8].asExpr) ); HB_COMP_EXPR_FREE( (yyvsp[-6].asExpr) ); } -#line 6478 "harboury.c" /* yacc.c:1646 */ +#line 6476 "harboury.c" /* yacc.c:1646 */ break; case 556: -#line 1689 "harbour.y" /* yacc.c:1646 */ +#line 1687 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = 1; } -#line 6484 "harboury.c" /* yacc.c:1646 */ +#line 6482 "harboury.c" /* yacc.c:1646 */ break; case 557: -#line 1690 "harbour.y" /* yacc.c:1646 */ +#line 1688 "harbour.y" /* yacc.c:1646 */ { (yyval.iNumber) = -1; } -#line 6490 "harboury.c" /* yacc.c:1646 */ +#line 6488 "harboury.c" /* yacc.c:1646 */ break; case 558: -#line 1694 "harbour.y" /* yacc.c:1646 */ +#line 1692 "harbour.y" /* yacc.c:1646 */ { hb_compLoopStart( HB_COMP_PARAM, HB_FALSE ); hb_compSwitchStart( HB_COMP_PARAM, (yyvsp[0].asExpr) ); hb_compGenJump( 0, HB_COMP_PARAM ); } -#line 6500 "harboury.c" /* yacc.c:1646 */ +#line 6498 "harboury.c" /* yacc.c:1646 */ break; case 559: -#line 1701 "harbour.y" /* yacc.c:1646 */ +#line 1699 "harbour.y" /* yacc.c:1646 */ { hb_compSwitchEnd( HB_COMP_PARAM ); hb_compLoopEnd( HB_COMP_PARAM ); } -#line 6509 "harboury.c" /* yacc.c:1646 */ +#line 6507 "harboury.c" /* yacc.c:1646 */ break; case 560: -#line 1708 "harbour.y" /* yacc.c:1646 */ +#line 1706 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( (yyvsp[-1].asExpr) ); } -#line 6517 "harboury.c" /* yacc.c:1646 */ +#line 6515 "harboury.c" /* yacc.c:1646 */ break; case 561: -#line 1714 "harbour.y" /* yacc.c:1646 */ +#line 1712 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wSwitchCounter ) --HB_COMP_PARAM->functions.pLast->wSwitchCounter; HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } -#line 6527 "harboury.c" /* yacc.c:1646 */ +#line 6525 "harboury.c" /* yacc.c:1646 */ break; case 564: -#line 1726 "harbour.y" /* yacc.c:1646 */ +#line 1724 "harbour.y" /* yacc.c:1646 */ { ++HB_COMP_PARAM->functions.pLast->wSwitchCounter; hb_compLinePushIfInside( HB_COMP_PARAM ); } -#line 6536 "harboury.c" /* yacc.c:1646 */ +#line 6534 "harboury.c" /* yacc.c:1646 */ break; case 565: -#line 1731 "harbour.y" /* yacc.c:1646 */ +#line 1729 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprReduce( (yyvsp[-1].asExpr), HB_COMP_PARAM ); } -#line 6544 "harboury.c" /* yacc.c:1646 */ +#line 6542 "harboury.c" /* yacc.c:1646 */ break; case 567: -#line 1738 "harbour.y" /* yacc.c:1646 */ +#line 1736 "harbour.y" /* yacc.c:1646 */ { if( (yyvsp[0].lNumber) > 0 ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } } -#line 6555 "harboury.c" /* yacc.c:1646 */ +#line 6553 "harboury.c" /* yacc.c:1646 */ break; case 568: -#line 1746 "harbour.y" /* yacc.c:1646 */ +#line 1744 "harbour.y" /* yacc.c:1646 */ { hb_compSwitchAdd( HB_COMP_PARAM, (yyvsp[0].asExpr) ); hb_compLinePush( HB_COMP_PARAM ); } -#line 6561 "harboury.c" /* yacc.c:1646 */ +#line 6559 "harboury.c" /* yacc.c:1646 */ break; case 570: -#line 1749 "harbour.y" /* yacc.c:1646 */ +#line 1747 "harbour.y" /* yacc.c:1646 */ { hb_compSwitchAdd( HB_COMP_PARAM, (yyvsp[0].asExpr) ); hb_compLinePush( HB_COMP_PARAM ); } -#line 6567 "harboury.c" /* yacc.c:1646 */ +#line 6565 "harboury.c" /* yacc.c:1646 */ break; case 574: -#line 1757 "harbour.y" /* yacc.c:1646 */ +#line 1755 "harbour.y" /* yacc.c:1646 */ { hb_compSwitchAdd( HB_COMP_PARAM, NULL ); hb_compLinePush( HB_COMP_PARAM ); } -#line 6573 "harboury.c" /* yacc.c:1646 */ +#line 6571 "harboury.c" /* yacc.c:1646 */ break; case 575: -#line 1757 "harbour.y" /* yacc.c:1646 */ +#line 1755 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } -#line 6579 "harboury.c" /* yacc.c:1646 */ +#line 6577 "harboury.c" /* yacc.c:1646 */ break; case 577: -#line 1762 "harbour.y" /* yacc.c:1646 */ +#line 1760 "harbour.y" /* yacc.c:1646 */ { /* 2 */ hb_compLinePushIfInside( HB_COMP_PARAM ); ++HB_COMP_PARAM->functions.pLast->wSeqCounter; (yyval.sNumber) = hb_compSequenceBegin( HB_COMP_PARAM ); } -#line 6589 "harboury.c" /* yacc.c:1646 */ +#line 6587 "harboury.c" /* yacc.c:1646 */ break; case 578: -#line 1770 "harbour.y" /* yacc.c:1646 */ +#line 1768 "harbour.y" /* yacc.c:1646 */ { /* 6 */ /* Set jump address for HB_P_SEQBEGIN opcode - this address * will be used in BREAK code if there is no RECOVER clause @@ -6598,11 +6598,11 @@ yyreduce: (yyval.sNumber) = hb_compSequenceEnd( HB_COMP_PARAM ); (yyvsp[-1].lNumber) = hb_compLoopCount( HB_COMP_PARAM ); } -#line 6604 "harboury.c" /* yacc.c:1646 */ +#line 6602 "harboury.c" /* yacc.c:1646 */ break; case 579: -#line 1781 "harbour.y" /* yacc.c:1646 */ +#line 1779 "harbour.y" /* yacc.c:1646 */ { /* 8 */ /* Replace END address with RECOVER address in * HB_P_SEQBEGIN opcode if there is RECOVER clause @@ -6612,11 +6612,11 @@ yyreduce: else if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) --HB_COMP_PARAM->functions.pLast->wSeqCounter; } -#line 6618 "harboury.c" /* yacc.c:1646 */ +#line 6616 "harboury.c" /* yacc.c:1646 */ break; case 580: -#line 1791 "harbour.y" /* yacc.c:1646 */ +#line 1789 "harbour.y" /* yacc.c:1646 */ { /* 10 */ long lLoopCount = hb_compLoopCount( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); @@ -6645,50 +6645,50 @@ yyreduce: hb_compSequenceFinish( HB_COMP_PARAM, (yyvsp[-7].sNumber), (yyvsp[-3].sNumber), (yyvsp[0].sNumber), (yyvsp[-4].lNumber) != 0, (yyvsp[-2].sNumber) != 0, (yyvsp[-5].lNumber) == lLoopCount ); } -#line 6651 "harboury.c" /* yacc.c:1646 */ +#line 6649 "harboury.c" /* yacc.c:1646 */ break; case 584: -#line 1826 "harbour.y" /* yacc.c:1646 */ +#line 1824 "harbour.y" /* yacc.c:1646 */ { (yyval.sNumber) = 0; } -#line 6657 "harboury.c" /* yacc.c:1646 */ +#line 6655 "harboury.c" /* yacc.c:1646 */ break; case 585: -#line 1828 "harbour.y" /* yacc.c:1646 */ +#line 1826 "harbour.y" /* yacc.c:1646 */ { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[0].asExpr), HB_COMP_PARAM ) ); hb_compGenPCode1( HB_P_SEQBLOCK, HB_COMP_PARAM ); (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; } -#line 6667 "harboury.c" /* yacc.c:1646 */ +#line 6665 "harboury.c" /* yacc.c:1646 */ break; case 586: -#line 1835 "harbour.y" /* yacc.c:1646 */ +#line 1833 "harbour.y" /* yacc.c:1646 */ { (yyval.sNumber) = 0; } -#line 6673 "harboury.c" /* yacc.c:1646 */ +#line 6671 "harboury.c" /* yacc.c:1646 */ break; case 588: -#line 1840 "harbour.y" /* yacc.c:1646 */ +#line 1838 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; ++HB_COMP_PARAM->functions.pLast->wAlwaysCounter; hb_compSequenceAlways( HB_COMP_PARAM ); } -#line 6684 "harboury.c" /* yacc.c:1646 */ +#line 6682 "harboury.c" /* yacc.c:1646 */ break; case 589: -#line 1848 "harbour.y" /* yacc.c:1646 */ +#line 1846 "harbour.y" /* yacc.c:1646 */ { (yyval.sNumber) = 0; HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } -#line 6690 "harboury.c" /* yacc.c:1646 */ +#line 6688 "harboury.c" /* yacc.c:1646 */ break; case 592: -#line 1854 "harbour.y" /* yacc.c:1646 */ +#line 1852 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; @@ -6697,11 +6697,11 @@ yyreduce: hb_compLinePushIfInside( HB_COMP_PARAM ); hb_compGenPCode2( HB_P_SEQRECOVER, HB_P_POP, HB_COMP_PARAM ); } -#line 6703 "harboury.c" /* yacc.c:1646 */ +#line 6701 "harboury.c" /* yacc.c:1646 */ break; case 593: -#line 1865 "harbour.y" /* yacc.c:1646 */ +#line 1863 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; @@ -6711,77 +6711,77 @@ yyreduce: hb_compGenPCode1( HB_P_SEQRECOVER, HB_COMP_PARAM ); hb_compGenPopVar( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 6717 "harboury.c" /* yacc.c:1646 */ +#line 6715 "harboury.c" /* yacc.c:1646 */ break; case 594: -#line 1883 "harbour.y" /* yacc.c:1646 */ +#line 1881 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6725 "harboury.c" /* yacc.c:1646 */ +#line 6723 "harboury.c" /* yacc.c:1646 */ break; case 595: -#line 1887 "harbour.y" /* yacc.c:1646 */ +#line 1885 "harbour.y" /* yacc.c:1646 */ { hb_compModuleAdd( HB_COMP_PARAM, (yyvsp[-1].string), HB_FALSE ); /* DOIDENT is the only one identifier which can be returned in lower letters */ (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewFunName( hb_compIdentifierNew( HB_COMP_PARAM, hb_strupr( hb_strdup( (yyvsp[-1].string) ) ), HB_IDENT_FREE ), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6735 "harboury.c" /* yacc.c:1646 */ +#line 6733 "harboury.c" /* yacc.c:1646 */ break; case 596: -#line 1894 "harbour.y" /* yacc.c:1646 */ +#line 1892 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = NULL; } -#line 6741 "harboury.c" /* yacc.c:1646 */ +#line 6739 "harboury.c" /* yacc.c:1646 */ break; case 597: -#line 1895 "harbour.y" /* yacc.c:1646 */ +#line 1893 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = (yyvsp[0].asExpr); } -#line 6747 "harboury.c" /* yacc.c:1646 */ +#line 6745 "harboury.c" /* yacc.c:1646 */ break; case 598: -#line 1898 "harbour.y" /* yacc.c:1646 */ +#line 1896 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewArgList( hb_compExprNewNil( HB_COMP_PARAM ), HB_COMP_PARAM ), hb_compExprNewNil( HB_COMP_PARAM ) ); } -#line 6753 "harboury.c" /* yacc.c:1646 */ +#line 6751 "harboury.c" /* yacc.c:1646 */ break; case 599: -#line 1899 "harbour.y" /* yacc.c:1646 */ +#line 1897 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewArgList( hb_compExprNewNil( HB_COMP_PARAM ), HB_COMP_PARAM ), (yyvsp[0].asExpr) ); } -#line 6759 "harboury.c" /* yacc.c:1646 */ +#line 6757 "harboury.c" /* yacc.c:1646 */ break; case 600: -#line 1900 "harbour.y" /* yacc.c:1646 */ +#line 1898 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); } -#line 6765 "harboury.c" /* yacc.c:1646 */ +#line 6763 "harboury.c" /* yacc.c:1646 */ break; case 601: -#line 1901 "harbour.y" /* yacc.c:1646 */ +#line 1899 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-1].asExpr), hb_compExprNewNil( HB_COMP_PARAM ) ); } -#line 6771 "harboury.c" /* yacc.c:1646 */ +#line 6769 "harboury.c" /* yacc.c:1646 */ break; case 602: -#line 1902 "harbour.y" /* yacc.c:1646 */ +#line 1900 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); } -#line 6777 "harboury.c" /* yacc.c:1646 */ +#line 6775 "harboury.c" /* yacc.c:1646 */ break; case 603: -#line 1905 "harbour.y" /* yacc.c:1646 */ +#line 1903 "harbour.y" /* yacc.c:1646 */ { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[0].string), HB_COMP_PARAM ); } -#line 6783 "harboury.c" /* yacc.c:1646 */ +#line 6781 "harboury.c" /* yacc.c:1646 */ break; case 608: -#line 1913 "harbour.y" /* yacc.c:1646 */ +#line 1911 "harbour.y" /* yacc.c:1646 */ { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[-1].asExpr), HB_COMP_PARAM ) ); @@ -6789,11 +6789,11 @@ yyreduce: hb_compGenPCode1( HB_P_WITHOBJECTSTART, HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->wWithObjectCnt++; } -#line 6795 "harboury.c" /* yacc.c:1646 */ +#line 6793 "harboury.c" /* yacc.c:1646 */ break; case 609: -#line 1922 "harbour.y" /* yacc.c:1646 */ +#line 1920 "harbour.y" /* yacc.c:1646 */ { if( HB_COMP_PARAM->functions.pLast->wWithObjectCnt ) --HB_COMP_PARAM->functions.pLast->wWithObjectCnt; if( (yyvsp[-1].lNumber) ) @@ -6805,17 +6805,17 @@ yyreduce: hb_compGenPCode1( HB_P_POP, HB_COMP_PARAM ); } } -#line 6811 "harboury.c" /* yacc.c:1646 */ +#line 6809 "harboury.c" /* yacc.c:1646 */ break; case 612: -#line 1939 "harbour.y" /* yacc.c:1646 */ +#line 1937 "harbour.y" /* yacc.c:1646 */ { HB_COMP_PARAM->fError = HB_FALSE; } -#line 6817 "harboury.c" /* yacc.c:1646 */ +#line 6815 "harboury.c" /* yacc.c:1646 */ break; -#line 6821 "harboury.c" /* yacc.c:1646 */ +#line 6819 "harboury.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -7043,7 +7043,7 @@ yyreturn: #endif return yyresult; } -#line 1943 "harbour.y" /* yacc.c:1906 */ +#line 1941 "harbour.y" /* yacc.c:1906 */ /* diff --git a/src/compiler/harbour.yyh b/src/compiler/harbour.yyh index 83dfc87e67..bcd8264b92 100644 --- a/src/compiler/harbour.yyh +++ b/src/compiler/harbour.yyh @@ -162,7 +162,7 @@ extern int hb_comp_yydebug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 124 "harbour.y" /* yacc.c:1909 */ +#line 122 "harbour.y" /* yacc.c:1909 */ const char * string; /* to hold a string returned by lex */ int iNumber; /* to hold a temporary integer number */ diff --git a/src/compiler/hbident.c b/src/compiler/hbident.c index ca68a3f21b..ecc0ec94aa 100644 --- a/src/compiler/hbident.c +++ b/src/compiler/hbident.c @@ -50,7 +50,7 @@ const char * hb_compIdentifierNew( HB_COMP_DECL, const char * szName, int iType ( const void * ) szIdent, ( const void * ) szIdent ); } else if( iType == HB_IDENT_FREE ) - hb_xfree( ( void * ) szName ); + hb_xfree( HB_UNCONST( szName ) ); return szIdent; } @@ -73,7 +73,7 @@ static HB_HASH_FUNC( hb_comp_IdentKey ) /* HB_SIZE func (void *Value, void *C /* deletes an identifier */ static HB_HASH_FUNC( hb_comp_IdentDel ) { - hb_xfree( ( void * ) Value ); + hb_xfree( HB_UNCONST( Value ) ); HB_SYMBOL_UNUSED( HashPtr ); HB_SYMBOL_UNUSED( Cargo ); return 1; diff --git a/src/macro/macrolex.c b/src/macro/macrolex.c index 03fd597918..9a136bc963 100644 --- a/src/macro/macrolex.c +++ b/src/macro/macrolex.c @@ -550,7 +550,7 @@ int hb_macro_yylex( YYSTYPE * yylval_ptr, PHB_MACRO pMacro ) { yylval_ptr->string++; if( pLex->pDst - yylval_ptr->string > HB_SYMBOL_NAME_LEN + 1 ) - ( ( char * ) yylval_ptr->string )[ HB_SYMBOL_NAME_LEN ] = '\0'; + ( ( char * ) HB_UNCONST( yylval_ptr->string ) )[ HB_SYMBOL_NAME_LEN ] = '\0'; return MACROVAR; } return MACROTEXT; @@ -763,7 +763,7 @@ int hb_macro_yylex( YYSTYPE * yylval_ptr, PHB_MACRO pMacro ) break; } if( pLex->pDst - yylval_ptr->string > HB_SYMBOL_NAME_LEN + 1 ) - ( ( char * ) yylval_ptr->string )[ HB_SYMBOL_NAME_LEN ] = '\0'; + ( ( char * ) HB_UNCONST( yylval_ptr->string ) )[ HB_SYMBOL_NAME_LEN ] = '\0'; } return IDENTIFIER; } diff --git a/src/nortl/nortl.c b/src/nortl/nortl.c index 0b2d36ae6d..5970554ea7 100644 --- a/src/nortl/nortl.c +++ b/src/nortl/nortl.c @@ -520,7 +520,7 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) if( s_cDirSep != HB_OS_PATH_DELIM_CHR ) { - char * p = ( char * ) szFileName; + char * p = ( char * ) HB_UNCONST( szFileName ); while( *p ) { if( *p == s_cDirSep ) @@ -544,7 +544,7 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) ++pFileName->szName; --nLen; } - ( ( char * ) pFileName->szName )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szName ) )[ nLen ] = '\0'; } if( pFileName->szExtension ) { @@ -556,7 +556,7 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) ++pFileName->szExtension; --nLen; } - ( ( char * ) pFileName->szExtension )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szExtension ) )[ nLen ] = '\0'; } } @@ -564,28 +564,28 @@ const char * hb_fsNameConv( const char * szFileName, char ** pszFree ) if( s_iFileCase == HB_SET_CASE_LOWER ) { if( pFileName->szName ) - hb_strlow( ( char * ) pFileName->szName ); + hb_strlow( ( char * ) HB_UNCONST( pFileName->szName ) ); if( pFileName->szExtension ) - hb_strlow( ( char * ) pFileName->szExtension ); + hb_strlow( ( char * ) HB_UNCONST( pFileName->szExtension ) ); } else if( s_iFileCase == HB_SET_CASE_UPPER ) { if( pFileName->szName ) - hb_strupr( ( char * ) pFileName->szName ); + hb_strupr( ( char * ) HB_UNCONST( pFileName->szName ) ); if( pFileName->szExtension ) - hb_strupr( ( char * ) pFileName->szExtension ); + hb_strupr( ( char * ) HB_UNCONST( pFileName->szExtension ) ); } /* DIRCASE */ if( pFileName->szPath ) { if( s_iDirCase == HB_SET_CASE_LOWER ) - hb_strlow( ( char * ) pFileName->szPath ); + hb_strlow( ( char * ) HB_UNCONST( pFileName->szPath ) ); else if( s_iDirCase == HB_SET_CASE_UPPER ) - hb_strupr( ( char * ) pFileName->szPath ); + hb_strupr( ( char * ) HB_UNCONST( pFileName->szPath ) ); } - hb_fsFNameMerge( ( char * ) szFileName, pFileName ); + hb_fsFNameMerge( ( char * ) HB_UNCONST( szFileName ), pFileName ); hb_xfree( pFileName ); } else if( pszFree ) @@ -611,7 +611,7 @@ HB_WCHAR * hb_fsNameConvU16( const char * szFileName ) if( s_cDirSep != HB_OS_PATH_DELIM_CHR ) { - char * p = ( char * ) szFileName; + char * p = ( char * ) HB_UNCONST( szFileName ); while( *p ) { if( *p == s_cDirSep ) diff --git a/src/pp/ppcore.c b/src/pp/ppcore.c index 6c68867293..907a7469b0 100644 --- a/src/pp/ppcore.c +++ b/src/pp/ppcore.c @@ -246,8 +246,8 @@ static void hb_pp_operatorsFree( PHB_PP_OPERATOR pOperators, int iOperators ) while( --iOperators >= 0 ) { - hb_xfree( ( void * ) pOperator->name ); - hb_xfree( ( void * ) pOperator->value ); + hb_xfree( HB_UNCONST( pOperator->name ) ); + hb_xfree( HB_UNCONST( pOperator->value ) ); ++pOperator; } hb_xfree( pOperators ); @@ -363,7 +363,7 @@ static void hb_membufAddStr( PHB_MEM_BUFFER pBuffer, const char * szText ) static void hb_pp_tokenFree( PHB_PP_TOKEN pToken ) { if( HB_PP_TOKEN_ALLOC( pToken->type ) ) - hb_xfree( ( void * ) pToken->value ); + hb_xfree( HB_UNCONST( pToken->value ) ); if( HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_MMARKER_RESTRICT || HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_MMARKER_OPTIONAL || HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_RMARKER_OPTIONAL ) @@ -496,7 +496,7 @@ static void hb_pp_tokenSetValue( PHB_PP_TOKEN pToken, const char * value, HB_SIZE nLen ) { if( HB_PP_TOKEN_ALLOC( pToken->type ) ) - hb_xfree( ( void * ) pToken->value ); + hb_xfree( HB_UNCONST( pToken->value ) ); if( nLen <= 1 ) { pToken->value = hb_szAscii[ nLen ? ( HB_UCHAR ) value[ 0 ] : 0 ]; @@ -2074,7 +2074,7 @@ static void hb_pp_FileFree( PHB_PP_STATE pState, PHB_PP_FILE pFile, hb_xfree( pFile->szFileName ); if( pFile->fFree && pFile->pLineBuf ) - hb_xfree( ( void * ) pFile->pLineBuf ); + hb_xfree( HB_UNCONST( pFile->pLineBuf ) ); hb_pp_tokenListFree( &pFile->pTokenList ); hb_xfree( pFile ); @@ -6195,7 +6195,7 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) HB_UCHAR ucVal = pToken->len ? ( HB_UCHAR ) pToken->value[ 1 ] : 0; if( HB_PP_TOKEN_ALLOC( pToken->type ) ) { - hb_xfree( ( void * ) pToken->value ); + hb_xfree( HB_UNCONST( pToken->value ) ); pToken->type |= HB_PP_TOKEN_STATIC; } pToken->value = hb_szAscii[ ucVal ]; @@ -6209,8 +6209,8 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) pToken->type &= ~HB_PP_TOKEN_STATIC; } else - memmove( ( void * ) pToken->value, pToken->value + 1, pToken->len ); - ( ( char * ) pToken->value )[ pToken->len ] = '\0'; + memmove( HB_UNCONST( pToken->value ), pToken->value + 1, pToken->len ); + ( ( char * ) HB_UNCONST( pToken->value ) )[ pToken->len ] = '\0'; } } else if( pToken->len > 1 ) @@ -6226,7 +6226,7 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) pToken->len > HB_SYMBOL_NAME_LEN ) { pToken->len = HB_SYMBOL_NAME_LEN; - ( ( char * ) pToken->value )[ HB_SYMBOL_NAME_LEN ] = '\0'; + ( ( char * ) HB_UNCONST( pToken->value ) )[ HB_SYMBOL_NAME_LEN ] = '\0'; } } @@ -6235,13 +6235,13 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) HB_UCHAR ucVal = ( HB_UCHAR ) HB_PP_UPPER( pToken->value[ 0 ] ); if( HB_PP_TOKEN_ALLOC( pToken->type ) ) { - hb_xfree( ( void * ) pToken->value ); + hb_xfree( HB_UNCONST( pToken->value ) ); pToken->type |= HB_PP_TOKEN_STATIC; } pToken->value = hb_szAscii[ ucVal ]; } else - hb_strupr( ( char * ) pToken->value ); + hb_strupr( ( char * ) HB_UNCONST( pToken->value ) ); } /* diff --git a/src/rdd/hbsix/sxcompr.c b/src/rdd/hbsix/sxcompr.c index 663c6a2efb..b4bd076075 100644 --- a/src/rdd/hbsix/sxcompr.c +++ b/src/rdd/hbsix/sxcompr.c @@ -205,7 +205,7 @@ static void hb_LZSSxExit( PHB_LZSSX_COMPR pCompr ) } static PHB_LZSSX_COMPR hb_LZSSxInit( - PHB_FILE pInput, HB_BYTE * pSrcBuf, HB_SIZE nSrcBuf, + PHB_FILE pInput, const HB_BYTE * pSrcBuf, HB_SIZE nSrcBuf, PHB_FILE pOutput, HB_BYTE * pDstBuf, HB_SIZE nDstBuf ) { PHB_LZSSX_COMPR pCompr = ( PHB_LZSSX_COMPR ) hb_xgrab( sizeof( HB_LZSSX_COMPR ) ); @@ -216,7 +216,7 @@ static PHB_LZSSX_COMPR hb_LZSSxInit( nDstBuf = LZSS_IOBUFLEN; pCompr->pInput = pInput; - pCompr->inBuffer = pSrcBuf; + pCompr->inBuffer = HB_UNCONST( pSrcBuf ); pCompr->inBuffSize = nSrcBuf; pCompr->inBuffPos = 0; pCompr->inBuffRead = ( pInput == NULL ) ? nSrcBuf : 0; @@ -563,7 +563,7 @@ HB_BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE nSrcLen, PHB_LZSSX_COMPR pCompr; HB_SIZE nSize; - pCompr = hb_LZSSxInit( NULL, ( HB_BYTE * ) pSrcBuf, nSrcLen, + pCompr = hb_LZSSxInit( NULL, ( const HB_BYTE * ) pSrcBuf, nSrcLen, NULL, ( HB_BYTE * ) pDstBuf, nDstLen ); nSize = hb_LZSSxEncode( pCompr ); hb_LZSSxExit( pCompr ); @@ -578,7 +578,7 @@ HB_BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE nSrcLen, PHB_LZSSX_COMPR pCompr; HB_BOOL fResult; - pCompr = hb_LZSSxInit( NULL, ( HB_BYTE * ) pSrcBuf, nSrcLen, + pCompr = hb_LZSSxInit( NULL, ( const HB_BYTE * ) pSrcBuf, nSrcLen, NULL, ( HB_BYTE * ) pDstBuf, nDstLen ); fResult = hb_LZSSxDecode( pCompr ); hb_LZSSxExit( pCompr ); diff --git a/src/rdd/hbsix/sxfname.c b/src/rdd/hbsix/sxfname.c index 039f2f9b56..61f0e9efd3 100644 --- a/src/rdd/hbsix/sxfname.c +++ b/src/rdd/hbsix/sxfname.c @@ -77,14 +77,14 @@ HB_FUNC( SX_FNAMEPARSER ) nLen = strlen( pFileName->szName ); nLen = hb_strRTrimLen( pFileName->szName, nLen, HB_FALSE ); pFileName->szName = hb_strLTrim( pFileName->szName, &nLen ); - ( ( char * ) pFileName->szName )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szName ) )[ nLen ] = '\0'; } if( pFileName->szExtension ) { nLen = strlen( pFileName->szExtension ); nLen = hb_strRTrimLen( pFileName->szExtension, nLen, HB_FALSE ); pFileName->szExtension = hb_strLTrim( pFileName->szExtension, &nLen ); - ( ( char * ) pFileName->szExtension )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szExtension ) )[ nLen ] = '\0'; } } diff --git a/src/rdd/usrrdd/usrrdd.c b/src/rdd/usrrdd/usrrdd.c index f4796d3f37..5b9a5c5daa 100644 --- a/src/rdd/usrrdd/usrrdd.c +++ b/src/rdd/usrrdd/usrrdd.c @@ -1343,7 +1343,7 @@ static HB_ERRCODE hb_usrPutRec( AREAP pArea, const HB_BYTE * pBuffer ) return SUPER_PUTREC( pArea, pBuffer ); hb_vmPushInteger( pArea->uiArea ); - hb_vmPushPointer( ( void * ) pBuffer ); + hb_vmPushPointer( HB_UNCONST( pBuffer ) ); hb_vmDo( 2 ); return hb_usrReturn(); @@ -1370,7 +1370,7 @@ static HB_ERRCODE hb_usrGetRec( AREAP pArea, HB_BYTE ** pBuffer ) pItem = hb_stackItemFromBase( nOffset ); if( HB_IS_STRING( pItem ) ) - *pBuffer = ( HB_BYTE * ) hb_itemGetCPtr( pItem ); + *pBuffer = ( HB_BYTE * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ); else *pBuffer = ( HB_BYTE * ) hb_itemGetPtr( pItem ); hb_stackPop(); diff --git a/src/rtl/cdpapi.c b/src/rtl/cdpapi.c index c7b6c812e4..b931b3972a 100644 --- a/src/rtl/cdpapi.c +++ b/src/rtl/cdpapi.c @@ -2232,7 +2232,7 @@ const char * hb_cdpnDup3( const char * pSrc, HB_SIZE nSrc, { pDst = *pFree; if( pDst == NULL && *pnSize > 0 ) - pDst = ( char * ) pSrc; + pDst = ( char * ) HB_UNCONST( pSrc ); } if( nDst >= *pnSize || ( pDst == pSrc && HB_CDP_ISCUSTOM( cdpOut ) ) ) diff --git a/src/rtl/filebuf.c b/src/rtl/filebuf.c index d8ba9264cb..5841119114 100644 --- a/src/rtl/filebuf.c +++ b/src/rtl/filebuf.c @@ -660,7 +660,7 @@ static PHB_FILE s_fileExtOpen( PHB_FILE_FUNCS pFuncs, const char * pszFileName, if( ! fResult ) hb_fsSetError( ( nExFlags & FXO_TRUNCATE ) ? 5 : 32 ); if( ( nExFlags & FXO_COPYNAME ) != 0 && pFile ) - hb_strncpy( ( char * ) pszFileName, pszFile, HB_PATH_MAX - 1 ); + hb_strncpy( ( char * ) HB_UNCONST( pszFileName ), pszFile, HB_PATH_MAX - 1 ); if( pError ) { hb_errPutFileName( pError, pszFile ); diff --git a/src/rtl/filesys.c b/src/rtl/filesys.c index 0bfd4c327e..61331c4a03 100644 --- a/src/rtl/filesys.c +++ b/src/rtl/filesys.c @@ -803,7 +803,7 @@ HB_FHANDLE hb_fsPOpen( const char * pszFileName, const char * pszMode ) #if defined( __WATCOMC__ ) HB_FAILURE_RETRY( iResult, execv( "/bin/sh", argv ) ); #else - HB_FAILURE_RETRY( iResult, execv( "/bin/sh", ( char ** ) argv ) ); + HB_FAILURE_RETRY( iResult, execv( "/bin/sh", ( char ** ) HB_UNCONST( argv ) ) ); #endif exit( 1 ); } @@ -4625,7 +4625,7 @@ HB_FHANDLE hb_fsExtOpen( const char * pszFileName, const char * pDefExt, } if( nExFlags & FXO_COPYNAME && hFile != FS_ERROR ) - hb_strncpy( ( char * ) pszFileName, szPath, HB_PATH_MAX - 1 ); + hb_strncpy( ( char * ) HB_UNCONST( pszFileName ), szPath, HB_PATH_MAX - 1 ); if( szFree ) hb_xfree( szFree ); @@ -4728,7 +4728,7 @@ const char * hb_fsNameConv( const char * pszFileName, char ** pszFree ) if( cDirSep != HB_OS_PATH_DELIM_CHR ) { - char * p = ( char * ) pszFileName; + char * p = ( char * ) HB_UNCONST( pszFileName ); while( *p ) { if( *p == cDirSep ) @@ -4747,14 +4747,14 @@ const char * hb_fsNameConv( const char * pszFileName, char ** pszFree ) nLen = strlen( pFileName->szName ); nLen = hb_strRTrimLen( pFileName->szName, nLen, HB_FALSE ); pFileName->szName = hb_strLTrim( pFileName->szName, &nLen ); - ( ( char * ) pFileName->szName )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szName ) )[ nLen ] = '\0'; } if( pFileName->szExtension ) { nLen = strlen( pFileName->szExtension ); nLen = hb_strRTrimLen( pFileName->szExtension, nLen, HB_FALSE ); pFileName->szExtension = hb_strLTrim( pFileName->szExtension, &nLen ); - ( ( char * ) pFileName->szExtension )[ nLen ] = '\0'; + ( ( char * ) HB_UNCONST( pFileName->szExtension ) )[ nLen ] = '\0'; } } @@ -4783,7 +4783,7 @@ const char * hb_fsNameConv( const char * pszFileName, char ** pszFree ) pFileName->szPath = pszPath = hb_cdpnDupUpper( hb_vmCDP(), pFileName->szPath, NULL ); } - hb_fsFNameMerge( ( char * ) pszFileName, pFileName ); + hb_fsFNameMerge( ( char * ) HB_UNCONST( pszFileName ), pFileName ); hb_xfree( pFileName ); if( pszPath ) hb_xfree( pszPath ); @@ -4799,8 +4799,8 @@ const char * hb_fsNameConv( const char * pszFileName, char ** pszFree ) pszFileName = hb_osEncodeCP( pszFileName, pszFree, &nLen ); if( pszFree == NULL && pszFileName != pszPrev ) { - hb_strncpy( ( char * ) pszPrev, pszFileName, HB_PATH_MAX - 1 ); - hb_xfree( ( void * ) pszFileName ); + hb_strncpy( ( char * ) HB_UNCONST( pszPrev ), pszFileName, HB_PATH_MAX - 1 ); + hb_xfree( HB_UNCONST( pszFileName ) ); pszFileName = pszPrev; } } diff --git a/src/rtl/fslink.c b/src/rtl/fslink.c index 58d4c0519a..dff97ff913 100644 --- a/src/rtl/fslink.c +++ b/src/rtl/fslink.c @@ -334,7 +334,7 @@ char * hb_fsLinkRead( const char * pszFile ) { pszLink[ size ] = '\0'; /* Convert from OS codepage */ - pszLink = ( char * ) hb_osDecodeCP( pszLink, NULL, NULL ); + pszLink = ( char * ) HB_UNCONST( hb_osDecodeCP( pszLink, NULL, NULL ) ); } if( pszFileFree ) diff --git a/src/rtl/gtcrs/gtcrs.c b/src/rtl/gtcrs/gtcrs.c index 5a03ce6e36..cf4d642a3d 100644 --- a/src/rtl/gtcrs/gtcrs.c +++ b/src/rtl/gtcrs/gtcrs.c @@ -1312,7 +1312,7 @@ static char * tiGetS( const char * capname ) { char * ptr; - ptr = tigetstr( ( char * ) capname ); + ptr = tigetstr( ( char * ) HB_UNCONST( capname ) ); if( ptr ) { if( ptr == ( char * ) -1 ) diff --git a/src/rtl/gtsln/gtsln.c b/src/rtl/gtsln/gtsln.c index e5465f5845..bcf12a9747 100644 --- a/src/rtl/gtsln/gtsln.c +++ b/src/rtl/gtsln/gtsln.c @@ -153,8 +153,8 @@ static void hb_sln_colorTrans( void ) * the same. */ clr = ( bg << 4 ) | ( fg ^ 0x07 ); - SLtt_set_color( clr, NULL, ( char * ) s_colorNames[ fg ], - ( char * ) s_colorNames[ bg ] ); + SLtt_set_color( clr, NULL, ( char * ) HB_UNCONST( s_colorNames[ fg ] ), + ( char * ) HB_UNCONST( s_colorNames[ bg ] ) ); #ifdef HB_SLN_UTF8 s_colorTab[ i ] = clr; #else diff --git a/src/rtl/gtsln/mousesln.c b/src/rtl/gtsln/mousesln.c index 3dc7192237..0ac383054b 100644 --- a/src/rtl/gtsln/mousesln.c +++ b/src/rtl/gtsln/mousesln.c @@ -329,8 +329,8 @@ void hb_gt_sln_mouse_Init( void ) (void)SLtt_set_mouse_mode( 1, 1 ); /* initial xterm settings */ - SLtt_write_string( ( char * ) SaveHilit ); - SLtt_write_string( ( char * ) EnabTrack ); + SLtt_write_string( ( char * ) HB_UNCONST( SaveHilit ) ); + SLtt_write_string( ( char * ) HB_UNCONST( EnabTrack ) ); SLtt_flush_output(); s_iMouseButtons = SLtt_tgetnum( ( char * ) "BT" ); @@ -406,8 +406,8 @@ void hb_gt_sln_mouse_Exit( void ) const char * RestoHilit = "\033[?1001r"; /* restore old hilittracking */ /* restore xterm settings */ - SLtt_write_string( ( char * ) DisabTrack ); - SLtt_write_string( ( char * ) RestoHilit ); + SLtt_write_string( ( char * ) HB_UNCONST( DisabTrack ) ); + SLtt_write_string( ( char * ) HB_UNCONST( RestoHilit ) ); SLtt_flush_output(); /* force mouse usage under xterm */ diff --git a/src/rtl/gtxwc/gtxwc.c b/src/rtl/gtxwc/gtxwc.c index 8f99798371..0d33a70f1b 100644 --- a/src/rtl/gtxwc/gtxwc.c +++ b/src/rtl/gtxwc/gtxwc.c @@ -4389,7 +4389,7 @@ static void hb_gt_xwc_SetSelection( PXWND_DEF wnd, const char * szData, HB_SIZE wnd->ClipboardData[ ulSize ] = '\0'; } else - wnd->ClipboardData = ( unsigned char * ) szData; + wnd->ClipboardData = ( unsigned char * ) HB_UNCONST( szData ); XSetSelectionOwner( wnd->dpy, s_atomPrimary, wnd->window, wnd->ClipboardTime ); if( XGetSelectionOwner( wnd->dpy, s_atomPrimary ) == wnd->window ) @@ -5727,7 +5727,7 @@ static HB_BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) int iHeight = hb_arrayGetNI( pInfo->pNewVal, 3 ); int iDepth = hb_arrayGetNI( pInfo->pNewVal, 4 ); int iPad = 32; - char * pFreeImage = NULL; + const char * pFreeImage = NULL; if( iDepth == 0 ) iDepth = DefaultDepth( wnd->dpy, DefaultScreen( wnd->dpy ) ); @@ -5739,17 +5739,18 @@ static HB_BOOL hb_gt_xwc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { int iPitch = ( iWidth * iDepth + iPad - 1 ) / iPad; if( nSize == ( HB_SIZE ) ( iHeight * iPitch ) ) - pFreeImage = ( char * ) hb_arrayGetCPtr( pInfo->pNewVal, 1 ); + pFreeImage = hb_arrayGetCPtr( pInfo->pNewVal, 1 ); else iPad >>= 1; } } else - pFreeImage = ( char * ) hb_arrayGetPtr( pInfo->pNewVal, 1 ); + pFreeImage = hb_arrayGetPtr( pInfo->pNewVal, 1 ); } if( pFreeImage != NULL ) xImage = XCreateImage( wnd->dpy, DefaultVisual( wnd->dpy, DefaultScreen( wnd->dpy ) ), - iDepth, ZPixmap, 0, pFreeImage, iWidth, iHeight, iPad, 0 ); + iDepth, ZPixmap, 0, ( char * ) HB_UNCONST( pFreeImage ), + iWidth, iHeight, iPad, 0 ); } rx.left = rx.top = 0; diff --git a/src/rtl/hbbfsock.c b/src/rtl/hbbfsock.c index d0e6d623e3..704fa9de55 100644 --- a/src/rtl/hbbfsock.c +++ b/src/rtl/hbbfsock.c @@ -311,7 +311,7 @@ static PHB_SOCKEX s_sockexNext( PHB_SOCKEX pSock, PHB_ITEM pParams ) if( keylen > 0 ) { PHB_SOCKEX_BF pBF = ( PHB_SOCKEX_BF ) hb_xgrabz( sizeof( HB_SOCKEX_BF ) ); - HB_BYTE * pVect = ( HB_BYTE * ) ( ivlen > 0 ? iv : NULL ); + const HB_BYTE * pVect = ( const HB_BYTE * ) ( ivlen > 0 ? iv : NULL ); int i; hb_blowfishInit( &pBF->bf, keydata, keylen ); diff --git a/src/rtl/hbgtcore.c b/src/rtl/hbgtcore.c index 0bebbdc1d7..85802601e2 100644 --- a/src/rtl/hbgtcore.c +++ b/src/rtl/hbgtcore.c @@ -3899,7 +3899,7 @@ static HB_BOOL hb_gtTryInit( const char * szGtName, HB_BOOL fFree ) } if( fFree ) - hb_xfree( ( void * ) szGtName ); + hb_xfree( HB_UNCONST( szGtName ) ); } return hb_stackGetGT() != NULL; diff --git a/src/rtl/hbsocket.c b/src/rtl/hbsocket.c index 93067f8b48..c5cec6b6f5 100644 --- a/src/rtl/hbsocket.c +++ b/src/rtl/hbsocket.c @@ -1823,7 +1823,7 @@ char * hb_socketAddrGetName( const void * pSockAddr, unsigned len ) const char * szAddr; # if defined( HB_HAS_INET_NTOP ) char buf[ INET_ADDRSTRLEN ]; - szAddr = inet_ntop( AF_INET, ( void * ) &sa->sin_addr, buf, sizeof( buf ) ); + szAddr = inet_ntop( AF_INET, HB_UNCONST( &sa->sin_addr ), buf, sizeof( buf ) ); # elif defined( HB_IS_INET_NTOA_MT_SAFE ) szAddr = inet_ntoa( sa->sin_addr ); # else @@ -1843,7 +1843,7 @@ char * hb_socketAddrGetName( const void * pSockAddr, unsigned len ) const char * szAddr; # if defined( HB_HAS_INET_NTOP ) char buf[ INET6_ADDRSTRLEN ]; - szAddr = inet_ntop( AF_INET6, ( void * ) &sa->sin6_addr, buf, sizeof( buf ) ); + szAddr = inet_ntop( AF_INET6, HB_UNCONST( &sa->sin6_addr ), buf, sizeof( buf ) ); # else { int iTODO; @@ -1972,7 +1972,7 @@ PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len ) const char * szAddr; # if defined( HB_HAS_INET_NTOP ) char buf[ INET_ADDRSTRLEN ]; - szAddr = inet_ntop( AF_INET, ( void * ) &sa->sin_addr, buf, sizeof( buf ) ); + szAddr = inet_ntop( AF_INET, HB_UNCONST( &sa->sin_addr ), buf, sizeof( buf ) ); # elif defined( HB_IS_INET_NTOA_MT_SAFE ) szAddr = inet_ntoa( sa->sin_addr ); # else @@ -1997,7 +1997,7 @@ PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len ) const char * szAddr; # if defined( HB_HAS_INET_NTOP ) char buf[ INET6_ADDRSTRLEN ]; - szAddr = inet_ntop( AF_INET6, ( void * ) &sa->sin6_addr, buf, sizeof( buf ) ); + szAddr = inet_ntop( AF_INET6, HB_UNCONST( &sa->sin6_addr ), buf, sizeof( buf ) ); # else { int iTODO; diff --git a/src/rtl/hbzlib.c b/src/rtl/hbzlib.c index 6d21176e2c..d8e8cf7cef 100644 --- a/src/rtl/hbzlib.c +++ b/src/rtl/hbzlib.c @@ -103,7 +103,7 @@ static int s_zlibCompress2( char ** pDstPtr, HB_SIZE * pnDst, stream.zalloc = s_zlib_alloc; stream.zfree = s_zlib_free; stream.opaque = NULL; - stream.next_in = ( Bytef* ) pSrc; + stream.next_in = ( Bytef* ) HB_UNCONST( pSrc ); stream.avail_in = ( uInt ) nSrc; iResult = deflateInit2( &stream, level, Z_DEFLATED, 15 + ( fGZip ? 16 : 0 ), 8, @@ -159,7 +159,7 @@ static HB_SIZE s_zlibUncompressedSize( const char * szSrc, HB_SIZE nLen, stream.zalloc = s_zlib_alloc; stream.zfree = s_zlib_free; stream.opaque = NULL; - stream.next_in = ( Bytef * ) szSrc; + stream.next_in = ( Bytef * ) HB_UNCONST( szSrc ); stream.avail_in = ( uInt ) nLen; *piResult = inflateInit2( &stream, 15 + 32 ); @@ -194,7 +194,7 @@ static int s_zlibUncompress( char * pDst, HB_SIZE * pnDst, stream.zalloc = s_zlib_alloc; stream.zfree = s_zlib_free; stream.opaque = NULL; - stream.next_in = ( Bytef* ) pSrc; + stream.next_in = ( Bytef* ) HB_UNCONST( pSrc ); stream.avail_in = ( uInt ) nSrc; iResult = inflateInit2( &stream, 15 + 32 ); diff --git a/src/rtl/hbznet.c b/src/rtl/hbznet.c index 803430adcd..3f197b889c 100644 --- a/src/rtl/hbznet.c +++ b/src/rtl/hbznet.c @@ -401,7 +401,7 @@ long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, lo { long snd = 0; - pStream->wr.next_in = ( Bytef * ) buffer; + pStream->wr.next_in = ( Bytef * ) HB_UNCONST( buffer ); pStream->wr.avail_in = ( uInt ) len; pStream->err = Z_OK; diff --git a/src/rtl/hbzsock.c b/src/rtl/hbzsock.c index 7fd047c6c5..4018af45a2 100644 --- a/src/rtl/hbzsock.c +++ b/src/rtl/hbzsock.c @@ -223,7 +223,7 @@ static long s_sockexWrite( PHB_SOCKEX pSock, const void * data, long len, HB_MAX { long lWritten = 0; - pZ->z_write.next_in = ( Bytef * ) data; + pZ->z_write.next_in = ( Bytef * ) HB_UNCONST( data ); pZ->z_write.avail_in = ( uInt ) len; while( pZ->z_write.avail_in ) diff --git a/src/rtl/iousr.c b/src/rtl/iousr.c index cefee4afc5..545c8cf2de 100644 --- a/src/rtl/iousr.c +++ b/src/rtl/iousr.c @@ -152,6 +152,9 @@ static PHB_IOUSR s_iousrAddNew( const char * pszPrefix ) #define s_hasMethod( pIO, iMethod ) \ ( ( pIO )->prg_funcs[ ( iMethod ) - 1 ] != NULL ) + +#define s_getUsrIO( p ) ( ( PHB_IOUSR ) HB_UNCONST( p ) ) + static void s_pushMethod( PHB_IOUSR pIO, int iMethod ) { hb_vmPushSymbol( pIO->prg_funcs[ iMethod - 1 ] ); @@ -160,7 +163,7 @@ static void s_pushMethod( PHB_IOUSR pIO, int iMethod ) static HB_BOOL s_fileAccept( PHB_FILE_FUNCS pFuncs, const char * pszFileName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); HB_BOOL fResult = HB_FALSE; if( hb_strnicmp( pszFileName, pIO->prefix, pIO->prefix_len ) == 0 ) @@ -181,7 +184,7 @@ static HB_BOOL s_fileAccept( PHB_FILE_FUNCS pFuncs, const char * pszFileName ) static HB_BOOL s_fileExists( PHB_FILE_FUNCS pFuncs, const char * pszFileName, char * pRetPath ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); HB_SYMBOL_UNUSED( pRetPath ); @@ -194,7 +197,7 @@ static HB_BOOL s_fileExists( PHB_FILE_FUNCS pFuncs, const char * pszFileName, ch static HB_BOOL s_fileDelete( PHB_FILE_FUNCS pFuncs, const char * pszFileName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DELETE ); hb_vmPushString( pszFileName, strlen( pszFileName ) ); @@ -205,7 +208,7 @@ static HB_BOOL s_fileDelete( PHB_FILE_FUNCS pFuncs, const char * pszFileName ) static HB_BOOL s_fileRename( PHB_FILE_FUNCS pFuncs, const char * pszName, const char * pszNewName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_RENAME ); hb_vmPushString( pszName, strlen( pszName ) ); @@ -217,7 +220,7 @@ static HB_BOOL s_fileRename( PHB_FILE_FUNCS pFuncs, const char * pszName, const static HB_BOOL s_fileCopy( PHB_FILE_FUNCS pFuncs, const char * pSrcFile, const char * pszDstFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_COPY ); hb_vmPushString( pSrcFile, strlen( pSrcFile ) ); @@ -229,7 +232,7 @@ static HB_BOOL s_fileCopy( PHB_FILE_FUNCS pFuncs, const char * pSrcFile, const c static HB_BOOL s_fileDirExists( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DIREXISTS ); hb_vmPushString( pszDirName, strlen( pszDirName ) ); @@ -240,7 +243,7 @@ static HB_BOOL s_fileDirExists( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) static HB_BOOL s_fileDirMake( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DIRMAKE ); hb_vmPushString( pszDirName, strlen( pszDirName ) ); @@ -251,7 +254,7 @@ static HB_BOOL s_fileDirMake( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) static HB_BOOL s_fileDirRemove( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DIRREMOVE ); hb_vmPushString( pszDirName, strlen( pszDirName ) ); @@ -262,7 +265,7 @@ static HB_BOOL s_fileDirRemove( PHB_FILE_FUNCS pFuncs, const char * pszDirName ) static double s_fileDirSpace( PHB_FILE_FUNCS pFuncs, const char * pszDirName, HB_USHORT uiType ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DIRSPACE ); hb_vmPushString( pszDirName, strlen( pszDirName ) ); @@ -274,7 +277,7 @@ static double s_fileDirSpace( PHB_FILE_FUNCS pFuncs, const char * pszDirName, HB static PHB_ITEM s_fileDirectory( PHB_FILE_FUNCS pFuncs, const char * pszDirSpec, const char * pszAttr ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_DIRECTORY ); hb_vmPushString( pszDirSpec, strlen( pszDirSpec ) ); @@ -286,7 +289,7 @@ static PHB_ITEM s_fileDirectory( PHB_FILE_FUNCS pFuncs, const char * pszDirSpec, static HB_BOOL s_fileTimeGet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, long * plJulian, long * plMillisec ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); HB_BOOL fResult; int iOffset; @@ -314,7 +317,7 @@ static HB_BOOL s_fileTimeGet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, l static HB_BOOL s_fileTimeSet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, long lJulian, long lMillisec ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_TIMESET ); hb_vmPushString( pszFileName, strlen( pszFileName ) ); @@ -327,7 +330,7 @@ static HB_BOOL s_fileTimeSet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, l static HB_BOOL s_fileAttrGet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, HB_FATTR * pnAttr ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); HB_BOOL fResult; int iOffset; @@ -349,7 +352,7 @@ static HB_BOOL s_fileAttrGet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, H static HB_BOOL s_fileAttrSet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, HB_FATTR nAttr ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_ATTRSET ); hb_vmPushString( pszFileName, strlen( pszFileName ) ); @@ -361,7 +364,7 @@ static HB_BOOL s_fileAttrSet( PHB_FILE_FUNCS pFuncs, const char * pszFileName, H static HB_BOOL s_fileLink( PHB_FILE_FUNCS pFuncs, const char * pszExisting, const char * pszNewName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_LINK ); hb_vmPushString( pszExisting, strlen( pszExisting ) ); @@ -373,7 +376,7 @@ static HB_BOOL s_fileLink( PHB_FILE_FUNCS pFuncs, const char * pszExisting, cons static HB_BOOL s_fileLinkSym( PHB_FILE_FUNCS pFuncs, const char * pszTarget, const char * pszNewName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); s_pushMethod( pIO, IOUSR_LINKSYM ); hb_vmPushString( pszTarget, strlen( pszTarget ) ); @@ -385,7 +388,7 @@ static HB_BOOL s_fileLinkSym( PHB_FILE_FUNCS pFuncs, const char * pszTarget, con static char * s_fileLinkRead( PHB_FILE_FUNCS pFuncs, const char * pszFileName ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); const char * pszLink; s_pushMethod( pIO, IOUSR_LINKREAD ); @@ -400,7 +403,7 @@ static PHB_FILE s_fileOpen( PHB_FILE_FUNCS pFuncs, const char * pszName, const char * pszDefExt, HB_FATTR nExFlags, const char * pPaths, PHB_ITEM pError ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFuncs ); PHB_FILE pFile = NULL; PHB_ITEM pFileItm; @@ -431,7 +434,7 @@ static PHB_FILE s_fileOpen( PHB_FILE_FUNCS pFuncs, const char * pszName, static void s_fileClose( PHB_FILE pFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_CLOSE ); hb_vmPush( pFile->pFileItm ); @@ -441,7 +444,7 @@ static void s_fileClose( PHB_FILE pFile ) static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET nStart, HB_FOFFSET nLen, int iType ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_LOCK ); hb_vmPush( pFile->pFileItm ); @@ -456,7 +459,7 @@ static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET nStart, static int s_fileLockTest( PHB_FILE pFile, HB_FOFFSET nStart, HB_FOFFSET nLen, int iType ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_LOCKTEST ); hb_vmPush( pFile->pFileItm ); @@ -471,7 +474,7 @@ static int s_fileLockTest( PHB_FILE pFile, HB_FOFFSET nStart, static HB_SIZE s_fileRead( PHB_FILE pFile, void * data, HB_SIZE nSize, HB_MAXINT timeout ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); HB_SIZE nResult; int iOffset; @@ -502,7 +505,7 @@ static HB_SIZE s_fileRead( PHB_FILE pFile, void * data, static HB_SIZE s_fileWrite( PHB_FILE pFile, const void * data, HB_SIZE nSize, HB_MAXINT timeout ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_WRITE ); hb_vmPush( pFile->pFileItm ); @@ -517,7 +520,7 @@ static HB_SIZE s_fileWrite( PHB_FILE pFile, const void * data, static HB_SIZE s_fileReadAt( PHB_FILE pFile, void * buffer, HB_SIZE nSize, HB_FOFFSET nOffset ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); HB_SIZE nResult; int iOffset; @@ -548,7 +551,7 @@ static HB_SIZE s_fileReadAt( PHB_FILE pFile, void * buffer, static HB_SIZE s_fileWriteAt( PHB_FILE pFile, const void * buffer, HB_SIZE nSize, HB_FOFFSET nOffset ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_WRITEAT ); hb_vmPush( pFile->pFileItm ); @@ -562,7 +565,7 @@ static HB_SIZE s_fileWriteAt( PHB_FILE pFile, const void * buffer, static HB_BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET nOffset ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_TRUNCAT ); hb_vmPush( pFile->pFileItm ); @@ -575,7 +578,7 @@ static HB_BOOL s_fileTruncAt( PHB_FILE pFile, HB_FOFFSET nOffset ) static HB_FOFFSET s_fileSeek( PHB_FILE pFile, HB_FOFFSET nOffset, HB_USHORT uiFlags ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_SEEK ); hb_vmPush( pFile->pFileItm ); @@ -588,7 +591,7 @@ static HB_FOFFSET s_fileSeek( PHB_FILE pFile, HB_FOFFSET nOffset, static HB_FOFFSET s_fileSize( PHB_FILE pFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_SIZE ); hb_vmPush( pFile->pFileItm ); @@ -599,7 +602,7 @@ static HB_FOFFSET s_fileSize( PHB_FILE pFile ) static HB_BOOL s_fileEof( PHB_FILE pFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_EOF ); hb_vmPush( pFile->pFileItm ); @@ -610,7 +613,7 @@ static HB_BOOL s_fileEof( PHB_FILE pFile ) static void s_fileFlush( PHB_FILE pFile, HB_BOOL fDirty ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_FLUSH ); hb_vmPush( pFile->pFileItm ); @@ -620,7 +623,7 @@ static void s_fileFlush( PHB_FILE pFile, HB_BOOL fDirty ) static void s_fileCommit( PHB_FILE pFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_COMMIT ); hb_vmPush( pFile->pFileItm ); @@ -629,7 +632,7 @@ static void s_fileCommit( PHB_FILE pFile ) static HB_BOOL s_fileConfigure( PHB_FILE pFile, int iIndex, PHB_ITEM pValue ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_CONFIGURE ); hb_vmPush( pFile->pFileItm ); @@ -643,7 +646,7 @@ static HB_BOOL s_fileConfigure( PHB_FILE pFile, int iIndex, PHB_ITEM pValue ) static HB_FHANDLE s_fileHandle( PHB_FILE pFile ) { - PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; + PHB_IOUSR pIO = s_getUsrIO( pFile->pFuncs ); s_pushMethod( pIO, IOUSR_HANDLE ); hb_vmPush( pFile->pFileItm ); diff --git a/src/rtl/langapi.c b/src/rtl/langapi.c index edca285971..ff83c3bd0a 100644 --- a/src/rtl/langapi.c +++ b/src/rtl/langapi.c @@ -301,7 +301,7 @@ static HB_BOOL hb_langTranslate( const char * szNewId, PHB_LANG lang, PHB_CODEPA { HB_SIZE nLen = strlen( trans.pItemList[ i ] ) + 1; memcpy( ptr, trans.pItemList[ i ], nLen ); - hb_xfree( ( void * ) trans.pItemList[ i ] ); + hb_xfree( HB_UNCONST( trans.pItemList[ i ] ) ); trans.pItemList[ i ] = ptr; ptr += nLen; } diff --git a/src/vm/cmdarg.c b/src/vm/cmdarg.c index 23c83783b3..e60427d2c7 100644 --- a/src/vm/cmdarg.c +++ b/src/vm/cmdarg.c @@ -419,7 +419,7 @@ void hb_cmdargUpdate( void ) hb_strncat( s_szAppName, pFName->szPath, HB_PATH_MAX - 1 ); pFName->szPath = hb_strdup( s_szAppName ); hb_fsFNameMerge( s_szAppName, pFName ); - hb_xfree( ( void * ) pFName->szPath ); + hb_xfree( HB_UNCONST( pFName->szPath ) ); s_argv[ 0 ] = s_szAppName; } } @@ -808,7 +808,7 @@ HB_FUNC( HB_CMDLINE ) *--ptr = '\0'; /* Convert from OS codepage */ - hb_retc_buffer( ( char * ) hb_osDecodeCP( pszBuffer, NULL, NULL ) ); + hb_retc_buffer( ( char * ) HB_UNCONST( hb_osDecodeCP( pszBuffer, NULL, NULL ) ) ); } } else diff --git a/src/vm/codebloc.c b/src/vm/codebloc.c index 32912fd551..4e10e59946 100644 --- a/src/vm/codebloc.c +++ b/src/vm/codebloc.c @@ -73,7 +73,7 @@ static HB_GARBAGE_FUNC( hb_codeblockGarbageDelete ) if( pCBlock->pCode && pCBlock->dynBuffer ) { pCBlock->dynBuffer = HB_FALSE; - hb_xfree( ( void * ) pCBlock->pCode ); + hb_xfree( HB_UNCONST( pCBlock->pCode ) ); } pCBlock->pCode = s_pCode; diff --git a/src/vm/hvm.c b/src/vm/hvm.c index 421595a0af..3e7ceba2f3 100644 --- a/src/vm/hvm.c +++ b/src/vm/hvm.c @@ -6962,8 +6962,8 @@ void hb_vmPushStringPcode( const char * szText, HB_SIZE nLength ) pItem->type = HB_IT_STRING; pItem->item.asString.allocated = 0; pItem->item.asString.length = nLength; - pItem->item.asString.value = ( char * ) ( nLength <= 1 ? - hb_szAscii[ ( unsigned char ) szText[ 0 ] ] : szText ); + pItem->item.asString.value = ( char * ) HB_UNCONST( ( nLength <= 1 ? + hb_szAscii[ ( unsigned char ) szText[ 0 ] ] : szText ) ); } void hb_vmPushSymbol( PHB_SYMB pSym ) @@ -9188,7 +9188,7 @@ void hb_vmSetLang( PHB_LANG pLang ) { HB_STACK_TLS_PRELOAD - hb_stackSetLang( ( void * ) pLang ); + hb_stackSetLang( HB_UNCONST( pLang ) ); } void * hb_vmI18N( void ) diff --git a/src/vm/itemapi.c b/src/vm/itemapi.c index 6dda1a8799..6730ae1385 100644 --- a/src/vm/itemapi.c +++ b/src/vm/itemapi.c @@ -261,7 +261,7 @@ PHB_ITEM hb_itemPutC( PHB_ITEM pItem, const char * szText ) pItem = hb_itemNew( NULL ); pItem->type = HB_IT_STRING; - pItem->item.asString.value = ( char * ) szText; + pItem->item.asString.value = ( char * ) HB_UNCONST( szText ); pItem->item.asString.length = nLen; pItem->item.asString.allocated = nAlloc; @@ -278,7 +278,7 @@ PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, const char * szText, HB_SIZE nLen ) if( nLen <= 1 ) { nAlloc = 0; - szValue = ( char * ) hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ]; + szValue = ( char * ) HB_UNCONST( hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ); } else { @@ -326,8 +326,8 @@ PHB_ITEM hb_itemPutCConst( PHB_ITEM pItem, const char * szText ) pItem->type = HB_IT_STRING; pItem->item.asString.length = nLen; pItem->item.asString.allocated = 0; - pItem->item.asString.value = ( char * ) ( nLen > 1 ? szText : - hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ); + pItem->item.asString.value = ( char * ) HB_UNCONST( ( nLen > 1 ? szText : + hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ) ); return pItem; } @@ -349,9 +349,9 @@ PHB_ITEM hb_itemPutCLConst( PHB_ITEM pItem, const char * szText, HB_SIZE nLen ) pItem->item.asString.allocated = 0; if( nLen <= 1 ) - pItem->item.asString.value = ( char * ) hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ]; + pItem->item.asString.value = ( char * ) HB_UNCONST( hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ); else if( szText[ nLen ] == '\0' ) - pItem->item.asString.value = ( char * ) szText; + pItem->item.asString.value = ( char * ) HB_UNCONST( szText ); else hb_errInternal( 6003, "Internal error: hb_itemPutCLConst() missing termination character", NULL, NULL ); @@ -379,7 +379,7 @@ PHB_ITEM hb_itemPutCPtr( PHB_ITEM pItem, char * szText ) if( nLen <= 1 ) { pItem->item.asString.allocated = 0; - pItem->item.asString.value = ( char * ) hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ]; + pItem->item.asString.value = ( char * ) HB_UNCONST( hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ); if( szText ) hb_xfree( szText ); } @@ -409,7 +409,7 @@ PHB_ITEM hb_itemPutCLPtr( PHB_ITEM pItem, char * szText, HB_SIZE nLen ) if( nLen <= 1 ) { pItem->item.asString.allocated = 0; - pItem->item.asString.value = ( char * ) hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ]; + pItem->item.asString.value = ( char * ) HB_UNCONST( hb_szAscii[ nLen ? ( unsigned char ) szText[ 0 ] : 0 ] ); hb_xfree( szText ); } else @@ -2786,7 +2786,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * nLen, HB_BOOL * bFreeReq ) { case HB_IT_STRING: case HB_IT_MEMO: - buffer = ( char * ) hb_itemGetCPtr( pItem ); + buffer = ( char * ) HB_UNCONST( hb_itemGetCPtr( pItem ) ); * nLen = hb_itemGetCLen( pItem ); * bFreeReq = HB_FALSE; break; diff --git a/src/vm/macro.c b/src/vm/macro.c index b18eef3902..ca7afc2c68 100644 --- a/src/vm/macro.c +++ b/src/vm/macro.c @@ -269,7 +269,7 @@ static char * hb_macroTextSubst( const char * szString, HB_SIZE * pnStringLen ) pHead = ( char * ) memchr( szString, '&', *pnStringLen ); if( pHead == NULL ) - return ( char * ) szString; /* no more processing is required */ + return ( char * ) HB_UNCONST( szString ); /* no more processing is required */ /* initial length of the string and the result buffer (it can contain null bytes) */ nResBufLen = nResStrLen = *pnStringLen; @@ -707,7 +707,7 @@ char * hb_macroExpandString( const char * szString, HB_SIZE nLength, HB_BOOL * p if( szString ) szResultString = hb_macroTextSubst( szString, &nLength ); else - szResultString = ( char * ) szString; + szResultString = ( char * ) HB_UNCONST( szString ); *pfNewString = ( szString != szResultString ); return szResultString; } diff --git a/src/vm/set.c b/src/vm/set.c index 5a20867e7b..03712f35ad 100644 --- a/src/vm/set.c +++ b/src/vm/set.c @@ -2755,7 +2755,7 @@ const char * hb_osEncodeCP( const char * szName, char ** pszFree, HB_SIZE * pnSi if( pszFree == NULL ) { - pszFree = ( char ** ) &szName; + pszFree = ( char ** ) HB_UNCONST( &szName ); nSize = strlen( szName ); } pszBuf = *pszFree; @@ -2790,7 +2790,7 @@ const char * hb_osDecodeCP( const char * szName, char ** pszFree, HB_SIZE * pnSi if( pszFree == NULL ) { - pszFree = ( char ** ) &szName; + pszFree = ( char ** ) HB_UNCONST( &szName ); nSize = strlen( szName ); } pszBuf = *pszFree; diff --git a/src/vm/strapi.c b/src/vm/strapi.c index 75cee10621..b14391123a 100644 --- a/src/vm/strapi.c +++ b/src/vm/strapi.c @@ -203,20 +203,20 @@ HB_WCHAR * hb_wstrunshare( void ** phStr, const HB_WCHAR * pStr, HB_SIZE nLen ) return NULL; if( nLen > 0 && - ( *phStr == ( void * ) s_szConstStr || hb_xRefCount( *phStr ) > 1 ) ) + ( *phStr == ( const void * ) s_szConstStr || hb_xRefCount( *phStr ) > 1 ) ) { HB_WCHAR * pszDest = ( HB_WCHAR * ) hb_xgrab( ( nLen + 1 ) * sizeof( HB_WCHAR ) ); memcpy( pszDest, pStr, nLen * sizeof( HB_WCHAR ) ); pszDest[ nLen ] = 0; - if( *phStr != ( void * ) s_szConstStr ) + if( *phStr != ( const void * ) s_szConstStr ) hb_xRefDec( *phStr ); *phStr = ( void * ) pszDest; return pszDest; } - return ( HB_WCHAR * ) pStr; + return ( HB_WCHAR * ) HB_UNCONST( pStr ); } char * hb_strunshare( void ** phStr, const char * pStr, HB_SIZE nLen ) @@ -227,19 +227,19 @@ char * hb_strunshare( void ** phStr, const char * pStr, HB_SIZE nLen ) return NULL; if( nLen > 0 && - ( *phStr == ( void * ) s_szConstStr || hb_xRefCount( *phStr ) > 1 ) ) + ( *phStr == ( const void * ) s_szConstStr || hb_xRefCount( *phStr ) > 1 ) ) { char * pszDest = ( char * ) hb_xgrab( ( nLen + 1 ) * sizeof( char ) ); memcpy( pszDest, pStr, nLen * sizeof( char ) ); pszDest[ nLen ] = 0; - if( *phStr != ( void * ) s_szConstStr ) + if( *phStr != ( const void * ) s_szConstStr ) hb_xRefDec( *phStr ); *phStr = ( void * ) pszDest; return pszDest; } - return ( char * ) pStr; + return ( char * ) HB_UNCONST( pStr ); } const char * hb_strnull( const char * str ) @@ -260,7 +260,7 @@ void hb_strfree( void * hString ) { HB_TRACE( HB_TR_DEBUG, ( "hb_strfree(%p)", hString ) ); - if( hString && hString != ( void * ) s_szConstStr ) + if( hString && hString != ( const void * ) s_szConstStr ) hb_xRefFree( hString ); } @@ -284,7 +284,7 @@ const char * hb_itemGetStr( PHB_ITEM pItem, void * cdp, void ** phString, HB_SIZ if( pFree != NULL ) *phString = ( void * ) pFree; else if( pItem->item.asString.allocated == 0 ) - *phString = ( void * ) s_szConstStr; + *phString = HB_UNCONST( s_szConstStr ); else { *phString = ( void * ) pItem->item.asString.value; @@ -329,7 +329,7 @@ const char * hb_itemGetStrUTF8( PHB_ITEM pItem, void ** phString, HB_SIZE * pnLe hb_xRefInc( pItem->item.asString.value ); } else - *phString = ( void * ) s_szConstStr; + *phString = HB_UNCONST( s_szConstStr ); return pItem->item.asString.value; } @@ -356,7 +356,7 @@ const HB_WCHAR * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian, if( nLen == 0 ) { - *phString = ( void * ) s_szConstStr; + *phString = HB_UNCONST( s_szConstStr ); return s_szConstStr; }