/[pcre]/code/trunk/pcre_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_compile.c

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

revision 1761 by ph10, Mon Feb 10 17:17:34 2020 UTC revision 1762 by ph10, Tue Feb 11 18:13:46 2020 UTC
# Line 68  COMPILE_PCREx macro will already be appr Line 68  COMPILE_PCREx macro will already be appr
68    
69  /* Macro for setting individual bits in class bitmaps. */  /* Macro for setting individual bits in class bitmaps. */
70    
71  #define SETBIT(a,b) a[(b)/8] |= (1 << ((b)&7))  #define SETBIT(a,b) a[(b)/8] |= (1U << ((b)&7))
72    
73  /* Maximum length value to check against when making sure that the integer that  /* Maximum length value to check against when making sure that the integer that
74  holds the compiled pattern length does not overflow. We make it a bit less than  holds the compiled pattern length does not overflow. We make it a bit less than
# Line 129  overrun before it actually does run off Line 129  overrun before it actually does run off
129    
130  /* Private flags added to firstchar and reqchar. */  /* Private flags added to firstchar and reqchar. */
131    
132  #define REQ_CASELESS    (1 << 0)        /* Indicates caselessness */  #define REQ_CASELESS    (1U << 0)        /* Indicates caselessness */
133  #define REQ_VARY        (1 << 1)        /* Reqchar followed non-literal item */  #define REQ_VARY        (1U << 1)        /* Reqchar followed non-literal item */
134  /* Negative values for the firstchar and reqchar flags */  /* Negative values for the firstchar and reqchar flags */
135  #define REQ_UNSET       (-2)  #define REQ_UNSET       (-2)
136  #define REQ_NONE        (-1)  #define REQ_NONE        (-1)
# Line 3611  for(;;) Line 3611  for(;;)
3611        if (chr > 255) break;        if (chr > 255) break;
3612        class_bitset = (pcre_uint8 *)        class_bitset = (pcre_uint8 *)
3613          ((list_ptr == list ? code : base_end) - list_ptr[2]);          ((list_ptr == list ? code : base_end) - list_ptr[2]);
3614        if ((class_bitset[chr >> 3] & (1 << (chr & 7))) != 0) return FALSE;        if ((class_bitset[chr >> 3] & (1U << (chr & 7))) != 0) return FALSE;
3615        break;        break;
3616    
3617  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8
# Line 7458  for (;; ptr++) Line 7458  for (;; ptr++)
7458                {                {
7459                open_capitem *oc;                open_capitem *oc;
7460                recno = GET2(slot, 0);                recno = GET2(slot, 0);
7461                cd->backref_map |= (recno < 32)? (1 << recno) : 1;                cd->backref_map |= (recno < 32)? (1U << recno) : 1;
7462                if (recno > cd->top_backref) cd->top_backref = recno;                if (recno > cd->top_backref) cd->top_backref = recno;
7463    
7464                /* Check to see if this back reference is recursive, that it, it                /* Check to see if this back reference is recursive, that it, it
# Line 8069  for (;; ptr++) Line 8069  for (;; ptr++)
8069          item_hwm_offset = cd->hwm - cd->start_workspace;          item_hwm_offset = cd->hwm - cd->start_workspace;
8070          *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;          *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
8071          PUT2INC(code, 0, recno);          PUT2INC(code, 0, recno);
8072          cd->backref_map |= (recno < 32)? (1 << recno) : 1;          cd->backref_map |= (recno < 32)? (1U << recno) : 1;
8073          if (recno > cd->top_backref) cd->top_backref = recno;          if (recno > cd->top_backref) cd->top_backref = recno;
8074    
8075          /* Check to see if this back reference is recursive, that it, it          /* Check to see if this back reference is recursive, that it, it
# Line 8682  do { Line 8682  do {
8682              op == OP_SCBRA || op == OP_SCBRAPOS)              op == OP_SCBRA || op == OP_SCBRAPOS)
8683       {       {
8684       int n = GET2(scode, 1+LINK_SIZE);       int n = GET2(scode, 1+LINK_SIZE);
8685       int new_map = bracket_map | ((n < 32)? (1 << n) : 1);       int new_map = bracket_map | ((n < 32)? (1U << n) : 1);
8686       if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;       if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
8687       }       }
8688    
# Line 8810  do { Line 8810  do {
8810              op == OP_SCBRA || op == OP_SCBRAPOS)              op == OP_SCBRA || op == OP_SCBRAPOS)
8811       {       {
8812       int n = GET2(scode, 1+LINK_SIZE);       int n = GET2(scode, 1+LINK_SIZE);
8813       int new_map = bracket_map | ((n < 32)? (1 << n) : 1);       int new_map = bracket_map | ((n < 32)? (1U << n) : 1);
8814       if (!is_startline(scode, new_map, cd, atomcount, inassert)) return FALSE;       if (!is_startline(scode, new_map, cd, atomcount, inassert)) return FALSE;
8815       }       }
8816    

Legend:
Removed from v.1761  
changed lines
  Added in v.1762

  ViewVC Help
Powered by ViewVC 1.1.5