ICU-1099 Add const to some static data

X-SVN-Rev: 5632
This commit is contained in:
George Rhoten 2001-08-30 18:25:42 +00:00
parent 81cfc9a3c8
commit e1749f434d
4 changed files with 725 additions and 725 deletions

View File

@ -119,7 +119,7 @@ static int32_t scsu_getLRDefinedWindow(const UnicodeCompressor *comp);
/* Static tables generated by CompressionTableGenerator */
/** For window offset mapping */
static int32_t sOffsetTable [] = {
static const int32_t sOffsetTable [] = {
0x0, 0x80, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480,
0x500, 0x580, 0x600, 0x680, 0x700, 0x780, 0x800, 0x880, 0x900,
0x980, 0xa00, 0xa80, 0xb00, 0xb80, 0xc00, 0xc80, 0xd00, 0xd80,
@ -151,7 +151,7 @@ static int32_t sOffsetTable [] = {
};
/** For quick identification of a byte as a single-byte mode tag */
static UBool sSingleTagTable [] = {
static const UBool sSingleTagTable [] = {
FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
@ -183,7 +183,7 @@ static UBool sSingleTagTable [] = {
};
/** For quick identification of a byte as a unicode mode tag */
static UBool sUnicodeTagTable [] = {
static const UBool sUnicodeTagTable [] = {
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
@ -216,7 +216,7 @@ static UBool sUnicodeTagTable [] = {
};
/** Static compression window offsets */
static int32_t sOffsets [] = {
static const int32_t sOffsets [] = {
0x0000, /* for quoting single-byte mode tags*/
0x0080, /* Latin-1 Supplement*/
0x0100, /* Latin Extended-A*/

View File

@ -130,9 +130,9 @@ static void
adjustWSLevels(UBiDi *pBiDi);
/* to avoid some conditional statements, use tiny constant arrays */
static Flags flagLR[2]={ DIRPROP_FLAG(L), DIRPROP_FLAG(R) };
static Flags flagE[2]={ DIRPROP_FLAG(LRE), DIRPROP_FLAG(RLE) };
static Flags flagO[2]={ DIRPROP_FLAG(LRO), DIRPROP_FLAG(RLO) };
static const Flags flagLR[2]={ DIRPROP_FLAG(L), DIRPROP_FLAG(R) };
static const Flags flagE[2]={ DIRPROP_FLAG(LRE), DIRPROP_FLAG(RLE) };
static const Flags flagO[2]={ DIRPROP_FLAG(LRO), DIRPROP_FLAG(RLO) };
#define DIRPROP_FLAG_LR(level) flagLR[(level)&1]
#define DIRPROP_FLAG_E(level) flagE[(level)&1]

View File

@ -71,7 +71,7 @@
* ratio is changed, the low and high water ratios should also be
* adjusted to suit.
*/
static int32_t PRIMES[] = {
static const int32_t PRIMES[] = {
17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771,
65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617,
16777259, 33554467, 67108879, 134217757, 268435459, 536870923,

View File

@ -204,7 +204,7 @@ uprv_mstrm_writeBlock(UMemoryStream *MS, const void *s, UTextOffset length) {
U_CAPI void U_EXPORT2
uprv_mstrm_writePadding(UMemoryStream *MS, UTextOffset length) {
static uint8_t padding[16]={
static const uint8_t padding[16]={
0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa,