/[pcre]/code/trunk/pcreposix.c
ViewVC logotype

Diff of /code/trunk/pcreposix.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 431 by ph10, Fri Apr 24 09:17:18 2009 UTC revision 432 by ph10, Wed Sep 2 16:02:56 2009 UTC
# Line 240  int erroffset; Line 240  int erroffset;
240  int errorcode;  int errorcode;
241  int options = 0;  int options = 0;
242    
243  if ((cflags & REG_ICASE) != 0)   options |= PCRE_CASELESS;  if ((cflags & REG_ICASE) != 0)    options |= PCRE_CASELESS;
244  if ((cflags & REG_NEWLINE) != 0) options |= PCRE_MULTILINE;  if ((cflags & REG_NEWLINE) != 0)  options |= PCRE_MULTILINE;
245  if ((cflags & REG_DOTALL) != 0)  options |= PCRE_DOTALL;  if ((cflags & REG_DOTALL) != 0)   options |= PCRE_DOTALL;
246  if ((cflags & REG_NOSUB) != 0)   options |= PCRE_NO_AUTO_CAPTURE;  if ((cflags & REG_NOSUB) != 0)    options |= PCRE_NO_AUTO_CAPTURE;
247  if ((cflags & REG_UTF8) != 0)    options |= PCRE_UTF8;  if ((cflags & REG_UTF8) != 0)     options |= PCRE_UTF8;
248    if ((cflags & REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY;
249    
250  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,
251    &erroffset, NULL);    &erroffset, NULL);
# Line 299  if ((eflags & REG_NOTEMPTY) != 0) option Line 300  if ((eflags & REG_NOTEMPTY) != 0) option
300    
301  ((regex_t *)preg)->re_erroffset = (size_t)(-1);  /* Only has meaning after compile */  ((regex_t *)preg)->re_erroffset = (size_t)(-1);  /* Only has meaning after compile */
302    
303  /* When no string data is being returned, ensure that nmatch is zero.  /* When no string data is being returned, or no vector has been passed in which
304  Otherwise, ensure the vector for holding the return data is large enough. */  to put it, ensure that nmatch is zero. Otherwise, ensure the vector for holding
305    the return data is large enough. */
306    
307  if (nosub) nmatch = 0;  if (nosub || pmatch == NULL) nmatch = 0;
308    
309  else if (nmatch > 0)  else if (nmatch > 0)
310    {    {

Legend:
Removed from v.431  
changed lines
  Added in v.432

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12