/[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 654 by ph10, Tue Aug 2 11:00:40 2011 UTC revision 848 by ph10, Wed Jan 4 16:34:01 2012 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 153  static const int eint[] = { Line 153  static const int eint[] = {
153    REG_INVARG,  /* this version of PCRE is not compiled with PCRE_UCP support */    REG_INVARG,  /* this version of PCRE is not compiled with PCRE_UCP support */
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 */
157      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      REG_BADPAT   /* invalid UTF-16 string (should not occur) */
162  };  };
163    
164  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 223  return length + addlength; Line 229  return length + addlength;
229  PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION  PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
230  regfree(regex_t *preg)  regfree(regex_t *preg)
231  {  {
232  (pcre_free)(preg->re_pcre);  (PUBL(free))(preg->re_pcre);
233  }  }
234    
235    
# Line 272  if (preg->re_pcre == NULL) Line 278  if (preg->re_pcre == NULL)
278      eint[errorcode] : REG_BADPAT;      eint[errorcode] : REG_BADPAT;
279    }    }
280    
281  preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);  (void)pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT,
282      &(preg->re_nsub));
283  return 0;  return 0;
284  }  }
285    
# Line 398  switch(rc) Line 405  switch(rc)
405    case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;    case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;
406    case PCRE_ERROR_BADUTF8: return REG_INVARG;    case PCRE_ERROR_BADUTF8: return REG_INVARG;
407    case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;    case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;
408      case PCRE_ERROR_BADMODE: return REG_INVARG;
409    default: return REG_ASSERT;    default: return REG_ASSERT;
410    }    }
411  }  }

Legend:
Removed from v.654  
changed lines
  Added in v.848

  ViewVC Help
Powered by ViewVC 1.1.5