2012-09-12 11:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* harbour/include/hbmacro.h
  * harbour/src/vm/macro.c
    % added static function hb_macroClear() and cleand hb_macroDelete() code
    - removed not longer necessary HB_MACRO_DEALLOCATE macro

  * harbour/src/rdd/hsx/hsx.c
    * use hb_vmDestroyBlockOrMacro()

  * harbour/src/vm/hvm.c
    * allow to execute hb_vmThreadState() by threads without HVM stack

  * harbour/src/3rd/zlib/gzlib.c
  * harbour/src/3rd/zlib/zlib.dif
    * updated for Digital Mars builds builds

  * harbour/src/rtl/gtwvt/gtwvt.c
    * pacified warning
This commit is contained in:
Przemyslaw Czerpak
2012-09-12 09:51:24 +00:00
parent d69236b958
commit c03dbf4af9
8 changed files with 41 additions and 20 deletions

View File

@@ -16,6 +16,25 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-09-12 11:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/include/hbmacro.h
* harbour/src/vm/macro.c
% added static function hb_macroClear() and cleand hb_macroDelete() code
- removed not longer necessary HB_MACRO_DEALLOCATE macro
* harbour/src/rdd/hsx/hsx.c
* use hb_vmDestroyBlockOrMacro()
* harbour/src/vm/hvm.c
* allow to execute hb_vmThreadState() by threads without HVM stack
* harbour/src/3rd/zlib/gzlib.c
* harbour/src/3rd/zlib/zlib.dif
* updated for Digital Mars builds builds
* harbour/src/rtl/gtwvt/gtwvt.c
* pacified warning
2012-09-11 16:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/hbgtwvg.ch
+ Added: constants HB_GTE_CREATED and HB_GTE_CLOSED.

View File

@@ -79,7 +79,6 @@ HB_EXTERN_BEGIN
#define HB_MACRO_GEN_PARE 16 /* generate parentesized list */
#define HB_MACRO_GEN_LIST 32 /* generate push operation for every comma separated expressions */
#define HB_MACRO_GEN_REFER 64 /* generate PUSH pcodes for reference to given expression */
#define HB_MACRO_DEALLOCATE 128 /* macro structure is allocated on the heap */
/* values returned from compilation process
*/

View File

@@ -5,7 +5,7 @@
#include "gzguts.h"
#if defined(__XCC__) || defined(__MINGW32CE__)
#if defined(__XCC__) || defined(__DMC__) || defined(__MINGW32CE__)
# define LSEEK lseek
#elif defined(__POCC__)
# define LSEEK _lseek64

View File

@@ -80,7 +80,7 @@ diff -urN zlib.orig/gzlib.c zlib/gzlib.c
#include "gzguts.h"
-#if defined(_WIN32) && !defined(__BORLANDC__)
+#if defined(__XCC__) || defined(__MINGW32CE__)
+#if defined(__XCC__) || defined(__DMC__) || defined(__MINGW32CE__)
+# define LSEEK lseek
+#elif defined(__POCC__)
+# define LSEEK _lseek64

View File

@@ -1262,9 +1262,7 @@ static LPHSXINFO hb_hsxNew( void )
static void hb_hsxExpDestroy( PHB_ITEM pItem )
{
if( hb_itemType( pItem ) == HB_IT_POINTER )
hb_macroDelete( ( HB_MACRO_PTR ) hb_itemGetPtr( pItem ) );
hb_itemRelease( pItem );
hb_vmDestroyBlockOrMacro( pItem );
}
static int hb_hsxVerify( int iHandle, const char * szText, HB_SIZE nLen,

View File

@@ -1726,7 +1726,7 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT )
{
if( pWVT->wcTransLen == 0x100 && ( usChar >> 8 ) == 0xFF )
usChar &= 0x00FF;
if( usChar < pWVT->wcTransLen && pWVT->wcTrans[ usChar ] )
if( ( HB_SIZE ) usChar < pWVT->wcTransLen && pWVT->wcTrans[ usChar ] )
usChar = pWVT->wcTrans[ usChar ];
}

View File

@@ -637,7 +637,7 @@ void * hb_vmThreadState( void )
HB_TRACE(HB_TR_DEBUG, ("hb_vmThreadState()"));
return hb_stackList();
return hb_stackId() ? hb_stackList() : NULL;
}
static void hb_vmStackAdd( PHB_THREADSTATE pState )

View File

@@ -138,15 +138,21 @@ static int hb_macroParse( HB_MACRO_PTR pMacro )
* the 'pMacro' pointer is not released - it can be a pointer
* to a memory allocated on the stack.
*/
void hb_macroDelete( HB_MACRO_PTR pMacro )
static void hb_macroClear( HB_MACRO_PTR pMacro )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroDelete(%p)", pMacro));
HB_TRACE(HB_TR_DEBUG, ("hb_macroClear(%p)", pMacro));
hb_xfree( pMacro->pCodeInfo->pCode );
if( pMacro->pError )
hb_errRelease( pMacro->pError );
if( pMacro->Flags & HB_MACRO_DEALLOCATE )
hb_xfree( pMacro );
}
void hb_macroDelete( HB_MACRO_PTR pMacro )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroDelete(%p)", pMacro));
hb_macroClear( pMacro );
hb_xfree( pMacro );
}
/* checks if a correct ITEM was passed from the virtual machine eval stack
@@ -488,7 +494,7 @@ void hb_macroGetValue( PHB_ITEM pItem, int iContext, int flags )
if( pszFree )
hb_xfree( pszFree );
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
else if( iContext == HB_P_MACROPUSHLIST && hb_vmRequestQuery() == 0 )
{
@@ -531,7 +537,7 @@ void hb_macroSetValue( PHB_ITEM pItem, int flags )
else
hb_macroSyntaxError( &struMacro );
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
else if( hb_vmRequestQuery() == 0 )
{
@@ -574,7 +580,7 @@ void hb_macroPushReference( PHB_ITEM pItem )
else
hb_macroSyntaxError( &struMacro );
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
}
@@ -636,7 +642,7 @@ static void hb_macroUseAliased( PHB_ITEM pAlias, PHB_ITEM pVar, int iFlag, int i
}
hb_xfree( szString );
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
else if( hb_macroCheckParam( pVar ) )
{
@@ -665,7 +671,7 @@ static void hb_macroUseAliased( PHB_ITEM pAlias, PHB_ITEM pVar, int iFlag, int i
else
hb_macroSyntaxError( &struMacro );
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
}
@@ -797,8 +803,7 @@ HB_MACRO_PTR hb_macroCompile( const char * szString )
pMacro = ( HB_MACRO_PTR ) hb_xgrab( sizeof( HB_MACRO ) );
pMacro->mode = HB_MODE_MACRO;
pMacro->supported = hb_macroFlags() | HB_SM_ISUSERCP();
pMacro->Flags = HB_MACRO_DEALLOCATE | HB_MACRO_GEN_PUSH |
HB_MACRO_GEN_LIST | HB_MACRO_GEN_PARE;
pMacro->Flags = HB_MACRO_GEN_PUSH | HB_MACRO_GEN_LIST | HB_MACRO_GEN_PARE;
pMacro->uiNameLen = HB_SYMBOL_NAME_LEN;
pMacro->status = HB_MACRO_CONT;
pMacro->string = szString;
@@ -1018,7 +1023,7 @@ const char * hb_macroGetType( PHB_ITEM pItem )
else
szType = "UE"; /* syntax error during compilation */
hb_macroDelete( &struMacro );
hb_macroClear( &struMacro );
}
else
szType = "U";