/*
**********************************************************************
-* Copyright (C) 2000-2015, International Business Machines
+* Copyright (C) 2000-2016, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv2022.cpp
*err = U_UNSUPPORTED_ESCAPE_SEQUENCE;
break;
}
- /*fall through*/
+ U_FALLTHROUGH;
case GB2312_1:
- /*fall through*/
+ U_FALLTHROUGH;
case CNS_11643_1:
myData2022->toU2022State.cs[1]=(int8_t)tempState;
break;
ASCII,
JISX201,
ISO8859_1,
- ISO8859_7,
JISX208,
+ ISO8859_7,
JISX212,
GB2312,
KSC5601,
/* ISO-2022-JP does not use single-byte (C1) SS2 and SS3 */
case CR:
- /*falls through*/
case LF:
/* automatically reset to single-byte mode */
if((StateEnum)pToU2022State->cs[0] != ASCII && (StateEnum)pToU2022State->cs[0] != JISX201) {
}
pToU2022State->cs[2] = 0;
pToU2022State->g = 0;
- /* falls through */
+ U_FALLTHROUGH;
default:
/* convert one or two bytes */
myData->isEmptySegment = FALSE;
/* ISO-2022-CN does not use single-byte (C1) SS2 and SS3 */
case CR:
- /*falls through*/
case LF:
uprv_memset(pToU2022State, 0, sizeof(ISO2022State));
- /* falls through */
+ U_FALLTHROUGH;
default:
/* convert one or two bytes */
myData->isEmptySegment = FALSE;
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
};
-const UConverterSharedData _ISO2022Data={
- sizeof(UConverterSharedData),
- ~((uint32_t) 0),
- NULL,
- NULL,
- &_ISO2022StaticData,
- FALSE,
- &_ISO2022Impl,
- 0, UCNV_MBCS_TABLE_INITIALIZER
-};
+const UConverterSharedData _ISO2022Data=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_ISO2022StaticData, &_ISO2022Impl);
/*************JP****************/
static const UConverterImpl _ISO2022JPImpl={
namespace {
-const UConverterSharedData _ISO2022JPData={
- sizeof(UConverterSharedData),
- ~((uint32_t) 0),
- NULL,
- NULL,
- &_ISO2022JPStaticData,
- FALSE,
- &_ISO2022JPImpl,
- 0, UCNV_MBCS_TABLE_INITIALIZER
-};
+const UConverterSharedData _ISO2022JPData=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_ISO2022JPStaticData, &_ISO2022JPImpl);
} // namespace
UCNV_IBM,
UCNV_ISO_2022,
1,
- 3, /* max 3 bytes per UChar: SO+DBCS */
+ 8, /* max 8 bytes per UChar */
{ 0x1a, 0, 0, 0 },
1,
FALSE,
namespace {
-const UConverterSharedData _ISO2022KRData={
- sizeof(UConverterSharedData),
- ~((uint32_t) 0),
- NULL,
- NULL,
- &_ISO2022KRStaticData,
- FALSE,
- &_ISO2022KRImpl,
- 0, UCNV_MBCS_TABLE_INITIALIZER
-};
+const UConverterSharedData _ISO2022KRData=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_ISO2022KRStaticData, &_ISO2022KRImpl);
} // namespace
namespace {
-const UConverterSharedData _ISO2022CNData={
- sizeof(UConverterSharedData),
- ~((uint32_t) 0),
- NULL,
- NULL,
- &_ISO2022CNStaticData,
- FALSE,
- &_ISO2022CNImpl,
- 0, UCNV_MBCS_TABLE_INITIALIZER
-};
+const UConverterSharedData _ISO2022CNData=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_ISO2022CNStaticData, &_ISO2022CNImpl);
} // namespace
#endif /* #if !UCONFIG_ONLY_HTML_CONVERSION */