Home | History | Annotate | Download | only in common

Lines Matching defs:bytes

21 *   - legacy variable-length codepages with up to 4 bytes per character
30 * - byte sequences must not have leading zero bytes
32 * - limitation to up to 4 bytes per character
163 * One format for transitional entries (bit 31 not set) for non-final bytes, and
281 * at least two states for the trail bytes:
294 * Converting from Unicode to codepage bytes --------------------------------***
298 * a sequence of 1..4 bytes, in addition to a flag that indicates if there is
304 * with the resulting bytes is at offsetFromUBytes.
335 * Bits 15..0 contain the index to stage 3, which must be multiplied by 16*(bytes per char)
337 * Stage 3 contains 2, 3, or 4 bytes per result.
338 * 2 or 4 bytes are stored as uint16_t/uint32_t in platform endianness,
339 * while 3 bytes are stored as bytes in big-endian order.
340 * Leading zero bytes are ignored, and the number of bytes is counted.
366 * consecutive sequences of bytes, starting from the one encoded in value,
369 * This function will not be called for sequences of bytes with leading zeros.
372 * @param value contains 1..4 bytes of the first byte sequence, right-aligned
919 const uint8_t *stage3, *bytes;
924 bytes=mbcsTable->fromUnicodeBytes;
948 stage3=bytes+st3Multiplier*16*(uint32_t)(uint16_t)st3;
955 * or which map to non-zero bytes if we use fallbacks.
1137 char bytes[4];
1146 bytes[3]=(char)(0x30+linear%10); linear/=10;
1147 bytes[2]=(char)(0x81+linear%126); linear/=126;
1148 bytes[1]=(char)(0x30+linear%10); linear/=10;
1149 bytes[0]=(char)(0x81+linear);
1153 bytes, 4, (char **)target, (char *)targetLimit,
1261 const uint8_t *bytes;
1274 bytes=mbcsTable->fromUnicodeBytes;
1275 results=(const uint16_t *)bytes;
1302 EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
1310 EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
1318 * We _know_ the number of bytes in the fromUnicodeBytes array
1365 uprv_memcpy(newResults, bytes, sizeofFromUBytes);
1410 uint8_t *bytes, *p;
1415 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1455 p=bytes;
1458 /* write the codepage bytes into stage 3 */
1471 /* 2 bytes per character */
1485 uint32_t fullStage2Length, /* lengths are numbers of units, not bytes */
1671 * is a DBCS version of a base converter that also maps single bytes.
1834 /* calculate a bit set of 4 ASCII characters per bit that round-trip to ASCII bytes */
2478 uint8_t *bytes;
2527 bytes=cnv->toUBytes;
2579 bytes[0]=*(source-1);
2619 bytes[0]=*(source-1);
2655 bytes[byteIndex++]=*source++;
2658 entry=stateTable[state][bytes[byteIndex++]=*source++];
2822 * - If any of the non-initial bytes could be the start of a character,
2828 i<byteIndex && !isSingleOrLead(stateTable, state, isDBCSOnly, bytes[i]);
2831 /* Back out some bytes. */
2838 /* Back out bytes from the previous buffer: Need to replay them. */
2841 uprv_memcpy(cnv->preToU, bytes+i, -cnv->preToULength);
3148 uint8_t *bytes=cnv->toUBytes;
3151 *bytes++=*lastSource++;
3159 * - If any of the non-initial bytes could be the start of a character,
3163 uint8_t *bytes=cnv->toUBytes;
3164 *bytes++=*lastSource++; /* first byte */
3173 *bytes++=*lastSource++;
3415 const uint8_t *bytes;
3440 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3442 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3491 value=DBCS_RESULT_FROM_MOST_BMP(mbcsIndex, (const uint16_t *)bytes, c);
3538 /* convert the Unicode code point in c into codepage bytes */
3541 /* get the bytes and the length for the output */
3543 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
3582 /* write the output character bytes from value and length */
3743 /* convert the Unicode code point in c into codepage bytes */
3748 /* assigned, write the output character bytes from value and length */
3937 /* convert the Unicode code point in c into codepage bytes */
3947 /* assigned, write the output character bytes from value and length */
4080 const uint8_t *p, *bytes;
4140 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
4142 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
4223 /* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
4227 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4250 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4287 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4296 p=bytes+(value+(c&0x3f))*3;
4311 value=((const uint32_t *)bytes)[value +(c&0x3f)];
4327 value=((const uint16_t *)bytes)[value +(c&0x3f)];
4346 p=bytes+(value+(c&0x3f))*3;
4348 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4423 /* convert the Unicode code point in c into codepage bytes */
4433 * a pointer to as many bytes as are stored per character.
4434 * The pointer points to the character's bytes in stage 3.
4439 * For 2-byte and 4-byte codepages, the bytes are stored as uint16_t
4441 * For 3-byte codepages, the bytes are always stored in big-endian order.
4444 * byte of their longest byte sequences, the first two bytes in
4445 * this third stage indicate with their 7th bits whether these bytes
4451 * Other than that, leading zero bytes are removed and the other
4452 * bytes output. A single zero byte may be output if the "assigned"
4459 /* get the bytes and the length for the output */
4462 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4481 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4519 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4529 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4540 value=MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c);
4552 value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
4567 p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
4569 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4639 /* write the output character bytes from value and length */
4822 * It converts one single Unicode code point into codepage bytes, encoded
4823 * as one 32-bit value. The function returns the number of bytes in *pValue:
4824 * 1..4 the number of bytes in *pValue
4828 * *pValue will contain the resulting bytes with the last byte in bits 7..0,
4850 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
4861 /* get the bytes and the length for the output */
4925 /* EUC 16-bit fixed-length representation applied to the first two bytes */
4998 /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
5081 * Do not go back into the bytes that will be read for finishing a partial
5096 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5223 if( toULength==toULimit && /* consumed all trail bytes */
5381 * Do not go back into the bytes that will be read for finishing a partial
5396 /* exit the conversion loop before the lead byte if there are not enough trail bytes for it */
5503 if( toULength==toULimit && /* consumed all trail bytes */
5533 /* get the bytes and the length for the output */
5546 /* write the output character bytes from value and length */
5649 /* all bytes that cause a state transition from state 0 are lead bytes */