2006-08-08 11:40 UTC+0100 Ryszard Glab <rglab//imid.med.pl>

* source/pp/pplib.c
      * suppressed preprocessing of empty lines

   * utils/hbpptest/pretest.prg
      * added line length to MLCOUNT to correctly count the
        number of lines to process
This commit is contained in:
Ryszard Glab
2006-08-08 09:31:00 +00:00
parent 535f82b5b2
commit ebb9cad8ec
3 changed files with 21 additions and 10 deletions

View File

@@ -8,6 +8,15 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2006-08-08 11:40 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* source/pp/pplib.c
* suppressed preprocessing of empty lines
* utils/hbpptest/pretest.prg
* added line length to MLCOUNT to correctly count the
number of lines to process
2006-08-07 14:00 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* source/compiler/harbour.y
* fixed to support @funname() syntax in assigments

View File

@@ -187,17 +187,19 @@ HB_FUNC( __PREPROCESS )
slen = HB_MIN( hb_parclen( 1 ), HB_PP_STR_SIZE - 1 );
memcpy( pText, hb_parc( 1 ), slen );
pText[ slen ] = 0; /* Preprocessor expects null-terminated string */
memset( pOut, 0, HB_PP_STR_SIZE );
HB_SKIPTABSPACES( ptr );
if( !hb_pp_topDefine )
hb_pp_Table();
if( hb_pp_ParseExpression( ptr, pOut, FALSE ) > 0 )
if( slen )
{
/* Some error here? */
}
memset( pOut, 0, HB_PP_STR_SIZE );
HB_SKIPTABSPACES( ptr );
if( !hb_pp_topDefine )
hb_pp_Table();
if( *ptr && hb_pp_ParseExpression( ptr, pOut, FALSE ) > 0 )
{
/* Some error here? */
}
}
hb_retc( pText ); /* Preprocessor returns parsed line in input buffer */
}
/* else

View File

@@ -1223,7 +1223,7 @@ FUNCTION PreRun( in, pre )
LOCAL len, i, cin, cout
LOCAL out:=''
len := MLCOUNT( in )
len := MLCOUNT( in, 1024 )
FOR i:=1 TO len
cin := ALLTRIM( MEMOLINE(in, 1024, i) )
out += __PreProcess( cin )