enum { /* *TODO:Considerusingucnvmbcs.hconstants. *However,notallvaluesneedtobeexactlythesame,forexample *thexxx_UTF8_MAXvaluesmaybedifferent.(EspeciallySBCS_UTF8_MAX *maybehigherinmakeconvthanintheruntimecodebecausethat *affectsonlyasmallnumberof.cnvfiles[ifany]butall *runtimeUConverterSharedDataobjects.
*/
MBCS_STAGE_2_SHIFT=4,
MBCS_STAGE_2_BLOCK_SIZE=0x40, /* =64=1<<6 for 6 bits in stage 2 */
MBCS_STAGE_2_BLOCK_SIZE_SHIFT=6, /* log2(MBCS_STAGE_2_BLOCK_SIZE) */
MBCS_STAGE_2_BLOCK_MASK=0x3f, /* for after shifting by MBCS_STAGE_2_SHIFT */
MBCS_STAGE_1_SHIFT=10,
MBCS_STAGE_1_BMP_SIZE=0x40, /* 0x10000>>MBCS_STAGE_1_SHIFT, or 16 for one entry per 1k code points on the BMP */
MBCS_STAGE_1_SIZE=0x440, /* 0x110000>>MBCS_STAGE_1_SHIFT, or 17*64 for one entry per 1k code points */
MBCS_STAGE_2_SIZE=0xfbc0, /* 0x10000-MBCS_STAGE_1_SIZE: stages 1 & 2 share a 16-bit-indexed array */
MBCS_MAX_STAGE_2_TOP=MBCS_STAGE_2_SIZE,
MBCS_STAGE_2_MAX_BLOCKS=MBCS_STAGE_2_SIZE>>MBCS_STAGE_2_BLOCK_SIZE_SHIFT,
MBCS_STAGE_2_ALL_UNASSIGNED_INDEX=0, /* stage 1 entry for the all-unassigned stage 2 block */
MBCS_STAGE_2_FIRST_ASSIGNED=MBCS_STAGE_2_BLOCK_SIZE, /* start of the first stage 2 block after the all-unassigned one */
MBCS_STAGE_3_BLOCK_SIZE=16, /* =16=1<<4 for 4 bits in stage 3 */
MBCS_STAGE_3_BLOCK_MASK=0xf,
MBCS_STAGE_3_FIRST_ASSIGNED=MBCS_STAGE_3_BLOCK_SIZE, /* start of the first stage 3 block after the all-unassigned one */
MBCS_STAGE_3_GRANULARITY=16, /* =1<<4: MBCS stage 2 indexes are shifted left 4 */
MBCS_STAGE_3_SBCS_SIZE=0x10000, /* max 64k mappings for SBCS */
MBCS_STAGE_3_MBCS_SIZE=0x10000*MBCS_STAGE_3_GRANULARITY, /* max mappings for MBCS */
MBCS_UTF8_STAGE_SHIFT=6,
MBCS_UTF8_STAGE_3_BLOCK_SIZE=0x40, /* =64=1<<6 for 6 bits from last trail byte */
MBCS_UTF8_STAGE_3_BLOCK_MASK=0x3f,
/* size of the single-stage table for up to U+d7ff (used instead of stage1/2) */
MBCS_UTF8_STAGE_SIZE=MBCS_UTF8_LIMIT>>MBCS_UTF8_STAGE_SHIFT, /* =0x360 */
MBCS_FROM_U_EXT_FLAG=0x10, /* UCMapping.f bit for base table mappings that fit into the base toU table */
MBCS_FROM_U_EXT_MASK=0x0f, /* but need to go into the extension fromU table */
/* =4 number of regular stage 3 blocks for final UTF-8 trail byte */
MBCS_UTF8_STAGE_3_BLOCKS=MBCS_UTF8_STAGE_3_BLOCK_SIZE/MBCS_STAGE_3_BLOCK_SIZE,
/* Test if a 1:1 mapping fits into the MBCS base table's fromUnicode structure. */
U_CFUNC UBool
MBCSOkForBaseFromUnicode(const MBCSData *mbcsData, const uint8_t *bytes, int32_t length,
UChar32 c, int8_t flag);
U_CFUNC NewConverter *
CnvExtOpen(UCMFile *ucm);
#endif/* __GENMBCS_H__ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-09-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.