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

Diff of /code/trunk/pcre_internal.h

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

revision 145 by ph10, Wed Apr 4 14:06:52 2007 UTC revision 149 by ph10, Mon Apr 16 15:28:08 2007 UTC
# Line 174  characters only go up to 0x7fffffff (tho Line 174  characters only go up to 0x7fffffff (tho
174  #define NOTACHAR 0xffffffff  #define NOTACHAR 0xffffffff
175    
176  /* PCRE is able to support several different kinds of newline (CR, LF, CRLF,  /* PCRE is able to support several different kinds of newline (CR, LF, CRLF,
177  and "all" at present). The following macros are used to package up testing for  "any" and "anycrlf" at present). The following macros are used to package up
178  newlines. NLBLOCK, PSSTART, and PSEND are defined in the various modules to  testing for newlines. NLBLOCK, PSSTART, and PSEND are defined in the various
179  indicate in which datablock the parameters exist, and what the start/end of  modules to indicate in which datablock the parameters exist, and what the
180  string field names are. */  start/end of string field names are. */
181    
182  #define NLTYPE_FIXED   0     /* Newline is a fixed length string */  #define NLTYPE_FIXED    0     /* Newline is a fixed length string */
183  #define NLTYPE_ANY     1     /* Newline is any Unicode line ending */  #define NLTYPE_ANY      1     /* Newline is any Unicode line ending */
184    #define NLTYPE_ANYCRLF  2     /* Newline is CR, LF, or CRLF */
185    
186  /* This macro checks for a newline at the given position */  /* This macro checks for a newline at the given position */
187    
188  #define IS_NEWLINE(p) \  #define IS_NEWLINE(p) \
189    ((NLBLOCK->nltype != NLTYPE_FIXED)? \    ((NLBLOCK->nltype != NLTYPE_FIXED)? \
190      ((p) < NLBLOCK->PSEND && \      ((p) < NLBLOCK->PSEND && \
191       _pcre_is_newline((p), NLBLOCK->PSEND, &(NLBLOCK->nllen), utf8) \       _pcre_is_newline((p), NLBLOCK->nltype, NLBLOCK->PSEND, &(NLBLOCK->nllen),\
192      ) \         utf8)) \
193      : \      : \
194      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
195       (p)[0] == NLBLOCK->nl[0] && \       (p)[0] == NLBLOCK->nl[0] && \
# Line 201  string field names are. */ Line 202  string field names are. */
202  #define WAS_NEWLINE(p) \  #define WAS_NEWLINE(p) \
203    ((NLBLOCK->nltype != NLTYPE_FIXED)? \    ((NLBLOCK->nltype != NLTYPE_FIXED)? \
204      ((p) > NLBLOCK->PSSTART && \      ((p) > NLBLOCK->PSSTART && \
205       _pcre_was_newline((p), NLBLOCK->PSSTART, &(NLBLOCK->nllen), utf8) \       _pcre_was_newline((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
206      ) \         &(NLBLOCK->nllen), utf8)) \
207      : \      : \
208      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
209       (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \       (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \
# Line 500  bits. */ Line 501  bits. */
501  /* Masks for identifying the public options that are permitted at compile  /* Masks for identifying the public options that are permitted at compile
502  time, run time, or study time, respectively. */  time, run time, or study time, respectively. */
503    
504  #define PCRE_NEWLINE_BITS (PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_ANY)  #define PCRE_NEWLINE_BITS (PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_ANY| \
505                               PCRE_NEWLINE_ANYCRLF)
506    
507  #define PUBLIC_OPTIONS \  #define PUBLIC_OPTIONS \
508    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
# Line 1087  extern const uschar _pcre_OP_lengths[]; Line 1089  extern const uschar _pcre_OP_lengths[];
1089  one of the exported public functions. They have to be "external" in the C  one of the exported public functions. They have to be "external" in the C
1090  sense, but are not part of the PCRE public API. */  sense, but are not part of the PCRE public API. */
1091    
1092  extern BOOL         _pcre_is_newline(const uschar *, const uschar *, int *,  extern BOOL         _pcre_is_newline(const uschar *, int, const uschar *,
1093                        BOOL);                        int *, BOOL);
1094  extern int          _pcre_ord2utf8(int, uschar *);  extern int          _pcre_ord2utf8(int, uschar *);
1095  extern real_pcre   *_pcre_try_flipped(const real_pcre *, real_pcre *,  extern real_pcre   *_pcre_try_flipped(const real_pcre *, real_pcre *,
1096                        const pcre_study_data *, pcre_study_data *);                        const pcre_study_data *, pcre_study_data *);
1097  extern int          _pcre_ucp_findprop(const unsigned int, int *, int *);  extern int          _pcre_ucp_findprop(const unsigned int, int *, int *);
1098  extern unsigned int _pcre_ucp_othercase(const unsigned int);  extern unsigned int _pcre_ucp_othercase(const unsigned int);
1099  extern int          _pcre_valid_utf8(const uschar *, int);  extern int          _pcre_valid_utf8(const uschar *, int);
1100  extern BOOL         _pcre_was_newline(const uschar *, const uschar *, int *,  extern BOOL         _pcre_was_newline(const uschar *, int, const uschar *,
1101                        BOOL);                        int *, BOOL);
1102  extern BOOL         _pcre_xclass(int, const uschar *);  extern BOOL         _pcre_xclass(int, const uschar *);
1103    
1104  #endif  #endif

Legend:
Removed from v.145  
changed lines
  Added in v.149

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12