2007-06-06 15:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbregex.h
* harbour/source/rtl/hbregex.c
! fixed GPF and removed two hacks
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-06-06 15:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbregex.h
|
||||
* harbour/source/rtl/hbregex.c
|
||||
! fixed GPF and removed two hacks
|
||||
|
||||
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
|
||||
|
||||
@@ -94,7 +94,7 @@ typedef HB_REGEX * PHB_REGEX;
|
||||
|
||||
#if defined( HB_PCRE_REGEX )
|
||||
#define HB_REGMATCH int
|
||||
#define HB_REGMATCH_SIZE( n ) ( ( n + 1 ) * 3 )
|
||||
#define HB_REGMATCH_SIZE( n ) ( ( n ) * 3 )
|
||||
#define HB_REGMATCH_SO( p, n ) ( p )[ ( n ) * 2 ]
|
||||
#define HB_REGMATCH_EO( p, n ) ( p )[ ( n ) * 2 + 1 ]
|
||||
#elif defined( HB_POSIX_REGEX )
|
||||
|
||||
@@ -106,12 +106,9 @@ static int hb_regexec( PHB_REGEX pRegEx, const char * szString, ULONG ulLen,
|
||||
#if defined( HB_PCRE_REGEX )
|
||||
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 );
|
||||
pRegEx->iEFlags, aMatches, HB_REGMATCH_SIZE( iMatches ) );
|
||||
if( iResult == 0 )
|
||||
{
|
||||
for( i = 0; i < iMatches; i++ )
|
||||
|
||||
Reference in New Issue
Block a user