/[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 1078 by chpe, Tue Oct 16 15:55:00 2012 UTC revision 1083 by chpe, Tue Oct 16 15:55:24 2012 UTC
# Line 864  code. */ Line 864  code. */
864  #undef GET_EXTRALEN  #undef GET_EXTRALEN
865  #undef NOT_FIRSTCHAR  #undef NOT_FIRSTCHAR
866    
867    #define UTF32_MASK (0x1ffffful)
868    
869  /* 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
870  we know we are in UTF-32 mode. */  we know we are in UTF-32 mode. */
871    
872  #define GETCHAR(c, eptr) \  #define GETCHAR(c, eptr) \
873    c = *eptr;    c = (*eptr) & UTF32_MASK;
874    
875  /* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the  /* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the
876  pointer. */  pointer. */
877    
878  #define GETCHARTEST(c, eptr) \  #define GETCHARTEST(c, eptr) \
879    c = *eptr;    c = *eptr; \
880      if (utf) c &= UTF32_MASK;
881    
882  /* Get the next UTF-32 character, advancing the pointer. This is called when we  /* Get the next UTF-32 character, advancing the pointer. This is called when we
883  know we are in UTF-32 mode. */  know we are in UTF-32 mode. */
884    
885  #define GETCHARINC(c, eptr) \  #define GETCHARINC(c, eptr) \
886    c = *eptr++;    c = (*eptr++) & UTF32_MASK;
887    
888  /* Get the next character, testing for UTF-32 mode, and advancing the pointer.  /* Get the next character, testing for UTF-32 mode, and advancing the pointer.
889  This is called when we don't know if we are in UTF-32 mode. */  This is called when we don't know if we are in UTF-32 mode. */
890    
891  #define GETCHARINCTEST(c, eptr) \  #define GETCHARINCTEST(c, eptr) \
892    c = *eptr++;    c = *eptr++; \
893      if (utf) c &= UTF32_MASK;
894    
895  /* Get the next UTF-32 character, not advancing the pointer, not incrementing  /* Get the next UTF-32 character, not advancing the pointer, not incrementing
896  length (since all UTF-32 is of length 1). This is called when we know we are in  length (since all UTF-32 is of length 1). This is called when we know we are in
897  UTF-32 mode. */  UTF-32 mode. */
898    
899  #define GETCHARLEN(c, eptr, len) \  #define GETCHARLEN(c, eptr, len) \
900    c = *eptr;    GETCHAR(c, eptr)
901    
902  /* Get the next UTF-832character, testing for UTF-32 mode, not advancing the  /* Get the next UTF-32character, testing for UTF-32 mode, not advancing the
903  pointer, not incrementing the length (since all UTF-32 is of length 1).  pointer, not incrementing the length (since all UTF-32 is of length 1).
904  This is called when we do not know if we are in UTF-32 mode. */  This is called when we do not know if we are in UTF-32 mode. */
905    
906  #define GETCHARLENTEST(c, eptr, len) \  #define GETCHARLENTEST(c, eptr, len) \
907    c = *eptr;    GETCHARTEST(c, eptr)
908    
909  /* 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
910  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

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

  ViewVC Help
Powered by ViewVC 1.1.5