X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..1546d4af2ed1219a41ef4170bf188f2ab91442e6:/icuSources/common/ucnvmbcs.h diff --git a/icuSources/common/ucnvmbcs.h b/icuSources/common/ucnvmbcs.h index 7875f826..209cdc53 100644 --- a/icuSources/common/ucnvmbcs.h +++ b/icuSources/common/ucnvmbcs.h @@ -1,12 +1,14 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * -* Copyright (C) 2000-2011, International Business Machines +* Copyright (C) 2000-2013, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * file name: ucnvmbcs.h -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -60,6 +62,9 @@ * * When possible, makeconv continues to generate version 4.m files. * + * _MBCSHeader.version 5.4/4.4 supports "good one-way" mappings (|4) + * in the extension tables (fromUTableValues bit 30). See ucnv_ext.h for details. + * * _MBCSHeader.version 4.3 optionally modifies the fromUnicode data structures * slightly and optionally adds a table for conversion to MBCS (non-SBCS) * charsets. @@ -274,17 +279,17 @@ enum { #define MBCS_ENTRY_SET_STATE(entry, state) (int32_t)(((entry)&0x80ffffff)|((int32_t)(state)<<24L)) -#define MBCS_ENTRY_STATE(entry) (((entry)>>24)&0x7f) +#define MBCS_ENTRY_STATE(entry) ((((uint32_t)entry)>>24)&0x7f) #define MBCS_ENTRY_IS_TRANSITION(entry) ((entry)>=0) #define MBCS_ENTRY_IS_FINAL(entry) ((entry)<0) -#define MBCS_ENTRY_TRANSITION_STATE(entry) ((entry)>>24) +#define MBCS_ENTRY_TRANSITION_STATE(entry) (((uint32_t)entry)>>24) #define MBCS_ENTRY_TRANSITION_OFFSET(entry) ((entry)&0xffffff) -#define MBCS_ENTRY_FINAL_STATE(entry) (((entry)>>24)&0x7f) +#define MBCS_ENTRY_FINAL_STATE(entry) ((((uint32_t)entry)>>24)&0x7f) #define MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry) ((entry)<(int32_t)0x80100000) -#define MBCS_ENTRY_FINAL_ACTION(entry) (((entry)>>20)&0xf) +#define MBCS_ENTRY_FINAL_ACTION(entry) ((((uint32_t)entry)>>20)&0xf) #define MBCS_ENTRY_FINAL_VALUE(entry) ((entry)&0xfffff) #define MBCS_ENTRY_FINAL_VALUE_16(entry) (uint16_t)(entry)