/[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 1083 by chpe, Tue Oct 16 15:55:24 2012 UTC revision 1090 by chpe, Tue Oct 16 15:55:48 2012 UTC
# Line 586  we don't even define them. */ Line 586  we don't even define them. */
586    
587  #else   /* SUPPORT_UTF */  #else   /* SUPPORT_UTF */
588    
 #if defined COMPILE_PCRE8  
   
 /* These macros were originally written in the form of loops that used data  
 from the tables whose names start with PRIV(utf8_table). They were rewritten by  
 a user so as not to use loops, because in some environments this gives a  
 significant performance advantage, and it seems never to do any harm. */  
   
 /* Tells the biggest code point which can be encoded as a single character. */  
   
 #define MAX_VALUE_FOR_SINGLE_CHAR 127  
   
589  /* Tests whether the code point needs extra characters to decode. */  /* Tests whether the code point needs extra characters to decode. */
590    
591  #define HAS_EXTRALEN(c) ((c) >= 0xc0)  #define HASUTF8EXTRALEN(c) ((c) >= 0xc0)
   
 /* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.  
 Otherwise it has an undefined behaviour. */  
   
 #define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])  
   
 /* Returns TRUE, if the given character is not the first character  
 of a UTF sequence. */  
   
 #define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)  
592    
593  /* 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
594  advancing the pointer. */  advancing the pointer. */
# Line 633  advancing the pointer. */ Line 612  advancing the pointer. */
612            ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \            ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \
613      }      }
614    
 /* Get the next UTF-8 character, not advancing the pointer. This is called when  
 we know we are in UTF-8 mode. */  
   
 #define GETCHAR(c, eptr) \  
   c = *eptr; \  
   if (c >= 0xc0) GETUTF8(c, eptr);  
   
 /* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the  
 pointer. */  
   
 #define GETCHARTEST(c, eptr) \  
   c = *eptr; \  
   if (utf && c >= 0xc0) GETUTF8(c, eptr);  
   
615  /* 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
616  the pointer. */  the pointer. */
617    
# Line 681  the pointer. */ Line 646  the pointer. */
646        } \        } \
647      }      }
648    
649    #if defined COMPILE_PCRE8
650    
651    /* These macros were originally written in the form of loops that used data
652    from the tables whose names start with PRIV(utf8_table). They were rewritten by
653    a user so as not to use loops, because in some environments this gives a
654    significant performance advantage, and it seems never to do any harm. */
655    
656    /* Tells the biggest code point which can be encoded as a single character. */
657    
658    #define MAX_VALUE_FOR_SINGLE_CHAR 127
659    
660    /* Tests whether the code point needs extra characters to decode. */
661    
662    #define HAS_EXTRALEN(c) ((c) >= 0xc0)
663    
664    /* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
665    Otherwise it has an undefined behaviour. */
666    
667    #define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])
668    
669    /* Returns TRUE, if the given character is not the first character
670    of a UTF sequence. */
671    
672    #define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)
673    
674    /* Get the next UTF-8 character, not advancing the pointer. This is called when
675    we know we are in UTF-8 mode. */
676    
677    #define GETCHAR(c, eptr) \
678      c = *eptr; \
679      if (c >= 0xc0) GETUTF8(c, eptr);
680    
681    /* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the
682    pointer. */
683    
684    #define GETCHARTEST(c, eptr) \
685      c = *eptr; \
686      if (utf && c >= 0xc0) GETUTF8(c, eptr);
687    
688  /* Get the next UTF-8 character, advancing the pointer. This is called when we  /* Get the next UTF-8 character, advancing the pointer. This is called when we
689  know we are in UTF-8 mode. */  know we are in UTF-8 mode. */
690    

Legend:
Removed from v.1083  
changed lines
  Added in v.1090

  ViewVC Help
Powered by ViewVC 1.1.5