2000-06-14 22:37 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>

* source/pp/ppcomp.c
     ! Fixed missing CR at EOF of #include file, causing #line directive to be on same line with the next line in parrent file.
     ! Big Improvment of line numbering of #line directive - almost identical to Clipper - to be continued.
This commit is contained in:
Ron Pinkas
2000-06-15 05:41:55 +00:00
parent 7c7be81ad6
commit 37a0086bd1
2 changed files with 109 additions and 82 deletions

View File

@@ -1,6 +1,12 @@
2000-06-14 22:37 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcomp.c
! Fixed missing CR at EOF of #include file, causing #line directive to be on same line with the next line in parrent file.
! Big Improvment of line numbering of #line directive - almost identical to Clipper - to be continued.
2000-06-14-22:10 GMT -3 Luiz Rafael Culik <culik@sl.conex.net>
+doc/en/eval.txt
*Documentation for Eval() function
2000-06-14 23:37 UTC+0200 JfL&RaC <jfl@mafact.com> <rac@mafact.com>
* source/vm/classes.c
! Temporary Fixed hb___msgsuper() to refer the good self value when accessing super
@@ -10,12 +16,10 @@
keeping compatibility with the old method (this is work in progress)
2000-06-14 15:30 UTC-0400 David G. Holm <dholm@jsd-llc.com>
* source/rtl/gtwin/gtwin.c
! Removed debug printf() statements.
2000-06-14 10:00 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcore.c
! Fixed getExpReal() to terminate on unbalanced ')'
@@ -31,6 +35,7 @@
*updated __dblist() and __dbupdate() entries
*source/rdd/dblist.prg
+Source file for __dbList() and __dbUpdate functions
2000-06-13 22:47 UTC+0200 JfL&RaC <jfl@mafact.com> <rac@mafact.com>
* Classes.c
* Initialisation is now properly working
@@ -38,9 +43,7 @@
* MakeFile.bc
* Restoring tasm call in place of tasm32 (sorry :-((( )
2000-06-13 19:55 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*include/hbapigt.h
*added declaration of hb_gt_Suspend()/hb_gt_Resume()
@@ -55,7 +58,6 @@
*added full support for suspend/resume terminal settings
2000-06-13 08:08 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcomp.c
! Minor correction - There should be no empty lines between #line directive any more.

View File

@@ -71,92 +71,96 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
while( ( rdlen = hb_pp_RdStr( pFile->handle, s_szLine + lens, HB_PP_STR_SIZE -
lens, lContinue, ( char * ) pFile->pBuffer, &( pFile->lenBuffer ),
&( pFile->iBuffer ) ) ) >= 0 )
{
lens += rdlen;
{
lens += rdlen;
if( s_szLine[ lens - 1 ] == ';' )
if( s_szLine[ lens - 1 ] == ';' )
{
lContinue = 1;
lens--;
lens--;
while( s_szLine[ lens ] == ' ' || s_szLine[ lens ] == '\t' ) lens--;
s_szLine[ ++lens ] = ' ';
s_szLine[ ++lens ] = '\0';
hb_pp_nEmptyStrings++;
}
else
{
lContinue = 0;
lens = 0;
}
if( !lContinue )
{
if( *s_szLine != '\0' )
{
lContinue = 1;
lens--;
lens--;
while( s_szLine[ lens ] == ' ' || s_szLine[ lens ] == '\t' ) lens--;
s_szLine[ ++lens ] = ' ';
s_szLine[ ++lens ] = '\0';
ptr = s_szLine;
hb_pp_nEmptyStrings++;
}
else
{
lContinue = 0;
lens = 0;
}
HB_SKIPTABSPACES( ptr );
if( !lContinue )
{
if( *s_szLine != '\0' )
{
ptr = s_szLine;
if( *ptr == '#' )
{
hb_pp_ParseDirective( ptr + 1 );
HB_SKIPTABSPACES( ptr );
if( pFile != hb_comp_files.pLast )
{
pFile = ( PFILE ) ( ( PFILE ) hb_comp_files.pLast )->pPrev;
if( *ptr == '#' )
{
hb_pp_ParseDirective( ptr + 1 );
if( lLine )
sprintf( s_szLine, "#line %d \"%s\"\n", pFile->iLine + hb_pp_nEmptyStrings, pFile->szFileName );
else
*s_szLine = '\0';
if( pFile != hb_comp_files.pLast )
{
pFile = ( PFILE ) ( ( PFILE ) hb_comp_files.pLast )->pPrev;
lLine = 0;
if( lLine )
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 );
hb_pp_nEmptyStrings = 0;
}
else
{
*s_szLine = '\0';
/*hb_pp_nEmptyStrings++;*/
hb_comp_files.pLast->iLine++;
}
}
pFile->iLine += ( 1 + hb_pp_nEmptyStrings );
sprintf( s_szLine+strlen(s_szLine), "#line 1 \"%s\"", hb_comp_files.pLast->szFileName );
hb_pp_nEmptyStrings = 0;
}
else
{
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
{
{
*s_szLine = '\0';
/*hb_pp_nEmptyStrings++;*/
hb_comp_files.pLast->iLine++;
}
}
else
{
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
{
*s_szLine = '\0';
hb_pp_nEmptyStrings++;
}
}
}
else
hb_pp_nEmptyStrings++;
break;
}
}
}
}
}
else
hb_pp_nEmptyStrings++;
break;
}
}
if( rdlen < 0 )
{
@@ -181,13 +185,34 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
if( lLine )
{
sprintf( ptrOut, "#line %d \"%s\"", hb_comp_files.pLast->iLine /*hb_comp_iLine + hb_pp_nEmptyStrings*/, hb_comp_files.pLast->szFileName );
sprintf( ptrOut, "#line %d \"%s\"", ( hb_comp_files.pLast->iLine += hb_pp_nEmptyStrings ) , hb_comp_files.pLast->szFileName );
while( *ptrOut ) ptrOut++;
/* Ron Pinkas added 2000-06-14 */
/* Ignore empty lines immediatley after resuming after #include */
hb_pp_nEmptyStrings = 0;
/* Ron Pinkas end 2000-06-14 */
/* Ron Pinkas added 2000-06-14 */
ptr = s_szLine;
HB_SKIPTABSPACES( ptr );
/* Last Opened file ended without CR - adding CR to the #line directive. */
if( *ptr != '\0' )
{
*ptrOut++ = '\n';
*ptrOut = '\0';
hb_comp_files.pLast->iLine++;
}
/* Ron Pinkas end 2000-06-14 */
}
else
{
/* Ron Pinkas added 2000-06-13 */
/* Ignore empty lines in #included files. */
if( hb_pp_nEmptyStrings && hb_comp_files.iFiles == 1 )
for( i=0;i<hb_pp_nEmptyStrings;i++ )
/* Ron Pinkas end 2000-06-13 */
for( i=0; i < hb_pp_nEmptyStrings; i++ )
*ptrOut++ = '\n';
}
@@ -197,7 +222,7 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
*( sOut + lens ) = '\0';
if( handl_o )
hb_pp_WrStr( handl_o, sOut );
hb_pp_WrStr( handl_o, sOut );
return lens;
}