[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine lib_regexp.c,1.5,1.6
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine lib_regexp.c,1.5,1.6 |
Date: |
Fri, 23 May 2003 03:37:08 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv5526/engine
Modified Files:
lib_regexp.c
Log Message:
generate empty (-1,-1) pairs for regexp matches
Index: lib_regexp.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_regexp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** lib_regexp.c 23 May 2003 03:47:55 -0000 1.5
--- lib_regexp.c 23 May 2003 07:37:06 -0000 1.6
***************
*** 145,149 ****
ILClass *elemClass;
ILObject *array;
! ILInt32 numMatches;
RegexMatch *matchList;
--- 145,149 ----
ILClass *elemClass;
ILObject *array;
! ILInt32 numMatches, index;
RegexMatch *matchList;
***************
*** 185,193 ****
return 0;
}
! numMatches = 0;
! while(numMatches < maxMatches && matches[numMatches].rm_so != -1)
! {
! ++numMatches;
! }
array = _IL_Array_CreateArray_jiiii
(_thread, (ILNativeInt)elemClass, 1, numMatches, 0, 0);
--- 185,193 ----
return 0;
}
!
! numMatches = ((regex_t*)compiled)->re_nsub + 1;
!
! numMatches = (maxMatches < numMatches) ? maxMatches : numMatches ;
!
array = _IL_Array_CreateArray_jiiii
(_thread, (ILNativeInt)elemClass, 1, numMatches, 0, 0);
***************
*** 201,210 ****
}
matchList = ArrayToBuffer(array);
! numMatches = 0;
! while(numMatches < maxMatches && matches[numMatches].rm_so != -1)
{
! matchList[numMatches].start =
(ILInt32)(matches[numMatches].rm_so);
! matchList[numMatches].end =
(ILInt32)(matches[numMatches].rm_eo);
! ++numMatches;
}
if(matches != 0)
--- 201,211 ----
}
matchList = ArrayToBuffer(array);
!
! index = 0;
! while(index < numMatches)
{
! matchList[index].start = (ILInt32)(matches[index].rm_so);
! matchList[index].end = (ILInt32)(matches[index].rm_eo);
! ++index;
}
if(matches != 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine lib_regexp.c,1.5,1.6,
Gopal.V <address@hidden> <=