/[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 835 by ph10, Wed Dec 28 16:10:09 2011 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 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-2010 University of Cambridge             Copyright (c) 1997-2012 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 154  static const int eint[] = { Line 154  static const int eint[] = {
154    REG_BADPAT,  /* \c must be followed by an ASCII character */    REG_BADPAT,  /* \c must be followed by an ASCII character */
155    REG_BADPAT,  /* \k is not followed by a braced, angle-bracketed, or quoted name */    REG_BADPAT,  /* \k is not followed by a braced, angle-bracketed, or quoted name */
156    /* 70 */    /* 70 */
157    REG_BADPAT,  /* internal error: unknown opcode in find_fixedlength() */    REG_BADPAT,  /* internal error: unknown opcode in find_fixedlength() */
158      REG_BADPAT,  /* \N is not supported in a class */
159      REG_BADPAT,  /* too many forward references */
160      REG_BADPAT,  /* disallowed UTF-8/16 code point (>= 0xd800 && <= 0xdfff) */
161  };  };
162    
163  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 225  return length + addlength; Line 228  return length + addlength;
228  PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION  PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
229  regfree(regex_t *preg)  regfree(regex_t *preg)
230  {  {
231  (pcre_free)(preg->re_pcre);  (PUBL(free))(preg->re_pcre);
232  }  }
233    
234    
# Line 274  if (preg->re_pcre == NULL) Line 277  if (preg->re_pcre == NULL)
277      eint[errorcode] : REG_BADPAT;      eint[errorcode] : REG_BADPAT;
278    }    }
279    
280  preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);  (void)pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT,
281      &(preg->re_nsub));
282  return 0;  return 0;
283  }  }
284    
# Line 400  switch(rc) Line 404  switch(rc)
404    case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;    case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;
405    case PCRE_ERROR_BADUTF8: return REG_INVARG;    case PCRE_ERROR_BADUTF8: return REG_INVARG;
406    case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;    case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;
407      case PCRE_ERROR_BADMODE: return REG_INVARG;
408    default: return REG_ASSERT;    default: return REG_ASSERT;
409    }    }
410  }  }

Legend:
Removed from v.835  
changed lines
  Added in v.836

  ViewVC Help
Powered by ViewVC 1.1.5