/[pcre]/code/branches/pcre16/pcre_internal.h
ViewVC logotype

Diff of /code/branches/pcre16/pcre_internal.h

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

revision 774 by zherczeg, Thu Dec 1 06:08:45 2011 UTC revision 781 by zherczeg, Sat Dec 3 07:58:30 2011 UTC
# Line 292  start/end of string field names are. */ Line 292  start/end of string field names are. */
292  #define IS_NEWLINE(p) \  #define IS_NEWLINE(p) \
293    ((NLBLOCK->nltype != NLTYPE_FIXED)? \    ((NLBLOCK->nltype != NLTYPE_FIXED)? \
294      ((p) < NLBLOCK->PSEND && \      ((p) < NLBLOCK->PSEND && \
295       PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, &(NLBLOCK->nllen),\       PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, \
296         utf8)) \         &(NLBLOCK->nllen), utf)) \
297      : \      : \
298      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
299       (p)[0] == NLBLOCK->nl[0] && \       (p)[0] == NLBLOCK->nl[0] && \
# Line 307  start/end of string field names are. */ Line 307  start/end of string field names are. */
307    ((NLBLOCK->nltype != NLTYPE_FIXED)? \    ((NLBLOCK->nltype != NLTYPE_FIXED)? \
308      ((p) > NLBLOCK->PSSTART && \      ((p) > NLBLOCK->PSSTART && \
309       PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \       PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
310         &(NLBLOCK->nllen), utf8)) \         &(NLBLOCK->nllen), utf)) \
311      : \      : \
312      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
313       (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \       (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \
# Line 581  pointer. */ Line 581  pointer. */
581    
582  #define GETCHARTEST(c, eptr) \  #define GETCHARTEST(c, eptr) \
583    c = *eptr; \    c = *eptr; \
584    if (utf8 && c >= 0xc0) GETUTF8(c, eptr);    if (utf && c >= 0xc0) GETUTF8(c, eptr);
585    
586  /* Base macro to pick up the remaining bytes of a UTF-8 character, advancing  /* Base macro to pick up the remaining bytes of a UTF-8 character, advancing
587  the pointer. */  the pointer. */
# Line 629  This is called when we don't know if we Line 629  This is called when we don't know if we
629    
630  #define GETCHARINCTEST(c, eptr) \  #define GETCHARINCTEST(c, eptr) \
631    c = *eptr++; \    c = *eptr++; \
632    if (utf8 && c >= 0xc0) GETUTF8INC(c, eptr);    if (utf && c >= 0xc0) GETUTF8INC(c, eptr);
633    
634  /* Base macro to pick up the remaining bytes of a UTF-8 character, not  /* Base macro to pick up the remaining bytes of a UTF-8 character, not
635  advancing the pointer, incrementing the length. */  advancing the pointer, incrementing the length. */
# Line 681  do not know if we are in UTF-8 mode. */ Line 681  do not know if we are in UTF-8 mode. */
681    
682  #define GETCHARLENTEST(c, eptr, len) \  #define GETCHARLENTEST(c, eptr, len) \
683    c = *eptr; \    c = *eptr; \
684    if (utf8 && c >= 0xc0) GETUTF8LEN(c, eptr, len);    if (utf && c >= 0xc0) GETUTF8LEN(c, eptr, len);
685    
686  /* If the pointer is not at the start of a character, move it back until  /* If the pointer is not at the start of a character, move it back until
687  it is. This is called only in UTF-8 mode - we don't put a test within the macro  it is. This is called only in UTF-8 mode - we don't put a test within the macro
# Line 1366  value such as \n. They must have non-zer Line 1366  value such as \n. They must have non-zer
1366  their negation. Also, they must appear in the same order as in the opcode  their negation. Also, they must appear in the same order as in the opcode
1367  definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it  definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it
1368  corresponds to "." in DOTALL mode rather than an escape sequence. It is also  corresponds to "." in DOTALL mode rather than an escape sequence. It is also
1369  used for [^] in JavaScript compatibility mode, and for \C in non-utf8 mode. In  used for [^] in JavaScript compatibility mode, and for \C in non-utf mode. In
1370  non-DOTALL mode, "." behaves like \N.  non-DOTALL mode, "." behaves like \N.
1371    
1372  The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc.  The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc.
# Line 1784  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4, Line 1784  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,
1784         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
1785         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
1786         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
1787         ERR70, ERRCOUNT };         ERR70, ERR71, ERRCOUNT };
1788    
1789  /* 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
1790  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 1934  typedef struct match_data { Line 1934  typedef struct match_data {
1934    BOOL   offset_overflow;         /* Set if too many extractions */    BOOL   offset_overflow;         /* Set if too many extractions */
1935    BOOL   notbol;                  /* NOTBOL flag */    BOOL   notbol;                  /* NOTBOL flag */
1936    BOOL   noteol;                  /* NOTEOL flag */    BOOL   noteol;                  /* NOTEOL flag */
1937    BOOL   utf8;                    /* UTF8 flag */    BOOL   utf;                     /* UTF-8 / UTF-16 flag */
1938    BOOL   jscript_compat;          /* JAVASCRIPT_COMPAT flag */    BOOL   jscript_compat;          /* JAVASCRIPT_COMPAT flag */
1939    BOOL   use_ucp;                 /* PCRE_UCP flag */    BOOL   use_ucp;                 /* PCRE_UCP flag */
1940    BOOL   endonly;                 /* Dollar not before final \n */    BOOL   endonly;                 /* Dollar not before final \n */
# Line 2103  extern unsigned int      PRIV(strlen_uc) Line 2103  extern unsigned int      PRIV(strlen_uc)
2103  extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);  extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
2104  extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,  extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
2105                             int *, BOOL);                             int *, BOOL);
2106  extern int               PRIV(ord2utf8)(int, pcre_uint8 *);  extern int               PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
2107  extern real_pcre        *PRIV(try_flipped)(const real_pcre *, real_pcre *,  extern real_pcre        *PRIV(try_flipped)(const real_pcre *, real_pcre *,
2108                             const pcre_study_data *, pcre_study_data *);                             const pcre_study_data *, pcre_study_data *);
2109  #ifndef COMPILE_PCRE16  extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
 extern int               PRIV(valid_utf8)(PCRE_PUCHAR, int, int *);  
 #else  
 extern int               PRIV(valid_utf16)(PCRE_PUCHAR, int, int *);  
 #endif  
2110  extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,  extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
2111                             int *, BOOL);                             int *, BOOL);
2112  extern BOOL              PRIV(xclass)(int, const pcre_uchar *);  extern BOOL              PRIV(xclass)(int, const pcre_uchar *);

Legend:
Removed from v.774  
changed lines
  Added in v.781

  ViewVC Help
Powered by ViewVC 1.1.5