diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a90b98e9fc..a3c968629c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,10 +1,17 @@ +2000-07-27 01:45 UTC+0800 Ron Pinkas + * source/compiler/harbour.c + ! Corrected pVar->iDeclLine line number + + * source/compiler/hbgenerr.c + ! Corrcted intermitent GPF when hb_compGenWarning() was called with NULL hb_comp_files.pLast + 2000-07-27 10:15 UTC+0100 Ryszard Glab *include/error.ch *include/hbapilng.h *added internal error HB_MEMOVERFLOW *adjusted internal data for Lang API - + *source/lang/msg_tpl.c *source/lang/msgca.c *source/lang/msgcs852.c @@ -32,16 +39,16 @@ *source/lang/msgsr852.c *source/lang/msgsriso.c * added internal error message: "Memory buffer overflow" - + *source/lang/msgpl852.c *source/lang/msgpliso.c *source/lang/msgplmaz.c *updated to work with current Lang API *source/vm/fm.c - * memory blocks are marked with a signature at the end of buffer - to check if memory was overwritten - + * memory blocks are marked with a signature at the end of buffer + to check if memory was overwritten + *source/rtl/transfrm.c * fixed bug when "@(BX" picture was used (it caused that some bytes were copied after the allocated buffer) diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index fc14c0c294..b567b7efa1 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -480,7 +480,7 @@ void hb_compVariableAdd( char * szVarName, BYTE cValueType ) pVar->cType = cValueType; pVar->iUsed = VU_NOT_USED; pVar->pNext = NULL; - pVar->iDeclLine = hb_comp_iLine; + pVar->iDeclLine = hb_comp_iCompiled; if ( toupper( cValueType ) == 'S' ) { @@ -2691,7 +2691,7 @@ void hb_compFinalizeFunction( void ) /* fixes all last defined function returns pVar = pFunc->pLocals; while( pVar ) { - if( pVar->szName && pFunc->szName && pFunc->szName[0] && ! ( pVar->iUsed & VU_USED ) ) + if( pVar->szName && pFunc->szName && pFunc->szName[0] && (! ( pVar->iUsed & VU_USED )) ) { char szFun[ 256 ]; sprintf( szFun, "%s(%i)", pFunc->szName, pVar->iDeclLine ); diff --git a/harbour/source/compiler/hbgenerr.c b/harbour/source/compiler/hbgenerr.c index ec9f7d1d87..53d2a476d2 100644 --- a/harbour/source/compiler/hbgenerr.c +++ b/harbour/source/compiler/hbgenerr.c @@ -147,13 +147,12 @@ void hb_compGenError( char * szErrors[], char cPrefix, int iError, char * szErro void hb_compGenWarning( char * szWarnings[], char cPrefix, int iWarning, char * szWarning1, char * szWarning2) { char * szText = szWarnings[ iWarning - 1 ]; - int iLine = 0; - - iLine = hb_comp_iLine - 1; + int iLine = hb_comp_iLine - 1; if( ( szText[ 0 ] - '0' ) <= hb_comp_iWarnings ) { - printf( "\r%s(%i) ", hb_comp_files.pLast->szFileName, iLine ); + if( hb_comp_files.pLast && hb_comp_files.pLast->szFileName ) + printf( "\r%s(%i) ", hb_comp_files.pLast->szFileName, iLine ); printf( "Warning %c%04i ", cPrefix, iWarning ); printf( szText + 1, szWarning1, szWarning2 );