(file) Return to CommonUTF.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CommonUTF.h between version 1.3 and 1.4

version 1.3, 2003/10/22 14:26:02 version 1.4, 2004/01/14 14:51:08
Line 65 
Line 65 
  
 #define UTF_8_COUNT_TRAIL_BYTES(leadByte) (trailingBytesForUTF8[(Uint8)leadByte]) #define UTF_8_COUNT_TRAIL_BYTES(leadByte) (trailingBytesForUTF8[(Uint8)leadByte])
  
 #define UTF_8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1)  #define UTF8_NEXT(s, i) { \
       (i)=((i) + UTF_8_COUNT_TRAIL_BYTES((s)[(i)]) + 1); \
 #define UTF8_NEXT(s, i, c) { \  
     (c)=(s)[(i)++]; \  
     if((Uint8)((c)-0xc0)<0x35) { \  
         Uint8 __count=UTF_8_COUNT_TRAIL_BYTES(c); \  
         UTF_8_MASK_LEAD_BYTE(c, __count); \  
         switch(__count) { \  
         case 3: \  
             (c)=((c)<<6)|((s)[(i)++]&0x3f); \  
         case 2: \  
             (c)=((c)<<6)|((s)[(i)++]&0x3f); \  
         case 1: \  
             (c)=((c)<<6)|((s)[(i)++]&0x3f); \  
             break; \  
         } \  
     } \  
 } }
  
   
 int isValid_U8(const Uint8 *src,int size); int isValid_U8(const Uint8 *src,int size);
 int UTF16toUTF8(const Uint16** srcHead, int UTF16toUTF8(const Uint16** srcHead,
                 const Uint16* srcEnd,                 const Uint16* srcEnd,


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2