Home
last modified time | relevance | path

Searched refs:leadByte (Results 1 – 16 of 16) sorted by relevance

/external/icu/icu4j/main/classes/charset/src/com/ibm/icu/charset/
DUTF8.java16 static int countTrailBytes(byte leadByte) { in countTrailBytes() argument
17 if (leadByte < (byte)0xe0) { in countTrailBytes()
18 return leadByte < (byte)0xc2 ? 0 : 1; in countTrailBytes()
19 } else if (leadByte < (byte)0xf0) { in countTrailBytes()
22 return leadByte <= (byte)0xf4 ? 3 : 0; in countTrailBytes()
34 static int countBytes(byte leadByte) { in countBytes() argument
35 if (leadByte >= 0) { in countBytes()
37 } else if (leadByte < (byte)0xe0) { in countBytes()
38 return leadByte < (byte)0xc2 ? 0 : 2; in countBytes()
39 } else if (leadByte < (byte)0xf0) { in countBytes()
[all …]
DCharsetHZ.java152 int leadByte = toUnicodeStatus & 0xff; in decodeLoop() local
164 … leadIsOk = (short)(UConverterConstants.UNSIGNED_BYTE_MASK & (leadByte - 0x21)) <= (0x7d - 0x21); in decodeLoop()
167 tempBuf[0] = (byte)(leadByte + 0x80); in decodeLoop()
170 mySourceChar = (leadByte << 8) | mySourceChar; in decodeLoop()
174 mySourceChar = leadByte; in decodeLoop()
178 mySourceChar = 0x10000 | (leadByte << 8) | mySourceChar; in decodeLoop()
/external/icu/icu4c/source/common/
Dustr_imp.h94 #define U8_COUNT_BYTES(leadByte) \ argument
95 (U8_IS_SINGLE(leadByte) ? 1 : U8_COUNT_BYTES_NON_ASCII(leadByte))
105 #define U8_COUNT_BYTES_NON_ASCII(leadByte) \ argument
106 (U8_IS_LEAD(leadByte) ? ((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+2 : 0)
Dbytestrie.cpp32 BytesTrie::readValue(const uint8_t *pos, int32_t leadByte) { in readValue() argument
34 if(leadByte<kMinTwoByteValueLead) { in readValue()
35 value=leadByte-kMinOneByteValueLead; in readValue()
36 } else if(leadByte<kMinThreeByteValueLead) { in readValue()
37 value=((leadByte-kMinTwoByteValueLead)<<8)|*pos; in readValue()
38 } else if(leadByte<kFourByteValueLead) { in readValue()
39 value=((leadByte-kMinThreeByteValueLead)<<16)|(pos[0]<<8)|pos[1]; in readValue()
40 } else if(leadByte==kFourByteValueLead) { in readValue()
Ducnvhz.cpp254 uint32_t leadByte = args->converter->toUnicodeStatus & 0xff; in UConverter_toUnicode_HZ_OFFSETS_LOGIC() local
266 leadIsOk = (uint8_t)(leadByte - 0x21) <= (0x7d - 0x21); in UConverter_toUnicode_HZ_OFFSETS_LOGIC()
269 tempBuf[0] = (char) (leadByte+0x80) ; in UConverter_toUnicode_HZ_OFFSETS_LOGIC()
273 mySourceChar= (leadByte << 8) | mySourceChar; in UConverter_toUnicode_HZ_OFFSETS_LOGIC()
277 mySourceChar = (int32_t)leadByte; in UConverter_toUnicode_HZ_OFFSETS_LOGIC()
281 mySourceChar= 0x10000 | (leadByte << 8) | mySourceChar; in UConverter_toUnicode_HZ_OFFSETS_LOGIC()
/external/icu/icu4c/source/common/unicode/
Dbytestrie.h210 int32_t leadByte=*pos++; in getValue() local
212 return readValue(pos, leadByte>>1); in getValue()
366 static int32_t readValue(const uint8_t *pos, int32_t leadByte);
367 static inline const uint8_t *skipValue(const uint8_t *pos, int32_t leadByte) { in skipValue() argument
369 if(leadByte>=(kMinTwoByteValueLead<<1)) { in skipValue()
370 if(leadByte<(kMinThreeByteValueLead<<1)) { in skipValue()
372 } else if(leadByte<(kFourByteValueLead<<1)) { in skipValue()
375 pos+=3+((leadByte>>1)&1); in skipValue()
381 int32_t leadByte=*pos++; in skipValue() local
382 return skipValue(pos, leadByte); in skipValue()
Dutf8.h55 #define U8_COUNT_TRAIL_BYTES(leadByte) \ argument
56 (U8_IS_LEAD(leadByte) ? \
57 ((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+1 : 0)
70 #define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \ argument
71 (((uint8_t)(leadByte)>=0xc2)+((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0))
80 #define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) argument
Dutf_old.h308 #define UTF8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadByte]) argument
314 #define UTF8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) argument
/external/icu/android_icu4j/src/main/java/android/icu/util/
DBytesTrie.java340 int leadByte=bytes_[pos++]&0xff;
341 assert(leadByte>=kMinValueLead);
342 return readValue(bytes_, pos, leadByte>>1);
684 private static int readValue(byte[] bytes, int pos, int leadByte) { in readValue() argument
686 if(leadByte<kMinTwoByteValueLead) { in readValue()
687 value=leadByte-kMinOneByteValueLead; in readValue()
688 } else if(leadByte<kMinThreeByteValueLead) { in readValue()
689 value=((leadByte-kMinTwoByteValueLead)<<8)|(bytes[pos]&0xff); in readValue()
690 } else if(leadByte<kFourByteValueLead) { in readValue()
691 … value=((leadByte-kMinThreeByteValueLead)<<16)|((bytes[pos]&0xff)<<8)|(bytes[pos+1]&0xff); in readValue()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DBytesTrie.java357 int leadByte=bytes_[pos++]&0xff;
358 assert(leadByte>=kMinValueLead);
359 return readValue(bytes_, pos, leadByte>>1);
715 private static int readValue(byte[] bytes, int pos, int leadByte) { in readValue() argument
717 if(leadByte<kMinTwoByteValueLead) { in readValue()
718 value=leadByte-kMinOneByteValueLead; in readValue()
719 } else if(leadByte<kMinThreeByteValueLead) { in readValue()
720 value=((leadByte-kMinTwoByteValueLead)<<8)|(bytes[pos]&0xff); in readValue()
721 } else if(leadByte<kFourByteValueLead) { in readValue()
722 … value=((leadByte-kMinThreeByteValueLead)<<16)|((bytes[pos]&0xff)<<8)|(bytes[pos+1]&0xff); in readValue()
[all …]
/external/icu/libandroidicu/include/unicode/
Dutf8.h55 #define U8_COUNT_TRAIL_BYTES(leadByte) \ argument
56 (U8_IS_LEAD(leadByte) ? \
57 ((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+1 : 0)
70 #define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \ argument
71 (((uint8_t)(leadByte)>=0xc2)+((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0))
80 #define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) argument
Dutf_old.h308 #define UTF8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadByte]) argument
314 #define UTF8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) argument
/external/icu/icu4c/source/i18n/
Dcollationdata.cpp320 int32_t leadByte = table[i]; in makeReorderRanges() local
321 if(leadByte != 0) { continue; } in makeReorderRanges()
/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/
DCollationData.java409 int leadByte = table[i]; in makeReorderRanges() local
410 if(leadByte != 0) { continue; } in makeReorderRanges()
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/
DCollationData.java407 int leadByte = table[i]; in makeReorderRanges() local
408 if(leadByte != 0) { continue; } in makeReorderRanges()
/external/webrtc/webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/
DSRWebSocket.m1658 uint8_t leadByte = str[lastOffset];
1659 U8_MASK_LEAD_BYTE(leadByte, U8_COUNT_TRAIL_BYTES(leadByte));