diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f1f526293d..29fed5f080 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-27 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/examples/pp/hbppdef.h + * harbour/examples/pp/hbpragma.c + * updated to compile with current header files. + 2011-01-27 14:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbnetio/utils/hbnetio/hbnetio.hbp * contrib/hbnetio/utils/hbnetio/hbnetioc.hbp diff --git a/harbour/examples/pp/hbppdef.h b/harbour/examples/pp/hbppdef.h index 7f22c5dc2b..7f2de3221c 100644 --- a/harbour/examples/pp/hbppdef.h +++ b/harbour/examples/pp/hbppdef.h @@ -61,6 +61,7 @@ HB_EXTERN_BEGIN typedef void * PHB_PP_STATE; typedef void * PHB_PP_TOKEN; +typedef void * PHB_PP_OPEN_FUNC; struct _DEFINES; typedef struct _DEFINES diff --git a/harbour/examples/pp/hbpragma.c b/harbour/examples/pp/hbpragma.c index 401187d843..86cd534eb4 100644 --- a/harbour/examples/pp/hbpragma.c +++ b/harbour/examples/pp/hbpragma.c @@ -195,7 +195,7 @@ HB_BOOL hb_pp_ParsePragma( char * szLine ) else if( hb_strnicmp( szLine, "BEGINDUMP", PRAGMAS_LEN ) == 0 ) { char sBuffer[ HB_PP_STR_SIZE ], *pBuffer, sDirective[9] ; - int iSize; + int iSize, iOldSize; PINLINE pInline; if( hb_comp_bPPO ) @@ -246,6 +246,7 @@ HB_BOOL hb_pp_ParsePragma( char * szLine ) } } + iOldSize = 0; iSize = strlen( (char*) sBuffer ); if( pInline->pCode == NULL ) { @@ -253,10 +254,10 @@ HB_BOOL hb_pp_ParsePragma( char * szLine ) } else { - pInline->pCode = (BYTE *) hb_xrealloc( pInline->pCode, pInline->lPCodeSize + iSize + 1 ); + iOldSize = strlen( (char*)pInline->pCode ); + pInline->pCode = (BYTE *) hb_xrealloc( pInline->pCode, iOldSize + iSize + 1 ); } - memcpy( pInline->pCode + pInline->lPCodeSize, sBuffer, iSize + 1 ); - pInline->lPCodeSize += iSize; + memcpy( pInline->pCode + iOldSize, sBuffer, iSize + 1 ); goto DigestInline; }