/[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 1100 by chpe, Tue Oct 16 15:56:26 2012 UTC revision 1145 by ph10, Fri Oct 19 16:25:32 2012 UTC
# Line 53  depending on the PRIV macro. */ Line 53  depending on the PRIV macro. */
53  #endif  #endif
54    
55  /* PCRE is compiled as an 8 bit library if it is not requested otherwise. */  /* PCRE is compiled as an 8 bit library if it is not requested otherwise. */
56  #if !defined COMPILE_PCRE16 && ! defined COMPILE_PCRE32  
57    #if !defined COMPILE_PCRE16 && !defined COMPILE_PCRE32
58  #define COMPILE_PCRE8  #define COMPILE_PCRE8
59  #endif  #endif
60    
# Line 522  capturing parenthesis numbers in back re Line 523  capturing parenthesis numbers in back re
523  #define PUT2(a,n,d)   \  #define PUT2(a,n,d)   \
524    a[n] = (d) >> 8; \    a[n] = (d) >> 8; \
525    a[(n)+1] = (d) & 255    a[(n)+1] = (d) & 255
526    
527    /* For reasons that I do not understand, the expression in this GET2 macro is
528    treated by gcc as a signed expression, even when a is declared as unsigned. It
529    seems that any kind of arithmetic results in a signed value. */
530    
531  #define GET2(a,n) \  #define GET2(a,n) \
532    (((a)[n] << 8) | (a)[(n)+1])    (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
533    
534  #elif defined COMPILE_PCRE16  #elif defined COMPILE_PCRE16
535    
# Line 914  code. */ Line 919  code. */
919    
920  #elif defined COMPILE_PCRE32  #elif defined COMPILE_PCRE32
921    
922  /* These are unnecessary for the 32-bit library */  /* These are trivial for the 32-bit library, since all UTF-32 characters fit
923  #undef MAX_VALUE_FOR_SINGLE_CHAR  into one pcre_uchar unit. */
924  #undef HAS_EXTRALEN  #define MAX_VALUE_FOR_SINGLE_CHAR (0x10ffffu)
925  #undef GET_EXTRALEN  #define HAS_EXTRALEN(c) (0)
926  #undef NOT_FIRSTCHAR  #define GET_EXTRALEN(c) (0)
927    #define NOT_FIRSTCHAR(c) (0)
928    
929  #define UTF32_MASK (0x1ffffful)  #define UTF32_MASK (0x1fffffu)
930    
931  /* Get the next UTF-32 character, not advancing the pointer. This is called when  /* Get the next UTF-32 character, not advancing the pointer. This is called when
932  we know we are in UTF-32 mode. */  we know we are in UTF-32 mode. */
# Line 989  pointer. */ Line 995  pointer. */
995  /* 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
996  it is. This is called only in UTF-32 mode - we don't put a test within the  it is. This is called only in UTF-32 mode - we don't put a test within the
997  macro because almost all calls are already within a block of UTF-32 only  macro because almost all calls are already within a block of UTF-32 only
998  code. */  code.
999    These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */
1000    
1001  #define BACKCHAR(eptr) do { } while (0)  #define BACKCHAR(eptr) do { } while (0)
1002    
# Line 2391  typedef struct compile_data { Line 2398  typedef struct compile_data {
2398    int  names_found;                 /* Number of entries so far */    int  names_found;                 /* Number of entries so far */
2399    int  name_entry_size;             /* Size of each entry */    int  name_entry_size;             /* Size of each entry */
2400    int  workspace_size;              /* Size of workspace */    int  workspace_size;              /* Size of workspace */
2401    int  bracount;                    /* Count of capturing parens as we compile */    unsigned int  bracount;           /* Count of capturing parens as we compile */
2402    int  final_bracount;              /* Saved value after first pass */    int  final_bracount;              /* Saved value after first pass */
2403    int  max_lookbehind;              /* Maximum lookbehind (characters) */    int  max_lookbehind;              /* Maximum lookbehind (characters) */
2404    int  top_backref;                 /* Maximum back reference */    int  top_backref;                 /* Maximum back reference */
# Line 2421  call within the pattern; used by pcre_ex Line 2428  call within the pattern; used by pcre_ex
2428    
2429  typedef struct recursion_info {  typedef struct recursion_info {
2430    struct recursion_info *prevrec; /* Previous recursion record (or NULL) */    struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
2431    int group_num;                  /* Number of group that was called */    unsigned int group_num;         /* Number of group that was called */
2432    int *offset_save;               /* Pointer to start of saved offsets */    int *offset_save;               /* Pointer to start of saved offsets */
2433    int saved_max;                  /* Number of saved offsets */    int saved_max;                  /* Number of saved offsets */
2434    PCRE_PUCHAR subject_position;   /* Position at start of recursion */    PCRE_PUCHAR subject_position;   /* Position at start of recursion */
# Line 2679  extern int               PRIV(strcmp_uc_ Line 2686  extern int               PRIV(strcmp_uc_
2686  extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);  extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
2687  extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,  extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
2688                             int *, BOOL);                             int *, BOOL);
2689  extern int               PRIV(ord2utf)(pcre_uint32, pcre_uchar *);  extern unsigned int      PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
2690  extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);  extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
2691  extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,  extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
2692                             int *, BOOL);                             int *, BOOL);
# Line 2709  extern const pcre_uint32 PRIV(ucd_casele Line 2716  extern const pcre_uint32 PRIV(ucd_casele
2716  extern const ucd_record  PRIV(ucd_records)[];  extern const ucd_record  PRIV(ucd_records)[];
2717  extern const pcre_uint8  PRIV(ucd_stage1)[];  extern const pcre_uint8  PRIV(ucd_stage1)[];
2718  extern const pcre_uint16 PRIV(ucd_stage2)[];  extern const pcre_uint16 PRIV(ucd_stage2)[];
2719  extern const int         PRIV(ucp_gentype)[];  extern const pcre_uint32 PRIV(ucp_gentype)[];
2720  extern const pcre_uint32 PRIV(ucp_gbtable)[];  extern const pcre_uint32 PRIV(ucp_gbtable)[];
2721  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT
2722  extern const int         PRIV(ucp_typerange)[];  extern const int         PRIV(ucp_typerange)[];

Legend:
Removed from v.1100  
changed lines
  Added in v.1145

  ViewVC Help
Powered by ViewVC 1.1.5