/[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 418 by ph10, Fri Apr 24 09:17:18 2009 UTC revision 457 by ph10, Sat Oct 3 16:24:08 2009 UTC
# Line 141  static const int eint[] = { Line 141  static const int eint[] = {
141    REG_BADPAT,  /* number is too big */    REG_BADPAT,  /* number is too big */
142    REG_BADPAT,  /* subpattern name expected */    REG_BADPAT,  /* subpattern name expected */
143    REG_BADPAT,  /* digit expected after (?+ */    REG_BADPAT,  /* digit expected after (?+ */
144    REG_BADPAT   /* ] is an invalid data character in JavaScript compatibility mode */    REG_BADPAT,  /* ] is an invalid data character in JavaScript compatibility mode */
145      /* 65 */
146      REG_BADPAT   /* different names for subpatterns of the same number are not allowed */
147  };  };
148    
149  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 240  int erroffset; Line 242  int erroffset;
242  int errorcode;  int errorcode;
243  int options = 0;  int options = 0;
244    
245  if ((cflags & REG_ICASE) != 0)   options |= PCRE_CASELESS;  if ((cflags & REG_ICASE) != 0)    options |= PCRE_CASELESS;
246  if ((cflags & REG_NEWLINE) != 0) options |= PCRE_MULTILINE;  if ((cflags & REG_NEWLINE) != 0)  options |= PCRE_MULTILINE;
247  if ((cflags & REG_DOTALL) != 0)  options |= PCRE_DOTALL;  if ((cflags & REG_DOTALL) != 0)   options |= PCRE_DOTALL;
248  if ((cflags & REG_NOSUB) != 0)   options |= PCRE_NO_AUTO_CAPTURE;  if ((cflags & REG_NOSUB) != 0)    options |= PCRE_NO_AUTO_CAPTURE;
249  if ((cflags & REG_UTF8) != 0)    options |= PCRE_UTF8;  if ((cflags & REG_UTF8) != 0)     options |= PCRE_UTF8;
250    if ((cflags & REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY;
251    
252  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,
253    &erroffset, NULL);    &erroffset, NULL);
# Line 299  if ((eflags & REG_NOTEMPTY) != 0) option Line 302  if ((eflags & REG_NOTEMPTY) != 0) option
302    
303  ((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 */
304    
305  /* 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
306  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
307    the return data is large enough. */
308    
309  if (nosub) nmatch = 0;  if (nosub || pmatch == NULL) nmatch = 0;
310    
311  else if (nmatch > 0)  else if (nmatch > 0)
312    {    {

Legend:
Removed from v.418  
changed lines
  Added in v.457

  ViewVC Help
Powered by ViewVC 1.1.5