2007-06-06 14:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/hbregex.c
    ! added workaround for some wrong hack (to check if both can be
      safely removed)
This commit is contained in:
Przemyslaw Czerpak
2007-06-06 12:03:32 +00:00
parent 4027757574
commit d16e229f47
2 changed files with 16 additions and 2 deletions

View File

@@ -8,6 +8,11 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-06-06 14:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/hbregex.c
! added workaround for some wrong hack (to check if both can be
safely removed)
2007-06-06 12:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicls.h
* changed extern hb_bProfiler to local HVM static variable

View File

@@ -104,13 +104,22 @@ static int hb_regexec( PHB_REGEX pRegEx, const char * szString, ULONG ulLen,
int iMatches, HB_REGMATCH * aMatches )
{
#if defined( HB_PCRE_REGEX )
int iResult;
int iResult, i;
for( i = 0; i < iMatches; i++ )
HB_REGMATCH_EO( aMatches, i ) = -1;
iResult = pcre_exec( pRegEx->re_pcre, NULL /* pcre_extra */,
szString, ulLen, 0 /* startoffset */,
pRegEx->iEFlags, aMatches, iMatches + 1 );
if( iResult == 0 )
iResult = iMatches;
{
for( i = 0; i < iMatches; i++ )
{
if( HB_REGMATCH_EO( aMatches, i ) != -1 )
iResult = i + 1;
}
}
return iResult;
#elif defined( HB_POSIX_REGEX )
char * szBuffer = NULL;