Update of /cvsroot/setedit/setedit/mainsrc
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14898/mainsrc
Modified Files:
loadshl.cc search.cc
Log Message:
* Fixed: [PCRE] The detection of installed PCRE failed for versions 8.30+
* Fixed: [PCRE] The patch to support PCRE>=8.30 broke the support for
versions older than 3.0 (we ship 2.08).
Index: loadshl.cc
===================================================================
RCS file: /cvsroot/setedit/setedit/mainsrc/loadshl.cc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** loadshl.cc 2 Jun 2015 16:38:22 -0000 1.25
--- loadshl.cc 3 Jun 2015 11:27:12 -0000 1.26
***************
*** 1,3 ****
! /* Copyright (C) 1996-2005 by Salvador E. Tropea (SET),
see copyrigh file for details */
#include <ceditint.h>
--- 1,3 ----
! /* Copyright (C) 1996-2015 by Salvador E. Tropea (SET),
see copyrigh file for details */
#include <ceditint.h>
***************
*** 1396,1404 ****
return NULL;
- // int matchs=(pcre_info(ret,0,0)+1)*3; Old PCREs
int matchs;
! if (pcre_fullinfo(ret,NULL,PCRE_INFO_CAPTURECOUNT,&matchs))
! return 0;
! matchs=(matchs+1)*3;
if (matchs>p.PCREMaxMatchs)
p.PCREMaxMatchs=matchs;
--- 1396,1401 ----
return NULL;
int matchs;
! PCRE_MATCHES(matchs,ret,0);
if (matchs>p.PCREMaxMatchs)
p.PCREMaxMatchs=matchs;
Index: search.cc
===================================================================
RCS file: /cvsroot/setedit/setedit/mainsrc/search.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** search.cc 2 Jun 2015 16:38:22 -0000 1.10
--- search.cc 3 Jun 2015 11:27:12 -0000 1.11
***************
*** 1,3 ****
! /* Copyright (C) 1996-2004 by Salvador E. Tropea (SET),
see copyrigh file for details */
/**[txh]********************************************************************
--- 1,3 ----
! /* Copyright (C) 1996-2015 by Salvador E. Tropea (SET),
see copyrigh file for details */
/**[txh]********************************************************************
***************
*** 460,469 ****
}
! // For PCRE 2.x this value should be enlarged to left space needed by
! // pcre_exec
! // PCREMaxMatchs=(pcre_info(CompiledPCRE,0,0)+1)*3; Old PCREs
! if (pcre_fullinfo(CompiledPCRE,NULL,PCRE_INFO_CAPTURECOUNT,&PCREMaxMatchs))
! return -1;
! PCREMaxMatchs=(PCREMaxMatchs+1)*3;
PCREMatchs=new int[PCREMaxMatchs];
--- 460,464 ----
}
! PCRE_MATCHES(PCREMaxMatchs,CompiledPCRE,-1);
PCREMatchs=new int[PCREMaxMatchs];
|