Home | History | Annotate | Download | only in common

Lines Matching defs:bytes

19 *   - legacy variable-length codepages with up to 4 bytes per character
28 * - byte sequences must not have leading zero bytes
30 * - limitation to up to 4 bytes per character
159 * One format for transitional entries (bit 31 not set) for non-final bytes, and
277 * at least two states for the trail bytes:
290 * Converting from Unicode to codepage bytes --------------------------------***
294 * a sequence of 1..4 bytes, in addition to a flag that indicates if there is
300 * with the resulting bytes is at offsetFromUBytes.
331 * Bits 15..0 contain the index to stage 3, which must be multiplied by 16*(bytes per char)
333 * Stage 3 contains 2, 3, or 4 bytes per result.
334 * 2 or 4 bytes are stored as uint16_t/uint32_t in platform endianness,
335 * while 3 bytes are stored as bytes in big-endian order.
336 * Leading zero bytes are ignored, and the number of bytes is counted.
475 * consecutive sequences of bytes, starting from the one encoded in value,
478 * This function will not be called for sequences of bytes with leading zeros.
481 * @param value contains 1..4 bytes of the first byte sequence, right-aligned
776 const uint8_t *stage3, *bytes;
781 bytes=mbcsTable->fromUnicodeBytes;
805 stage3=bytes+st3Multiplier*16*(uint32_t)(uint16_t)st3;
812 * or which map to non-zero bytes if we use fallbacks.
991 char bytes[4];
1000 bytes[3]=(char)(0x30+linear%10); linear/=10;
1001 bytes[2]=(char)(0x81+linear%126); linear/=126;
1002 bytes[1]=(char)(0x30+linear%10); linear/=10;
1003 bytes[0]=(char)(0x81+linear);
1007 bytes, 4, (char **)target, (char *)targetLimit,
1115 const uint8_t *bytes;
1128 bytes=mbcsTable->fromUnicodeBytes;
1129 results=(const uint16_t *)bytes;
1156 EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
1164 EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
1172 * We _know_ the number of bytes in the fromUnicodeBytes array
1219 uprv_memcpy(newResults, bytes, sizeofFromUBytes);
1264 uint8_t *bytes, *p;
1269 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1309 p=bytes;
1312 /* write the codepage bytes into stage 3 */
1325 /* 2 bytes per character */
1339 uint32_t fullStage2Length, /* lengths are numbers of units, not bytes */
1343 uint8_t *bytes;
1362 mbcsTable->fromUnicodeBytes=bytes=(uint8_t *)(stage2+fullStage2Length);
1526 * is a DBCS version of a base converter that also maps single bytes.
1689 /* calculate a bit set of 4 ASCII characters per bit that round-trip to ASCII bytes */
2329 uint8_t *bytes;
2378 bytes=cnv->toUBytes;
2430 bytes[0]=*(source-1);
2470 bytes[0]=*(source-1);
2506 bytes[byteIndex++]=*source++;
2509 entry=stateTable[state][bytes[byteIndex++]=*source++];
2673 * - If any of the non-initial bytes could be the start of a character,
2679 i<byteIndex && !isSingleOrLead(stateTable, state, isDBCSOnly, bytes[i]);
2682 /* Back out some bytes. */
2689 /* Back out bytes from the previous buffer: Need to replay them. */
2692 uprv_memcpy(cnv->preToU, bytes+i, -cnv->preToULength);
2999 bytes=cnv->toUBytes;
3002 *bytes++=*lastSource++;
3010 * - If any of the non-initial bytes could be the start of a character,
3014 uint8_t *bytes=cnv->toUBytes;
3015 *bytes++=*lastSource++; /* first byte */
3024 *bytes++=*lastSource++;
3266 const uint8_t *bytes;
3291 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3293 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3342 value=DBCS_RESULT_FROM_MOST_BMP(mbcsIndex, (const uint16_t *)bytes, c);
3389 /* convert the Unicode code point in c into codepage bytes */
3392 /* get the bytes and the length for the output */
3394 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
3433 /* write the output character bytes from value and length */
3594 /* convert the Unicode code point in c into codepage bytes */
3599 /* assigned, write the output character bytes from value and length */
3788 /* convert the Unicode code point in c into codepage bytes */
3798 /* assigned, write the output character bytes from value and length */
3931 const uint8_t *p, *bytes;
3990 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3992 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
4073 /* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
4077 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4100 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4137 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4146 p=bytes+(value+(c&0x3f))*3;
4161 value=((const uint32_t *)bytes)[value +(c&0x3f)];
4177 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4196 p=bytes+(value+(c&0x3f))*3;
4198 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4273 /* convert the Unicode code point in c into codepage bytes */
4283 * a pointer to as many bytes as are stored per character.
4284 * The pointer points to the character's bytes in stage 3.
4289 * For 2-byte and 4-byte codepages, the bytes are stored as uint16_t
4291 * For 3-byte codepages, the bytes are always stored in big-endian order.
4294 * byte of their longest byte sequences, the first two bytes in
4295 * this third stage indicate with their 7th bits whether these bytes
4301 bytes are removed and the other
4302 * bytes output. A single zero byte may be output if the "assigned"
4309 /* get the bytes and the length for the output */
4312 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4331 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4369 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4379 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4390 value=MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c);
4402 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4417 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4419 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4489 /* write the output character bytes from value and length */
4658 * It converts one single Unicode code point into codepage bytes, encoded
4659 * as one 32-bit value. The function returns the number of bytes in *pValue:
4660 * 1..4 the number of bytes in *pValue
4664 * *pValue will contain the resulting bytes with the last byte in bits 7..0,
4686 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4697 /* get the bytes and the length for the output */
4761 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4834 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4917 * Do not go back into the bytes that will be read for finishing a partial
4932 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5059 if( toULength==toULimit && /* consumed all trail bytes */
5221 * Do not go back into the bytes that will be read for finishing a partial
5236 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5343 if( toULength==toULimit && /* consumed all trail bytes */
5373 /* get the bytes and the length for the output */
5386 /* write the output character bytes from value and length */
5486 /* all bytes that cause a state transition from state 0 are lead bytes */