/[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 383 by ph10, Sun Mar 1 12:00:59 2009 UTC revision 384 by ph10, Sun Mar 8 16:27:43 2009 UTC
# Line 478  if there are extra bytes. This is called Line 478  if there are extra bytes. This is called
478      len += gcaa; \      len += gcaa; \
479      }      }
480    
481    /* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
482    pointer, incrementing length if there are extra bytes. This is called when we
483    know we are in UTF-8 mode. */
484    
485    #define GETCHARLENTEST(c, eptr, len) \
486      c = *eptr; \
487      if (utf8 && c >= 0xc0) \
488        { \
489        int gcii; \
490        int gcaa = _pcre_utf8_table4[c & 0x3f];  /* Number of additional bytes */ \
491        int gcss = 6*gcaa; \
492        c = (c & _pcre_utf8_table3[gcaa]) << gcss; \
493        for (gcii = 1; gcii <= gcaa; gcii++) \
494          { \
495          gcss -= 6; \
496          c |= (eptr[gcii] & 0x3f) << gcss; \
497          } \
498        len += gcaa; \
499        }
500    
501  /* 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
502  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
503  because almost all calls are already within a block of UTF-8 only code. */  because almost all calls are already within a block of UTF-8 only code. */

Legend:
Removed from v.383  
changed lines
  Added in v.384

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12