2000-06-13 03:00 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* makefile.bc
+ Added ppcomp.c and ppcore.c to list of harbour.exe dependencies.
* source/pp/ppcore.c
* source/compiler/harbour.y
! Corrected initialization of pFile->iLine to 1
* source/pp/ppcomp.c
! Fixed redundnant empty lines generation and line numbering.
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2000-06-13 03:00 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
|
||||
|
||||
* makefile.bc
|
||||
+ Added ppcomp.c and ppcore.c to list of harbour.exe dependencies.
|
||||
|
||||
* source/pp/ppcore.c
|
||||
* source/compiler/harbour.y
|
||||
! Corrected initialization of pFile->iLine to 1
|
||||
|
||||
* source/pp/ppcomp.c
|
||||
! Fixed redundnant empty lines generation and line numbering.
|
||||
|
||||
2000-06-12 20:25 UTC-0400 David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
* source/rtl/gtwin/gtwin.c
|
||||
|
||||
@@ -509,7 +509,9 @@ HARBOUR_EXE_OBJS = \
|
||||
$(OBJ_DIR)\expropta.obj \
|
||||
$(OBJ_DIR)\exproptb.obj \
|
||||
$(OBJ_DIR)\exproptc.obj \
|
||||
$(OBJ_DIR)\hbfunchk.obj
|
||||
$(OBJ_DIR)\hbfunchk.obj \
|
||||
$(OBJ_DIR)\ppcore.obj \
|
||||
$(OBJ_DIR)\ppcomp.obj
|
||||
|
||||
#
|
||||
# HBRUN.EXE rules
|
||||
|
||||
@@ -1653,6 +1653,7 @@ BOOL hb_compInclude( char * szFileName, PATHNAMES * pSearch )
|
||||
pFile->pBuffer = hb_xgrab( HB_PP_BUFF_SIZE );
|
||||
pFile->iBuffer = pFile->lenBuffer = 10;
|
||||
pFile->szFileName = szFileName;
|
||||
pFile->iLine = 1;
|
||||
pFile->pPrev = NULL;
|
||||
|
||||
/*
|
||||
|
||||
@@ -96,35 +96,54 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
|
||||
if( *s_szLine != '\0' )
|
||||
{
|
||||
ptr = s_szLine;
|
||||
|
||||
HB_SKIPTABSPACES( ptr );
|
||||
|
||||
if( *ptr == '#' )
|
||||
{
|
||||
hb_pp_ParseDirective( ptr + 1 );
|
||||
|
||||
if( pFile != hb_comp_files.pLast )
|
||||
{
|
||||
pFile = ( PFILE ) ( ( PFILE ) hb_comp_files.pLast )->pPrev;
|
||||
|
||||
if( lLine )
|
||||
sprintf( s_szLine, "#line %d \"%s\"\n",
|
||||
pFile->iLine+hb_pp_nEmptyStrings, pFile->szFileName );
|
||||
sprintf( s_szLine, "#line %d \"%s\"\n", pFile->iLine + hb_pp_nEmptyStrings, pFile->szFileName );
|
||||
else
|
||||
*s_szLine = '\0';
|
||||
|
||||
lLine = 0;
|
||||
pFile->iLine += 1+hb_pp_nEmptyStrings;
|
||||
sprintf( s_szLine+strlen(s_szLine), "#line 1 \"%s\"",
|
||||
hb_comp_files.pLast->szFileName );
|
||||
|
||||
pFile->iLine += ( 1 + hb_pp_nEmptyStrings );
|
||||
sprintf( s_szLine+strlen(s_szLine), "#line 1 \"%s\"\n", hb_comp_files.pLast->szFileName );
|
||||
hb_pp_nEmptyStrings = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*s_szLine = '\0';
|
||||
hb_pp_nEmptyStrings++;
|
||||
/*hb_pp_nEmptyStrings++;*/
|
||||
hb_comp_files.pLast->iLine++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[ hb_pp_nCondCompile - 1 ] )
|
||||
if( *ptr == '\0' )
|
||||
{
|
||||
if( hb_comp_files.iFiles == 1 )
|
||||
{
|
||||
hb_pp_nEmptyStrings++;
|
||||
*s_szLine = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_comp_files.pLast->iLine++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[ hb_pp_nCondCompile - 1 ] )
|
||||
{
|
||||
hb_pp_ParseExpression( ptr, s_szOutLine );
|
||||
hb_comp_files.pLast->iLine++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -138,6 +157,7 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( rdlen < 0 )
|
||||
{
|
||||
if( hb_comp_files.iFiles == 1 )
|
||||
@@ -158,18 +178,21 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
|
||||
}
|
||||
if( *s_szLine ) break;
|
||||
}
|
||||
|
||||
if( lLine )
|
||||
{
|
||||
sprintf( ptrOut, "#line %d \"%s\"\n",hb_comp_iLine+hb_pp_nEmptyStrings,hb_comp_files.pLast->szFileName );
|
||||
sprintf( ptrOut, "#line %d \"%s\"", hb_comp_files.pLast->iLine /*hb_comp_iLine + hb_pp_nEmptyStrings*/, hb_comp_files.pLast->szFileName );
|
||||
while( *ptrOut ) ptrOut++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( hb_pp_nEmptyStrings )
|
||||
if( hb_pp_nEmptyStrings && hb_comp_files.iFiles == 1 )
|
||||
for( i=0;i<hb_pp_nEmptyStrings;i++ )
|
||||
*ptrOut++ = '\n';
|
||||
}
|
||||
|
||||
lens = hb_pp_strocpy( ptrOut, s_szLine ) + ( ptrOut - sOut );
|
||||
|
||||
*( sOut + lens++ ) = '\n';
|
||||
*( sOut + lens ) = '\0';
|
||||
|
||||
@@ -232,7 +255,7 @@ int hb_pp_ReadRules( void )
|
||||
if( lLine == 0)
|
||||
*s_szLine = '\0';
|
||||
lLine = 0;
|
||||
pFile->iLine += 1+hb_pp_nEmptyStrings;
|
||||
pFile->iLine += ( 1 + hb_pp_nEmptyStrings );
|
||||
hb_pp_nEmptyStrings = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2662,8 +2662,12 @@ static BOOL OpenInclude( char * szFileName, PATHNAMES * pSearch, PHB_FNAME pMain
|
||||
pFile->iBuffer = pFile->lenBuffer = 10;
|
||||
pFile->szFileName = (char*) hb_xgrab( strlen( szFileName ) + 1 );
|
||||
hb_pp_strocpy( pFile->szFileName, szFileName );
|
||||
|
||||
/*
|
||||
hb_comp_files.pLast->iLine = hb_comp_iLine;
|
||||
hb_comp_iLine = 1;
|
||||
*/
|
||||
|
||||
pFile->iLine = 1;
|
||||
pFile->pPrev = hb_comp_files.pLast;
|
||||
hb_comp_files.pLast = pFile;
|
||||
hb_comp_files.iFiles++;
|
||||
|
||||
Reference in New Issue
Block a user