/[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 41 by nigel, Sat Feb 24 21:39:17 2007 UTC revision 53 by nigel, Sat Feb 24 21:39:42 2007 UTC
# Line 12  functions. Line 12  functions.
12    
13  Written by: Philip Hazel <ph10@cam.ac.uk>  Written by: Philip Hazel <ph10@cam.ac.uk>
14    
15             Copyright (c) 1997-1999 University of Cambridge             Copyright (c) 1997-2001 University of Cambridge
16    
17  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
18  Permission is granted to anyone to use this software for any purpose on any  Permission is granted to anyone to use this software for any purpose on any
# Line 46  restrictions: Line 46  restrictions:
46  static const char *estring[] = {  static const char *estring[] = {
47    ERR1,  ERR2,  ERR3,  ERR4,  ERR5,  ERR6,  ERR7,  ERR8,  ERR9,  ERR10,    ERR1,  ERR2,  ERR3,  ERR4,  ERR5,  ERR6,  ERR7,  ERR8,  ERR9,  ERR10,
48    ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20,    ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20,
49    ERR21, ERR22, ERR23, ERR24, ERR25 };    ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR29, ERR29, ERR30,
50      ERR31 };
51    
52  static int eint[] = {  static int eint[] = {
53    REG_EESCAPE, /* "\\ at end of pattern" */    REG_EESCAPE, /* "\\ at end of pattern" */
# Line 61  static int eint[] = { Line 62  static int eint[] = {
62    REG_BADRPT,  /* "operand of unlimited repeat could match the empty string" */    REG_BADRPT,  /* "operand of unlimited repeat could match the empty string" */
63    REG_ASSERT,  /* "internal error: unexpected repeat" */    REG_ASSERT,  /* "internal error: unexpected repeat" */
64    REG_BADPAT,  /* "unrecognized character after (?" */    REG_BADPAT,  /* "unrecognized character after (?" */
65    REG_ESIZE,   /* "too many capturing parenthesized sub-patterns" */    REG_ASSERT,  /* "unused error" */
66    REG_EPAREN,  /* "missing )" */    REG_EPAREN,  /* "missing )" */
67    REG_ESUBREG, /* "back reference to non-existent subpattern" */    REG_ESUBREG, /* "back reference to non-existent subpattern" */
68    REG_INVARG,  /* "erroffset passed as NULL" */    REG_INVARG,  /* "erroffset passed as NULL" */
69    REG_INVARG,  /* "unknown option bit(s) set" */    REG_INVARG,  /* "unknown option bit(s) set" */
70    REG_EPAREN,  /* "missing ) after comment" */    REG_EPAREN,  /* "missing ) after comment" */
71    REG_ESIZE,   /* "too many sets of parentheses" */    REG_ESIZE,   /* "parentheses nested too deeply" */
72    REG_ESIZE,   /* "regular expression too large" */    REG_ESIZE,   /* "regular expression too large" */
73    REG_ESPACE,  /* "failed to get memory" */    REG_ESPACE,  /* "failed to get memory" */
74    REG_EPAREN,  /* "unmatched brackets" */    REG_EPAREN,  /* "unmatched brackets" */
# Line 76  static int eint[] = { Line 77  static int eint[] = {
77    REG_BADPAT,  /* "lookbehind assertion is not fixed length" */    REG_BADPAT,  /* "lookbehind assertion is not fixed length" */
78    REG_BADPAT,  /* "malformed number after (?(" */    REG_BADPAT,  /* "malformed number after (?(" */
79    REG_BADPAT,  /* "conditional group containe more than two branches" */    REG_BADPAT,  /* "conditional group containe more than two branches" */
80    REG_BADPAT   /* "assertion expected after (?(" */    REG_BADPAT,  /* "assertion expected after (?(" */
81      REG_BADPAT,  /* "(?p must be followed by )" */
82      REG_ECTYPE,  /* "unknown POSIX class name" */
83      REG_BADPAT,  /* "POSIX collating elements are not supported" */
84      REG_INVARG,  /* "this version of PCRE is not compiled with PCRE_UTF8 support" */
85      REG_BADPAT,  /* "characters with values > 255 are not yet supported in classes" */
86      REG_BADPAT,  /* "character value in \x{...} sequence is too large" */
87      REG_BADPAT   /* "invalid condition (?(0)" */
88  };  };
89    
90  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 231  preg->re_erroffset = (size_t)(-1);   /* Line 239  preg->re_erroffset = (size_t)(-1);   /*
239    
240  if (nmatch > 0)  if (nmatch > 0)
241    {    {
242    ovector = malloc(sizeof(int) * nmatch * 3);    ovector = (int *)malloc(sizeof(int) * nmatch * 3);
243    if (ovector == NULL) return REG_ESPACE;    if (ovector == NULL) return REG_ESPACE;
244    }    }
245    

Legend:
Removed from v.41  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.5