/[pcre]/code/tags/pcre-5.0/pcre.in
ViewVC logotype

Diff of /code/tags/pcre-5.0/pcre.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 63 by nigel, Sat Feb 24 21:40:03 2007 UTC revision 75 by nigel, Sat Feb 24 21:40:37 2007 UTC
# Line 2  Line 2 
2  *       Perl-Compatible Regular Expressions      *  *       Perl-Compatible Regular Expressions      *
3  *************************************************/  *************************************************/
4    
5  /* Copyright (c) 1997-2003 University of Cambridge */  /* In its original form, this is the .in file that is transformed by
6    "configure" into pcre.h.
7    
8               Copyright (c) 1997-2004 University of Cambridge
9    
10    -----------------------------------------------------------------------------
11    Redistribution and use in source and binary forms, with or without
12    modification, are permitted provided that the following conditions are met:
13    
14        * Redistributions of source code must retain the above copyright notice,
15          this list of conditions and the following disclaimer.
16    
17        * Redistributions in binary form must reproduce the above copyright
18          notice, this list of conditions and the following disclaimer in the
19          documentation and/or other materials provided with the distribution.
20    
21        * Neither the name of the University of Cambridge nor the names of its
22          contributors may be used to endorse or promote products derived from
23          this software without specific prior written permission.
24    
25    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35    POSSIBILITY OF SUCH DAMAGE.
36    -----------------------------------------------------------------------------
37    */
38    
39  #ifndef _PCRE_H  #ifndef _PCRE_H
40  #define _PCRE_H  #define _PCRE_H
# Line 23  make changes to pcre.in. */ Line 55  make changes to pcre.in. */
55  #    endif  #    endif
56  #  else  #  else
57  #    ifndef PCRE_STATIC  #    ifndef PCRE_STATIC
58  #      define PCRE_DATA_SCOPE __declspec(dllimport)  #      define PCRE_DATA_SCOPE extern __declspec(dllimport)
59  #    endif  #    endif
60  #  endif  #  endif
61  #endif  #endif
# Line 57  extern "C" { Line 89  extern "C" {
89  #define PCRE_NOTEMPTY           0x0400  #define PCRE_NOTEMPTY           0x0400
90  #define PCRE_UTF8               0x0800  #define PCRE_UTF8               0x0800
91  #define PCRE_NO_AUTO_CAPTURE    0x1000  #define PCRE_NO_AUTO_CAPTURE    0x1000
92    #define PCRE_NO_UTF8_CHECK      0x2000
93    #define PCRE_AUTO_CALLOUT       0x4000
94    #define PCRE_PARTIAL            0x8000
95    
96  /* Exec-time and get/set-time error codes */  /* Exec-time and get/set-time error codes */
97    
98  #define PCRE_ERROR_NOMATCH        (-1)  #define PCRE_ERROR_NOMATCH         (-1)
99  #define PCRE_ERROR_NULL           (-2)  #define PCRE_ERROR_NULL            (-2)
100  #define PCRE_ERROR_BADOPTION      (-3)  #define PCRE_ERROR_BADOPTION       (-3)
101  #define PCRE_ERROR_BADMAGIC       (-4)  #define PCRE_ERROR_BADMAGIC        (-4)
102  #define PCRE_ERROR_UNKNOWN_NODE   (-5)  #define PCRE_ERROR_UNKNOWN_NODE    (-5)
103  #define PCRE_ERROR_NOMEMORY       (-6)  #define PCRE_ERROR_NOMEMORY        (-6)
104  #define PCRE_ERROR_NOSUBSTRING    (-7)  #define PCRE_ERROR_NOSUBSTRING     (-7)
105  #define PCRE_ERROR_MATCHLIMIT     (-8)  #define PCRE_ERROR_MATCHLIMIT      (-8)
106  #define PCRE_ERROR_CALLOUT        (-9)  /* Never used by PCRE itself */  #define PCRE_ERROR_CALLOUT         (-9)  /* Never used by PCRE itself */
107    #define PCRE_ERROR_BADUTF8        (-10)
108    #define PCRE_ERROR_BADUTF8_OFFSET (-11)
109    #define PCRE_ERROR_PARTIAL        (-12)
110    #define PCRE_ERROR_BADPARTIAL     (-13)
111    #define PCRE_ERROR_INTERNAL       (-14)
112    #define PCRE_ERROR_BADCOUNT       (-15)
113    
114  /* Request types for pcre_fullinfo() */  /* Request types for pcre_fullinfo() */
115    
# Line 84  extern "C" { Line 125  extern "C" {
125  #define PCRE_INFO_NAMECOUNT          8  #define PCRE_INFO_NAMECOUNT          8
126  #define PCRE_INFO_NAMETABLE          9  #define PCRE_INFO_NAMETABLE          9
127  #define PCRE_INFO_STUDYSIZE         10  #define PCRE_INFO_STUDYSIZE         10
128    #define PCRE_INFO_DEFAULT_TABLES    11
129    
130  /* Request types for pcre_config() */  /* Request types for pcre_config() */
131    
# Line 92  extern "C" { Line 134  extern "C" {
134  #define PCRE_CONFIG_LINK_SIZE               2  #define PCRE_CONFIG_LINK_SIZE               2
135  #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD  3  #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD  3
136  #define PCRE_CONFIG_MATCH_LIMIT             4  #define PCRE_CONFIG_MATCH_LIMIT             4
137    #define PCRE_CONFIG_STACKRECURSE            5
138    #define PCRE_CONFIG_UNICODE_PROPERTIES      6
139    
140  /* Bit flags for the pcre_extra structure */  /* Bit flags for the pcre_extra structure */
141    
142  #define PCRE_EXTRA_STUDY_DATA          0x0001  #define PCRE_EXTRA_STUDY_DATA          0x0001
143  #define PCRE_EXTRA_MATCH_LIMIT         0x0002  #define PCRE_EXTRA_MATCH_LIMIT         0x0002
144  #define PCRE_EXTRA_CALLOUT_DATA        0x0004  #define PCRE_EXTRA_CALLOUT_DATA        0x0004
145    #define PCRE_EXTRA_TABLES              0x0008
146    
147  /* Types */  /* Types */
148    
# Line 105  struct real_pcre;                 /* dec Line 150  struct real_pcre;                 /* dec
150  typedef struct real_pcre pcre;  typedef struct real_pcre pcre;
151    
152  /* The structure for passing additional data to pcre_exec(). This is defined in  /* The structure for passing additional data to pcre_exec(). This is defined in
153  such as way as to be extensible. */  such as way as to be extensible. Always add new fields at the end, in order to
154    remain compatible. */
155    
156  typedef struct pcre_extra {  typedef struct pcre_extra {
157    unsigned long int flags;        /* Bits for which fields are set */    unsigned long int flags;        /* Bits for which fields are set */
158    void *study_data;               /* Opaque data from pcre_study() */    void *study_data;               /* Opaque data from pcre_study() */
159    unsigned long int match_limit;  /* Maximum number of calls to match() */    unsigned long int match_limit;  /* Maximum number of calls to match() */
160    void *callout_data;             /* Data passed back in callouts */    void *callout_data;             /* Data passed back in callouts */
161      const unsigned char *tables;    /* Pointer to character tables */
162  } pcre_extra;  } pcre_extra;
163    
164  /* The structure for passing out data via the pcre_callout_function. We use a  /* The structure for passing out data via the pcre_callout_function. We use a
# Line 127  typedef struct pcre_callout_block { Line 174  typedef struct pcre_callout_block {
174    const char  *subject;           /* The subject being matched */    const char  *subject;           /* The subject being matched */
175    int          subject_length;    /* The length of the subject */    int          subject_length;    /* The length of the subject */
176    int          start_match;       /* Offset to start of this match attempt */    int          start_match;       /* Offset to start of this match attempt */
177    int          current_position;  /* Where we currently are */    int          current_position;  /* Where we currently are in the subject */
178    int          capture_top;       /* Max current capture */    int          capture_top;       /* Max current capture */
179    int          capture_last;      /* Most recently closed capture */    int          capture_last;      /* Most recently closed capture */
180    void        *callout_data;      /* Data passed in with the call */    void        *callout_data;      /* Data passed in with the call */
181      /* ------------------- Added for Version 1 -------------------------- */
182      int          pattern_position;  /* Offset to next item in the pattern */
183      int          next_item_length;  /* Length of next item in the pattern */
184    /* ------------------------------------------------------------------ */    /* ------------------------------------------------------------------ */
185  } pcre_callout_block;  } pcre_callout_block;
186    
187  /* Indirection for store get and free functions. These can be set to  /* Indirection for store get and free functions. These can be set to
188  alternative malloc/free functions if required. There is also an optional  alternative malloc/free functions if required. Special ones are used in the
189  callout function that is triggered by the (?) regex item. Some magic is  non-recursive case for "frames". There is also an optional callout function
190  required for Win32 DLL; it is null on other OS. For Virtual Pascal, these  that is triggered by the (?) regex item. Some magic is required for Win32 DLL;
191  have to be different again. */  it is null on other OS. For Virtual Pascal, these have to be different again.
192    */
193    
194  #ifndef VPCOMPAT  #ifndef VPCOMPAT
195  PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);  PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
196  PCRE_DATA_SCOPE void  (*pcre_free)(void *);  PCRE_DATA_SCOPE void  (*pcre_free)(void *);
197    PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t);
198    PCRE_DATA_SCOPE void  (*pcre_stack_free)(void *);
199  PCRE_DATA_SCOPE int   (*pcre_callout)(pcre_callout_block *);  PCRE_DATA_SCOPE int   (*pcre_callout)(pcre_callout_block *);
200  #else   /* VPCOMPAT */  #else   /* VPCOMPAT */
201  extern void *pcre_malloc(size_t);  extern void *pcre_malloc(size_t);
202  extern void  pcre_free(void *);  extern void  pcre_free(void *);
203    extern void *pcre_stack_malloc(size_t);
204    extern void  pcre_stack_free(void *);
205  extern int   pcre_callout(pcre_callout_block *);  extern int   pcre_callout(pcre_callout_block *);
206  #endif  /* VPCOMPAT */  #endif  /* VPCOMPAT */
207    

Legend:
Removed from v.63  
changed lines
  Added in v.75

  ViewVC Help
Powered by ViewVC 1.1.5