/[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 230 by ph10, Mon Sep 10 13:23:56 2007 UTC revision 298 by ph10, Thu Jan 10 17:09:12 2008 UTC
# Line 363  never be called in byte mode. To make su Line 363  never be called in byte mode. To make su
363  support is omitted, we don't even define it. */  support is omitted, we don't even define it. */
364    
365  #ifndef SUPPORT_UTF8  #ifndef SUPPORT_UTF8
366    #define NEXTCHAR(p) p++;
367  #define GETCHAR(c, eptr) c = *eptr;  #define GETCHAR(c, eptr) c = *eptr;
368  #define GETCHARTEST(c, eptr) c = *eptr;  #define GETCHARTEST(c, eptr) c = *eptr;
369  #define GETCHARINC(c, eptr) c = *eptr++;  #define GETCHARINC(c, eptr) c = *eptr++;
# Line 372  support is omitted, we don't even define Line 373  support is omitted, we don't even define
373    
374  #else   /* SUPPORT_UTF8 */  #else   /* SUPPORT_UTF8 */
375    
376    /* Advance a character pointer one byte in non-UTF-8 mode and by one character
377    in UTF-8 mode. */
378    
379    #define NEXTCHAR(p) \
380      p++; \
381      if (utf8) { while((*p & 0xc0) == 0x80) p++; }
382    
383  /* Get the next UTF-8 character, not advancing the pointer. This is called when  /* Get the next UTF-8 character, not advancing the pointer. This is called when
384  we know we are in UTF-8 mode. */  we know we are in UTF-8 mode. */
385    
# Line 481  Standard C system should have one. */ Line 489  Standard C system should have one. */
489    
490  #define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)  #define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
491    
492  /* Private flags containing information about the compiled regex. They used to  /* Private flags containing information about the compiled regex. They used to
493  live at the top end of the options word, but that got almost full, so now they  live at the top end of the options word, but that got almost full, so now they
494  are in a 16-bit flags word. */  are in a 16-bit flags word. */
495    
496  #define PCRE_NOPARTIAL     0x0001  /* can't use partial with this regex */  #define PCRE_NOPARTIAL     0x0001  /* can't use partial with this regex */
# Line 506  time, run time, or study time, respectiv Line 514  time, run time, or study time, respectiv
514    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
515     PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \     PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
516     PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \     PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
517     PCRE_DUPNAMES|PCRE_NEWLINE_BITS)     PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
518    
519  #define PUBLIC_EXEC_OPTIONS \  #define PUBLIC_EXEC_OPTIONS \
520    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
521     PCRE_PARTIAL|PCRE_NEWLINE_BITS)     PCRE_PARTIAL|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
522    
523  #define PUBLIC_DFA_EXEC_OPTIONS \  #define PUBLIC_DFA_EXEC_OPTIONS \
524    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
525     PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART|PCRE_NEWLINE_BITS)     PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART|PCRE_NEWLINE_BITS| \
526       PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
527    
528  #define PUBLIC_STUDY_OPTIONS 0   /* None defined */  #define PUBLIC_STUDY_OPTIONS 0   /* None defined */
529    
# Line 870  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4, Line 879  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,
879         ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,         ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
880         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
881         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
882         ERR60, ERR61 };         ERR60, ERR61, ERR62, ERR63 };
883    
884  /* The real format of the start of the pcre block; the index of names and the  /* The real format of the start of the pcre block; the index of names and the
885  code vector run on as long as necessary after the end. We store an explicit  code vector run on as long as necessary after the end. We store an explicit
# Line 933  typedef struct compile_data { Line 942  typedef struct compile_data {
942    uschar *name_table;           /* The name/number table */    uschar *name_table;           /* The name/number table */
943    int  names_found;             /* Number of entries so far */    int  names_found;             /* Number of entries so far */
944    int  name_entry_size;         /* Size of each entry */    int  name_entry_size;         /* Size of each entry */
945    int  bracount;                /* Count of capturing parens */    int  bracount;                /* Count of capturing parens as we compile */
946      int  final_bracount;          /* Saved value after first pass */
947    int  top_backref;             /* Maximum back reference */    int  top_backref;             /* Maximum back reference */
948    unsigned int backref_map;     /* Bitmap of low back refs */    unsigned int backref_map;     /* Bitmap of low back refs */
949    int  external_options;        /* External (initial) options */    int  external_options;        /* External (initial) options */
950    int  external_flags;          /* External flag bits to be set */    int  external_flags;          /* External flag bits to be set */
951    int  req_varyopt;             /* "After variable item" flag for reqbyte */    int  req_varyopt;             /* "After variable item" flag for reqbyte */
952    BOOL had_accept;              /* (*ACCEPT) encountered */    BOOL had_accept;              /* (*ACCEPT) encountered */
953    int  nltype;                  /* Newline type */    int  nltype;                  /* Newline type */
# Line 998  typedef struct match_data { Line 1008  typedef struct match_data {
1008    BOOL   notempty;              /* Empty string match not wanted */    BOOL   notempty;              /* Empty string match not wanted */
1009    BOOL   partial;               /* PARTIAL flag */    BOOL   partial;               /* PARTIAL flag */
1010    BOOL   hitend;                /* Hit the end of the subject at some point */    BOOL   hitend;                /* Hit the end of the subject at some point */
1011      BOOL   bsr_anycrlf;           /* \R is just any CRLF, not full Unicode */
1012    const uschar *start_code;     /* For use when recursing */    const uschar *start_code;     /* For use when recursing */
1013    USPTR  start_subject;         /* Start of the subject string */    USPTR  start_subject;         /* Start of the subject string */
1014    USPTR  end_subject;           /* End of the subject string */    USPTR  end_subject;           /* End of the subject string */
# Line 1034  typedef struct dfa_match_data { Line 1045  typedef struct dfa_match_data {
1045  #define ctype_letter  0x02  #define ctype_letter  0x02
1046  #define ctype_digit   0x04  #define ctype_digit   0x04
1047  #define ctype_xdigit  0x08  #define ctype_xdigit  0x08
1048  #define ctype_word    0x10   /* alphameric or '_' */  #define ctype_word    0x10   /* alphanumeric or '_' */
1049  #define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */  #define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */
1050    
1051  /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set  /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
# Line 1062  total length. */ Line 1073  total length. */
1073  #define tables_length (ctypes_offset + 256)  #define tables_length (ctypes_offset + 256)
1074    
1075  /* Layout of the UCP type table that translates property names into types and  /* Layout of the UCP type table that translates property names into types and
1076  codes. */  codes. Each entry used to point directly to a name, but to reduce the number of
1077    relocations in shared libraries, it now has an offset into a single string
1078    instead. */
1079    
1080  typedef struct {  typedef struct {
1081    const char *name;    pcre_uint16 name_offset;
1082    pcre_uint16 type;    pcre_uint16 type;
1083    pcre_uint16 value;    pcre_uint16 value;
1084  } ucp_type_table;  } ucp_type_table;
# Line 1083  extern const uschar _pcre_utf8_table4[]; Line 1096  extern const uschar _pcre_utf8_table4[];
1096    
1097  extern const int    _pcre_utf8_table1_size;  extern const int    _pcre_utf8_table1_size;
1098    
1099    extern const char   _pcre_utt_names[];
1100  extern const ucp_type_table _pcre_utt[];  extern const ucp_type_table _pcre_utt[];
1101  extern const int _pcre_utt_size;  extern const int _pcre_utt_size;
1102    

Legend:
Removed from v.230  
changed lines
  Added in v.298

  ViewVC Help
Powered by ViewVC 1.1.5