From a874a061efd4476bd512fc8b551b4c4491f6e9af Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 20 Oct 2011 21:06:32 +0000 Subject: [PATCH] 2011-10-20 23:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/compiler/hbmain.c ! take starting line number from PP to eliminate possible synchronization problem * harbour/src/compiler/hbcmplib.c ! minor fix in meta filename detecting --- harbour/ChangeLog | 8 ++++++++ harbour/src/compiler/hbcmplib.c | 2 +- harbour/src/compiler/hbmain.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 51bbd76fb3..ef9cf4172c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-10-20 23:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/compiler/hbmain.c + ! take starting line number from PP to eliminate possible + synchronization problem + + * harbour/src/compiler/hbcmplib.c + ! minor fix in meta filename detecting + 2011-10-20 22:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbpp.h * harbour/include/hbcomp.h diff --git a/harbour/src/compiler/hbcmplib.c b/harbour/src/compiler/hbcmplib.c index 48bfbaca36..5091ffd3ca 100644 --- a/harbour/src/compiler/hbcmplib.c +++ b/harbour/src/compiler/hbcmplib.c @@ -67,7 +67,7 @@ static void s_pp_msg( void * cargo, int iErrorFmt, int iLine, PHB_ITEM pError; hb_snprintf( szMsgBuf, sizeof( szMsgBuf ), szText, szPar1, szPar2 ); - if( !szModule || *szModule == 0 || strcmp( szModule, "{SOURCE}" ) == 0 ) + if( !szModule || *szModule == 0 || strcmp( szModule, "{SOURCE}.prg" ) == 0 ) hb_snprintf( szLine, sizeof( szLine ), "line:%i", iLine ); else diff --git a/harbour/src/compiler/hbmain.c b/harbour/src/compiler/hbmain.c index 23148c1d91..f5bbc78407 100644 --- a/harbour/src/compiler/hbmain.c +++ b/harbour/src/compiler/hbmain.c @@ -4170,7 +4170,7 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff #endif HB_COMP_PARAM->iModulesCount = 1; - HB_COMP_PARAM->currLine = 1; + HB_COMP_PARAM->currLine = hb_pp_line( HB_COMP_PARAM->pLex->pPP ) + 1; HB_COMP_PARAM->currModule = hb_compIdentifierNew( HB_COMP_PARAM, szFileName, HB_IDENT_COPY ); if( HB_COMP_PARAM->szFile == NULL )