/[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 93 by nigel, Sat Feb 24 21:41:42 2007 UTC revision 166 by ph10, Wed May 9 14:48:28 2007 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-2006 University of Cambridge             Copyright (c) 1997-2007 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 80  static const int eint[] = { Line 80  static const int eint[] = {
80    REG_BADPAT,  /* malformed number or name after (?( */    REG_BADPAT,  /* malformed number or name after (?( */
81    REG_BADPAT,  /* conditional group contains more than two branches */    REG_BADPAT,  /* conditional group contains more than two branches */
82    REG_BADPAT,  /* assertion expected after (?( */    REG_BADPAT,  /* assertion expected after (?( */
83    REG_BADPAT,  /* (?R or (?digits must be followed by ) */    REG_BADPAT,  /* (?R or (?[+-]digits must be followed by ) */
84    REG_ECTYPE,  /* unknown POSIX class name */    REG_ECTYPE,  /* unknown POSIX class name */
85    REG_BADPAT,  /* POSIX collating elements are not supported */    REG_BADPAT,  /* POSIX collating elements are not supported */
86    REG_INVARG,  /* this version of PCRE is not compiled with PCRE_UTF8 support */    REG_INVARG,  /* this version of PCRE is not compiled with PCRE_UTF8 support */
# Line 108  static const int eint[] = { Line 108  static const int eint[] = {
108    REG_BADPAT,  /* DEFINE group contains more than one branch */    REG_BADPAT,  /* DEFINE group contains more than one branch */
109    REG_BADPAT,  /* repeating a DEFINE group is not allowed */    REG_BADPAT,  /* repeating a DEFINE group is not allowed */
110    REG_INVARG,  /* inconsistent NEWLINE options */    REG_INVARG,  /* inconsistent NEWLINE options */
111    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 */
112      REG_BADPAT   /* (?+ or (?- must be followed by a non-zero number */
113  };  };
114    
115  /* Table of texts corresponding to POSIX error codes */  /* Table of texts corresponding to POSIX error codes */
# Line 141  static const char *const pstring[] = { Line 142  static const char *const pstring[] = {
142  *          Translate error code to string        *  *          Translate error code to string        *
143  *************************************************/  *************************************************/
144    
145  PCRE_DATA_SCOPE size_t  PCREPOSIX_EXP_DEFN size_t
146  regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)  regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
147  {  {
148  const char *message, *addmessage;  const char *message, *addmessage;
# Line 176  return length + addlength; Line 177  return length + addlength;
177  *           Free store held by a regex           *  *           Free store held by a regex           *
178  *************************************************/  *************************************************/
179    
180  PCRE_DATA_SCOPE void  PCREPOSIX_EXP_DEFN void
181  regfree(regex_t *preg)  regfree(regex_t *preg)
182  {  {
183  (pcre_free)(preg->re_pcre);  (pcre_free)(preg->re_pcre);
# Line 199  Returns:      0 on success Line 200  Returns:      0 on success
200                various non-zero codes on failure                various non-zero codes on failure
201  */  */
202    
203  PCRE_DATA_SCOPE int  PCREPOSIX_EXP_DEFN int
204  regcomp(regex_t *preg, const char *pattern, int cflags)  regcomp(regex_t *preg, const char *pattern, int cflags)
205  {  {
206  const char *errorptr;  const char *errorptr;
# Line 241  If REG_NOSUB was specified at compile ti Line 242  If REG_NOSUB was specified at compile ti
242  be set. When this is the case, the nmatch and pmatch arguments are ignored, and  be set. When this is the case, the nmatch and pmatch arguments are ignored, and
243  the only result is yes/no/error. */  the only result is yes/no/error. */
244    
245  PCRE_DATA_SCOPE int  PCREPOSIX_EXP_DEFN int
246  regexec(const regex_t *preg, const char *string, size_t nmatch,  regexec(const regex_t *preg, const char *string, size_t nmatch,
247    regmatch_t pmatch[], int eflags)    regmatch_t pmatch[], int eflags)
248  {  {

Legend:
Removed from v.93  
changed lines
  Added in v.166

  ViewVC Help
Powered by ViewVC 1.1.5