/*
**********************************************************************
-* Copyright (C) 2002-2015, International Business Machines
+* Copyright (C) 2002-2016, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_u7.c
#if !UCONFIG_NO_CONVERSION && !UCONFIG_ONLY_HTML_CONVERSION
+#include "cmemory.h"
#include "unicode/ucnv.h"
#include "ucnv_bld.h"
#include "ucnv_cnv.h"
inDirectMode=(UBool)((status>>24)&1);
base64Counter=(int8_t)(status>>16);
bits=(uint8_t)status;
- U_ASSERT(bits<=sizeof(toBase64)/sizeof(toBase64[0]));
+ U_ASSERT(bits<=UPRV_LENGTHOF(toBase64));
}
/* UTF-7 always encodes UTF-16 code units, therefore we need only a simple sourceIndex */
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
};
-const UConverterSharedData _UTF7Data={
- sizeof(UConverterSharedData), ~((uint32_t)0),
- NULL, NULL, &_UTF7StaticData, FALSE, &_UTF7Impl,
- 0
-};
+const UConverterSharedData _UTF7Data=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_UTF7StaticData, &_UTF7Impl);
/* IMAP mailbox name encoding ----------------------------------------------- */
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
};
-const UConverterSharedData _IMAPData={
- sizeof(UConverterSharedData), ~((uint32_t)0),
- NULL, NULL, &_IMAPStaticData, FALSE, &_IMAPImpl,
- 0
-};
+const UConverterSharedData _IMAPData=
+ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_IMAPStaticData, &_IMAPImpl);
#endif