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
This commit is contained in:
Przemysław Czerpak
2016-01-21 20:42:30 +01:00
parent 5b4cb6058a
commit ae90545eb1
69 changed files with 1540 additions and 1476 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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 ) );