/[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 499 by ph10, Wed Mar 3 20:09:39 2010 UTC revision 518 by ph10, Tue May 18 15:47:01 2010 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2009 University of Cambridge             Copyright (c) 1997-2010 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 135  static const int eint[] = { Line 135  static const int eint[] = {
135    REG_INVARG,  /* inconsistent NEWLINE options */    REG_INVARG,  /* inconsistent NEWLINE options */
136    REG_BADPAT,  /* \g is not followed followed by an (optionally braced) non-zero number */    REG_BADPAT,  /* \g is not followed followed by an (optionally braced) non-zero number */
137    REG_BADPAT,  /* a numbered reference must not be zero */    REG_BADPAT,  /* a numbered reference must not be zero */
138    REG_BADPAT,  /* (*VERB) with an argument is not supported */    REG_BADPAT,  /* an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) */
139    /* 60 */    /* 60 */
140    REG_BADPAT,  /* (*VERB) not recognized */    REG_BADPAT,  /* (*VERB) not recognized */
141    REG_BADPAT,  /* number is too big */    REG_BADPAT,  /* number is too big */
# Line 143  static const int eint[] = { Line 143  static const int eint[] = {
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 */    /* 65 */
146    REG_BADPAT   /* different names for subpatterns of the same number are not allowed */    REG_BADPAT,  /* different names for subpatterns of the same number are not allowed */
147      REG_BADPAT,  /* (*MARK) must have an argument */
148      REG_INVARG,  /* this version of PCRE is not compiled with PCRE_UCP support */
149  };  };
150    
151  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 247  if ((cflags & REG_NEWLINE) != 0)  option Line 249  if ((cflags & REG_NEWLINE) != 0)  option
249  if ((cflags & REG_DOTALL) != 0)   options |= PCRE_DOTALL;  if ((cflags & REG_DOTALL) != 0)   options |= PCRE_DOTALL;
250  if ((cflags & REG_NOSUB) != 0)    options |= PCRE_NO_AUTO_CAPTURE;  if ((cflags & REG_NOSUB) != 0)    options |= PCRE_NO_AUTO_CAPTURE;
251  if ((cflags & REG_UTF8) != 0)     options |= PCRE_UTF8;  if ((cflags & REG_UTF8) != 0)     options |= PCRE_UTF8;
252    if ((cflags & REG_UCP) != 0)      options |= PCRE_UCP;
253  if ((cflags & REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY;  if ((cflags & REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY;
254    
255  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,  preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,
# Line 372  switch(rc) Line 375  switch(rc)
375    error if the vector eint, which is indexed by compile-time error number, is    error if the vector eint, which is indexed by compile-time error number, is
376    not the correct length. It seems to be the only way to do such a check at    not the correct length. It seems to be the only way to do such a check at
377    compile time, as the sizeof() operator does not work in the C preprocessor.    compile time, as the sizeof() operator does not work in the C preprocessor.
378    As all the PCRE_ERROR_xxx values are negative, we can use 0 and 1. */    As all the PCRE_ERROR_xxx values are negative, we can use 0 and 1. */
379    
380    case 0:    case 0:
381    case (sizeof(eint)/sizeof(int) == ERRCOUNT):    case (sizeof(eint)/sizeof(int) == ERRCOUNT):

Legend:
Removed from v.499  
changed lines
  Added in v.518

  ViewVC Help
Powered by ViewVC 1.1.5