/[pcre]/code/trunk/pcre.h.in
ViewVC logotype

Diff of /code/trunk/pcre.h.in

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

revision 1187 by zherczeg, Mon Oct 29 11:30:45 2012 UTC revision 1309 by ph10, Fri Apr 5 15:35:59 2013 UTC
# Line 5  Line 5 
5  /* This is the public header file for the PCRE library, to be #included by  /* This is the public header file for the PCRE library, to be #included by
6  applications that call the PCRE functions.  applications that call the PCRE functions.
7    
8             Copyright (c) 1997-2012 University of Cambridge             Copyright (c) 1997-2013 University of Cambridge
9    
10  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
11  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 95  it is needed here for malloc. */ Line 95  it is needed here for malloc. */
95  extern "C" {  extern "C" {
96  #endif  #endif
97    
98  /* Options. Some are compile-time only, some are run-time only, and some are  /* Public options. Some are compile-time only, some are run-time only, and some
99  both, so we keep them all distinct. However, almost all the bits in the options  are both. Most of the compile-time options are saved with the compiled regex so
100  word are now used. In the long run, we may have to re-use some of the  that they can be inspected during studying (and therefore JIT compiling). Note
101  compile-time only bits for runtime options, or vice versa. In the comments  that pcre_study() has its own set of options. Originally, all the options
102  below, "compile", "exec", and "DFA exec" mean that the option is permitted to  defined here used distinct bits. However, almost all the bits in a 32-bit word
103  be set for those functions; "used in" means that an option may be set only for  are now used, so in order to conserve them, option bits that were previously
104  compile, but is subsequently referenced in exec and/or DFA exec. Any of the  only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may
105  compile-time options may be inspected during studying (and therefore JIT  also be used for compile-time options that affect only compiling and are not
106  compiling). */  relevant for studying or JIT compiling.
107    
108  #define PCRE_CASELESS           0x00000001  /* Compile */  Some options for pcre_compile() change its behaviour but do not affect the
109  #define PCRE_MULTILINE          0x00000002  /* Compile */  behaviour of the execution functions. Other options are passed through to the
110  #define PCRE_DOTALL             0x00000004  /* Compile */  execution functions and affect their behaviour, with or without affecting the
111  #define PCRE_EXTENDED           0x00000008  /* Compile */  behaviour of pcre_compile().
112  #define PCRE_ANCHORED           0x00000010  /* Compile, exec, DFA exec */  
113  #define PCRE_DOLLAR_ENDONLY     0x00000020  /* Compile, used in exec, DFA exec */  Options that can be passed to pcre_compile() are tagged Cx below, with these
114  #define PCRE_EXTRA              0x00000040  /* Compile */  variants:
115  #define PCRE_NOTBOL             0x00000080  /* Exec, DFA exec */  
116  #define PCRE_NOTEOL             0x00000100  /* Exec, DFA exec */  C1   Affects compile only
117  #define PCRE_UNGREEDY           0x00000200  /* Compile */  C2   Does not affect compile; affects exec, dfa_exec
118  #define PCRE_NOTEMPTY           0x00000400  /* Exec, DFA exec */  C3   Affects compile, exec, dfa_exec
119  /* The next three are all used in compile, exec and DFA exec */  C4   Affects compile, exec, dfa_exec, study
120  #define PCRE_UTF8               0x00000800  /* Same as PCRE_UTF16 and PCRE_UTF32 */  C5   Affects compile, exec, study
121  #define PCRE_UTF16              0x00000800  /* Same as PCRE_UTF8 and PCRE_UTF32 */  
122  #define PCRE_UTF32              0x00000800  /* Same as PCRE_UTF8 and PCRE_UTF16 */  Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
123  #define PCRE_NO_AUTO_CAPTURE    0x00001000  /* Compile */  E and D, respectively. They take precedence over C3, C4, and C5 settings passed
124  /* The next three are all used in compile, exec and DFA exec */  from pcre_compile(). Those that are compatible with JIT execution are flagged
125  #define PCRE_NO_UTF8_CHECK      0x00002000  /* Same as PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK */  with J. */
126  #define PCRE_NO_UTF16_CHECK     0x00002000  /* Same as PCRE_NO_UTF8_CHECK and PCRE_NO_UTF32_CHECK */  
127  #define PCRE_NO_UTF32_CHECK     0x00002000  /* Same as PCRE_NO_UTF8_CHECK and PCRE_NO_UTF16_CHECK */  #define PCRE_CASELESS           0x00000001  /* C1       */
128  #define PCRE_AUTO_CALLOUT       0x00004000  /* Compile */  #define PCRE_MULTILINE          0x00000002  /* C1       */
129  #define PCRE_PARTIAL_SOFT       0x00008000  /* Exec, DFA exec */  #define PCRE_DOTALL             0x00000004  /* C1       */
130  #define PCRE_PARTIAL            0x00008000  /* Backwards compatible synonym */  #define PCRE_EXTENDED           0x00000008  /* C1       */
131  #define PCRE_DFA_SHORTEST       0x00010000  /* DFA exec */  #define PCRE_ANCHORED           0x00000010  /* C4 E D   */
132  #define PCRE_DFA_RESTART        0x00020000  /* DFA exec */  #define PCRE_DOLLAR_ENDONLY     0x00000020  /* C2       */
133  #define PCRE_FIRSTLINE          0x00040000  /* Compile, used in exec, DFA exec */  #define PCRE_EXTRA              0x00000040  /* C1       */
134  #define PCRE_DUPNAMES           0x00080000  /* Compile */  #define PCRE_NOTBOL             0x00000080  /*    E D J */
135  #define PCRE_NEWLINE_CR         0x00100000  /* Compile, exec, DFA exec */  #define PCRE_NOTEOL             0x00000100  /*    E D J */
136  #define PCRE_NEWLINE_LF         0x00200000  /* Compile, exec, DFA exec */  #define PCRE_UNGREEDY           0x00000200  /* C1       */
137  #define PCRE_NEWLINE_CRLF       0x00300000  /* Compile, exec, DFA exec */  #define PCRE_NOTEMPTY           0x00000400  /*    E D J */
138  #define PCRE_NEWLINE_ANY        0x00400000  /* Compile, exec, DFA exec */  #define PCRE_UTF8               0x00000800  /* C4        )          */
139  #define PCRE_NEWLINE_ANYCRLF    0x00500000  /* Compile, exec, DFA exec */  #define PCRE_UTF16              0x00000800  /* C4        ) Synonyms */
140  #define PCRE_BSR_ANYCRLF        0x00800000  /* Compile, exec, DFA exec */  #define PCRE_UTF32              0x00000800  /* C4        )          */
141  #define PCRE_BSR_UNICODE        0x01000000  /* Compile, exec, DFA exec */  #define PCRE_NO_AUTO_CAPTURE    0x00001000  /* C1       */
142  #define PCRE_JAVASCRIPT_COMPAT  0x02000000  /* Compile, used in exec */  #define PCRE_NO_UTF8_CHECK      0x00002000  /* C1 E D J  )          */
143  #define PCRE_NO_START_OPTIMIZE  0x04000000  /* Compile, exec, DFA exec */  #define PCRE_NO_UTF16_CHECK     0x00002000  /* C1 E D J  ) Synonyms */
144  #define PCRE_NO_START_OPTIMISE  0x04000000  /* Synonym */  #define PCRE_NO_UTF32_CHECK     0x00002000  /* C1 E D J  )          */
145  #define PCRE_PARTIAL_HARD       0x08000000  /* Exec, DFA exec */  #define PCRE_AUTO_CALLOUT       0x00004000  /* C1       */
146  #define PCRE_NOTEMPTY_ATSTART   0x10000000  /* Exec, DFA exec */  #define PCRE_PARTIAL_SOFT       0x00008000  /*    E D J  ) Synonyms */
147  #define PCRE_UCP                0x20000000  /* Compile, used in exec, DFA exec */  #define PCRE_PARTIAL            0x00008000  /*    E D J  )          */
148    
149    /* This pair use the same bit. */
150    #define PCRE_NEVER_UTF          0x00010000  /* C1        ) Overlaid */
151    #define PCRE_DFA_SHORTEST       0x00010000  /*      D    ) Overlaid */
152    
153    #define PCRE_DFA_RESTART        0x00020000  /*      D   */
154    #define PCRE_FIRSTLINE          0x00040000  /* C3       */
155    #define PCRE_DUPNAMES           0x00080000  /* C1       */
156    #define PCRE_NEWLINE_CR         0x00100000  /* C3 E D   */
157    #define PCRE_NEWLINE_LF         0x00200000  /* C3 E D   */
158    #define PCRE_NEWLINE_CRLF       0x00300000  /* C3 E D   */
159    #define PCRE_NEWLINE_ANY        0x00400000  /* C3 E D   */
160    #define PCRE_NEWLINE_ANYCRLF    0x00500000  /* C3 E D   */
161    #define PCRE_BSR_ANYCRLF        0x00800000  /* C3 E D   */
162    #define PCRE_BSR_UNICODE        0x01000000  /* C3 E D   */
163    #define PCRE_JAVASCRIPT_COMPAT  0x02000000  /* C5       */
164    #define PCRE_NO_START_OPTIMIZE  0x04000000  /* C2 E D    ) Synonyms */
165    #define PCRE_NO_START_OPTIMISE  0x04000000  /* C2 E D    )          */
166    #define PCRE_PARTIAL_HARD       0x08000000  /*    E D J */
167    #define PCRE_NOTEMPTY_ATSTART   0x10000000  /*    E D J */
168    #define PCRE_UCP                0x20000000  /* C3       */
169    
170  /* Exec-time and get/set-time error codes */  /* Exec-time and get/set-time error codes */
171    
# Line 184  compiling). */ Line 205  compiling). */
205  #define PCRE_ERROR_BADENDIANNESS   (-29)  #define PCRE_ERROR_BADENDIANNESS   (-29)
206  #define PCRE_ERROR_DFA_BADRESTART  (-30)  #define PCRE_ERROR_DFA_BADRESTART  (-30)
207  #define PCRE_ERROR_JIT_BADOPTION   (-31)  #define PCRE_ERROR_JIT_BADOPTION   (-31)
208    #define PCRE_ERROR_BADLENGTH       (-32)
209    
210  /* Specific error codes for UTF-8 validity checks */  /* Specific error codes for UTF-8 validity checks */
211    
# Line 209  compiling). */ Line 231  compiling). */
231  #define PCRE_UTF8_ERR19             19  #define PCRE_UTF8_ERR19             19
232  #define PCRE_UTF8_ERR20             20  #define PCRE_UTF8_ERR20             20
233  #define PCRE_UTF8_ERR21             21  #define PCRE_UTF8_ERR21             21
234  #define PCRE_UTF8_ERR22             22  #define PCRE_UTF8_ERR22             22  /* Unused (was non-character) */
235    
236  /* Specific error codes for UTF-16 validity checks */  /* Specific error codes for UTF-16 validity checks */
237    
# Line 217  compiling). */ Line 239  compiling). */
239  #define PCRE_UTF16_ERR1              1  #define PCRE_UTF16_ERR1              1
240  #define PCRE_UTF16_ERR2              2  #define PCRE_UTF16_ERR2              2
241  #define PCRE_UTF16_ERR3              3  #define PCRE_UTF16_ERR3              3
242  #define PCRE_UTF16_ERR4              4  #define PCRE_UTF16_ERR4              4  /* Unused (was non-character) */
243    
244  /* Specific error codes for UTF-32 validity checks */  /* Specific error codes for UTF-32 validity checks */
245    
246  #define PCRE_UTF32_ERR0              0  #define PCRE_UTF32_ERR0              0
247  #define PCRE_UTF32_ERR1              1  #define PCRE_UTF32_ERR1              1
248  #define PCRE_UTF32_ERR2              2  #define PCRE_UTF32_ERR2              2  /* Unused (was non-character) */
249  #define PCRE_UTF32_ERR3              3  #define PCRE_UTF32_ERR3              3
250    
251  /* Request types for pcre_fullinfo() */  /* Request types for pcre_fullinfo() */

Legend:
Removed from v.1187  
changed lines
  Added in v.1309

  ViewVC Help
Powered by ViewVC 1.1.5