mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Review of data types to reduce memory usage (no change of functionality)
This commit is contained in:
parent
3f7f909644
commit
17be0440cc
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008-2016 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2017 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -37,7 +37,7 @@
|
||||
#define DIGIT 16
|
||||
#define BINARY 32
|
||||
|
||||
static const int CompactAztecMap[] = {
|
||||
static const unsigned short int CompactAztecMap[] = {
|
||||
/* 27 x 27 data grid */
|
||||
609, 608, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459,
|
||||
607, 606, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458,
|
||||
@ -96,7 +96,7 @@ const int AztecSymbolChar[128] = {
|
||||
302: Full Stop (ASCII 46)
|
||||
*/
|
||||
|
||||
static const int AztecSizes[32] = {
|
||||
static const unsigned short int AztecSizes[32] = {
|
||||
/* Codewords per symbol */
|
||||
21, 48, 60, 88, 120, 156, 196, 240, 230, 272, 316, 364, 416, 470, 528, 588, 652, 720, 790,
|
||||
864, 940, 1020, 920, 992, 1066, 1144, 1224, 1306, 1392, 1480, 1570, 1664
|
||||
@ -106,28 +106,28 @@ static const int AztecCompactSizes[4] = {
|
||||
17, 40, 51, 76
|
||||
};
|
||||
|
||||
static const int Aztec10DataSizes[32] = {
|
||||
static const unsigned short int Aztec10DataSizes[32] = {
|
||||
/* Data bits per symbol maximum with 10% error correction */
|
||||
96, 246, 408, 616, 840, 1104, 1392, 1704, 2040, 2420, 2820, 3250, 3720, 4200, 4730,
|
||||
5270, 5840, 6450, 7080, 7750, 8430, 9150, 9900, 10680, 11484, 12324, 13188, 14076,
|
||||
15000, 15948, 16920, 17940
|
||||
};
|
||||
|
||||
static const int Aztec23DataSizes[32] = {
|
||||
static const unsigned short int Aztec23DataSizes[32] = {
|
||||
/* Data bits per symbol maximum with 23% error correction */
|
||||
84, 204, 352, 520, 720, 944, 1184, 1456, 1750, 2070, 2410, 2780, 3180, 3590, 4040,
|
||||
4500, 5000, 5520, 6060, 6630, 7210, 7830, 8472, 9132, 9816, 10536, 11280, 12036,
|
||||
12828, 13644, 14472, 15348
|
||||
};
|
||||
|
||||
static const int Aztec36DataSizes[32] = {
|
||||
static const unsigned short int Aztec36DataSizes[32] = {
|
||||
/* Data bits per symbol maximum with 36% error correction */
|
||||
66, 168, 288, 432, 592, 776, 984, 1208, 1450, 1720, 2000, 2300, 2640, 2980, 3350,
|
||||
3740, 4150, 4580, 5030, 5500, 5990, 6500, 7032, 7584, 8160, 8760, 9372, 9996, 10656,
|
||||
11340, 12024, 12744
|
||||
};
|
||||
|
||||
static const int Aztec50DataSizes[32] = {
|
||||
static const unsigned short int Aztec50DataSizes[32] = {
|
||||
/* Data bits per symbol maximum with 50% error correction */
|
||||
48, 126, 216, 328, 456, 600, 760, 936, 1120, 1330, 1550, 1790, 2050, 2320, 2610,
|
||||
2910, 3230, 3570, 3920, 4290, 4670, 5070, 5484, 5916, 6360, 6828, 7308, 7800, 8316,
|
||||
|
@ -36,7 +36,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static const int iso_8859_1[] = {// Latin alphabet No. 1
|
||||
static const unsigned short int iso_8859_1[] = {// Latin alphabet No. 1
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
@ -47,7 +47,7 @@ extern "C" {
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static const int iso_8859_2[] = {// Latin alphabet No. 2
|
||||
static const unsigned short int iso_8859_2[] = {// Latin alphabet No. 2
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
|
||||
@ -58,7 +58,7 @@ extern "C" {
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
|
||||
static const int iso_8859_3[] = {// Latin alphabet No. 3
|
||||
static const unsigned short int iso_8859_3[] = {// Latin alphabet No. 3
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b,
|
||||
@ -69,7 +69,7 @@ extern "C" {
|
||||
0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9
|
||||
};
|
||||
|
||||
static const int iso_8859_4[] = {// Latin alphabet No. 4
|
||||
static const unsigned short int iso_8859_4[] = {// Latin alphabet No. 4
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x012b, 0x013b, 0x00a7, 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
|
||||
@ -80,7 +80,7 @@ extern "C" {
|
||||
0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9
|
||||
};
|
||||
|
||||
static const int iso_8859_5[] = {// Latin/Cyrillic alphabet
|
||||
static const unsigned short int iso_8859_5[] = {// Latin/Cyrillic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
|
||||
@ -91,7 +91,7 @@ extern "C" {
|
||||
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f
|
||||
};
|
||||
|
||||
static const int iso_8859_6[] = {// Latin/Arabic alphabet
|
||||
static const unsigned short int iso_8859_6[] = {// Latin/Arabic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000,
|
||||
@ -102,7 +102,7 @@ extern "C" {
|
||||
0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
||||
static const int iso_8859_7[] = {// Latin/Greek alphabet
|
||||
static const unsigned short int iso_8859_7[] = {// Latin/Greek alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015,
|
||||
@ -113,7 +113,7 @@ extern "C" {
|
||||
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000
|
||||
};
|
||||
|
||||
static const int iso_8859_8[] = {// Latin/Hebrew alphabet
|
||||
static const unsigned short int iso_8859_8[] = {// Latin/Hebrew alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
@ -124,7 +124,7 @@ extern "C" {
|
||||
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000
|
||||
};
|
||||
|
||||
static const int iso_8859_9[] = {// Latin alphabet No. 5
|
||||
static const unsigned short int iso_8859_9[] = {// Latin alphabet No. 5
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
@ -135,7 +135,7 @@ extern "C" {
|
||||
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff
|
||||
};
|
||||
|
||||
static const int iso_8859_10[] = {// Latin alphabet No. 6
|
||||
static const unsigned short int iso_8859_10[] = {// Latin alphabet No. 6
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x012b, 0x0136, 0x00a7, 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
|
||||
@ -146,7 +146,7 @@ extern "C" {
|
||||
0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138
|
||||
};
|
||||
|
||||
static const int iso_8859_11[] = {// Latin/Thai alphabet
|
||||
static const unsigned short int iso_8859_11[] = {// Latin/Thai alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
|
||||
@ -157,7 +157,7 @@ extern "C" {
|
||||
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
||||
static const int iso_8859_13[] = {// Latin alphabet No. 7
|
||||
static const unsigned short int iso_8859_13[] = {// Latin alphabet No. 7
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
|
||||
@ -168,7 +168,7 @@ extern "C" {
|
||||
0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019
|
||||
};
|
||||
|
||||
static const int iso_8859_14[] = {// Latin alphabet No. 8 (Celtic)
|
||||
static const unsigned short int iso_8859_14[] = {// Latin alphabet No. 8 (Celtic)
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
|
||||
@ -179,7 +179,7 @@ extern "C" {
|
||||
0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff
|
||||
};
|
||||
|
||||
static const int iso_8859_15[] = {// Latin alphabet No. 9
|
||||
static const unsigned short int iso_8859_15[] = {// Latin alphabet No. 9
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
@ -190,7 +190,7 @@ extern "C" {
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static const int iso_8859_16[] = {// Latin alphabet No. 10
|
||||
static const unsigned short int iso_8859_16[] = {// Latin alphabet No. 10
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
|
||||
@ -200,7 +200,7 @@ extern "C" {
|
||||
0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff
|
||||
};
|
||||
|
||||
static const int windows_1250[] = {
|
||||
static const unsigned short int windows_1250[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0000, 0x201e, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
|
||||
0x00a0, 0x02c7, 0x02db, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
|
||||
@ -211,7 +211,7 @@ extern "C" {
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
|
||||
static const int windows_1251[] = {
|
||||
static const unsigned short int windows_1251[] = {
|
||||
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
|
||||
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
|
||||
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
|
||||
@ -222,7 +222,7 @@ extern "C" {
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f
|
||||
};
|
||||
|
||||
static const int windows_1252[] = {
|
||||
static const unsigned short int windows_1252[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017d, 0x0000,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x0000, 0x017e, 0x0178,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
@ -233,7 +233,7 @@ extern "C" {
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static const int windows_1256[] = {
|
||||
static const unsigned short int windows_1256[] = {
|
||||
0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
|
||||
0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba,
|
||||
0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008-2016 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2017 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -29,7 +29,7 @@
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static const unsigned long int gb18030_twobyte_lookup[] = {
|
||||
static const unsigned short int gb18030_twobyte_lookup[] = {
|
||||
0x0144, 0xA8BD,
|
||||
0x0148, 0xA8BE,
|
||||
0x01F9, 0xA8BF,
|
||||
@ -16527,7 +16527,7 @@ static const unsigned long int gb18030_twobyte_lookup[] = {
|
||||
0xFFE4, 0xA957
|
||||
};
|
||||
|
||||
static const unsigned long int gb18030_fourbyte_lookup[] = {
|
||||
static const unsigned short int gb18030_fourbyte_lookup[] = {
|
||||
0x0080, 0x8130, 0x8130,
|
||||
0x0081, 0x8130, 0x8131,
|
||||
0x0082, 0x8130, 0x8132,
|
||||
|
@ -29,7 +29,7 @@
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static const unsigned long int gb2312_lookup[] = {
|
||||
static const unsigned short int gb2312_lookup[] = {
|
||||
0x00A4, 0xA1E8,
|
||||
0x00A7, 0xA1EC,
|
||||
0x00A8, 0xA1A7,
|
||||
|
@ -153,7 +153,7 @@ static const int gm_ebeb[] = {
|
||||
61, 9, 60, 3
|
||||
};
|
||||
|
||||
static const int gm_macro_matrix[] = {
|
||||
static const unsigned short int gm_macro_matrix[] = {
|
||||
728, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
|
||||
727, 624, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 651,
|
||||
726, 623, 528, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 553, 652,
|
||||
|
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
/* Data from table B1: Data capacity of Han Xin Code */
|
||||
static const int hx_total_codewords[] = {
|
||||
static const unsigned short int hx_total_codewords[] = {
|
||||
25, 37, 50, 54, 69, 84, 100, 117, 136, 155, 161, 181, 203, 225, 249,
|
||||
273, 299, 325, 353, 381, 411, 422, 453, 485, 518, 552, 587, 623, 660,
|
||||
698, 737, 754, 794, 836, 878, 922, 966, 1011, 1058, 1105, 1126, 1175,
|
||||
@ -41,7 +41,7 @@ static const int hx_total_codewords[] = {
|
||||
3500, 3585, 3671, 3758, 3798, 3886
|
||||
};
|
||||
|
||||
static const int hx_data_codewords_L1[] = {
|
||||
static const unsigned short int hx_data_codewords_L1[] = {
|
||||
21, 31, 42, 46, 57, 70, 84, 99, 114, 131, 135, 153, 171, 189, 209, 229,
|
||||
251, 273, 297, 321, 345, 354, 381, 407, 436, 464, 493, 523, 554, 586, 619,
|
||||
634, 666, 702, 738, 774, 812, 849, 888, 929, 946, 987, 1028, 1071, 1115,
|
||||
@ -51,7 +51,7 @@ static const int hx_data_codewords_L1[] = {
|
||||
3083, 3156, 3190, 3264
|
||||
};
|
||||
|
||||
static const int hx_data_codewords_L2[] = {
|
||||
static const unsigned short int hx_data_codewords_L2[] = {
|
||||
17, 25, 34, 38, 49, 58, 70, 81, 96, 109, 113, 127, 143, 157, 175, 191, 209,
|
||||
227, 247, 267, 287, 296, 317, 339, 362, 386, 411, 437, 462, 488, 515, 528,
|
||||
556, 586, 614, 646, 676, 707, 740, 773, 788, 823, 856, 893, 929, 966, 1004,
|
||||
@ -61,7 +61,7 @@ static const int hx_data_codewords_L2[] = {
|
||||
2720
|
||||
};
|
||||
|
||||
static const int hx_data_codewords_L3[] = {
|
||||
static const unsigned short int hx_data_codewords_L3[] = {
|
||||
13, 19, 26, 30, 37, 46, 54, 63, 74, 83, 87, 97, 109, 121, 135, 147, 161,
|
||||
175, 191, 205, 221, 228, 245, 261, 280, 298, 317, 337, 358, 376, 397, 408,
|
||||
428, 452, 474, 498, 522, 545, 572, 597, 608, 635, 660, 689, 717, 746, 774,
|
||||
@ -70,7 +70,7 @@ static const int hx_data_codewords_L3[] = {
|
||||
1713, 1756, 1800, 1844, 1890, 1935, 1983, 2030, 2050, 2098
|
||||
};
|
||||
|
||||
static const int hx_data_codewords_L4[] = {
|
||||
static const unsigned short int hx_data_codewords_L4[] = {
|
||||
9, 15, 20, 22, 27, 34, 40, 47, 54, 61, 65, 73, 81, 89, 99, 109, 119, 129,
|
||||
141, 153, 165, 168, 181, 195, 208, 220, 235, 251, 264, 280, 295, 302, 318,
|
||||
334, 352, 368, 386, 405, 424, 441, 450, 469, 490, 509, 531, 552, 574, 595, 605,
|
||||
@ -119,7 +119,7 @@ static const int hx_module_m[] = {
|
||||
};
|
||||
|
||||
/* Error correction block sizes from Table D1 */
|
||||
static const int hx_table_d1[] = {
|
||||
static const unsigned short int hx_table_d1[] = {
|
||||
/* #blocks, k, 2t, #blocks, k, 2t, #blocks, k, 2t */
|
||||
1, 21, 4, 0, 0, 0, 0, 0, 0, // version 1
|
||||
1, 17, 8, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008-2016 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2017 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -30,7 +30,7 @@
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static const int MaxiGrid[] = {
|
||||
static const unsigned short int MaxiGrid[] = {
|
||||
/* ISO/IEC 16023 Figure 5 - MaxiCode Module Sequence */ /* 30 x 33 data grid */
|
||||
122, 121, 128, 127, 134, 133, 140, 139, 146, 145, 152, 151, 158, 157, 164, 163, 170, 169, 176, 175, 182, 181, 188, 187, 194, 193, 200, 199, 0, 0,
|
||||
124, 123, 130, 129, 136, 135, 142, 141, 148, 147, 154, 153, 160, 159, 166, 165, 172, 171, 178, 177, 184, 183, 190, 189, 196, 195, 202, 201, 817, 0,
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define NUM 902
|
||||
|
||||
/* PDF417 error correction coefficients from Grand Zebu */
|
||||
static const int coefrs[1022] = {
|
||||
static const unsigned short int coefrs[1022] = {
|
||||
/* k = 2 */
|
||||
27, 917,
|
||||
|
||||
@ -127,7 +127,7 @@ static const int coefrs[1022] = {
|
||||
63, 310, 863, 251, 366, 304, 282, 738, 675, 410, 389, 244, 31, 121, 303, 263
|
||||
};
|
||||
|
||||
static const int pdf_bitpattern[2787] = {
|
||||
static const unsigned short int pdf_bitpattern[2787] = {
|
||||
0xEAE0, 0xF578, 0xFABE, 0xEA70, 0xF53C, 0xFA9F, 0xD460, 0xEA38, 0xD430, 0xA820,
|
||||
0xD418, 0xA810, 0xD6E0, 0xEB78, 0xF5BE, 0xD670, 0xEB3C, 0xF59F, 0xAC60, 0xD638,
|
||||
0xAC30, 0xAEE0, 0xD778, 0xEBBE, 0xAE70, 0xD73C, 0xEB9F, 0xAE38, 0xD71E, 0xAF78,
|
||||
@ -410,7 +410,7 @@ static const int pdf_bitpattern[2787] = {
|
||||
};
|
||||
|
||||
/* MicroPDF417 coefficients from ISO/IEC 24728:2006 Annex F */
|
||||
static const int Microcoeffs[344] = {
|
||||
static const unsigned short int Microcoeffs[344] = {
|
||||
/* k = 7 */
|
||||
76, 925, 537, 597, 784, 691, 437,
|
||||
|
||||
@ -492,7 +492,7 @@ static const int RAPTable[136] ={
|
||||
};
|
||||
|
||||
/* Left and Right Row Address Pattern from Table 2 */
|
||||
static const int rap_side[52] = {
|
||||
static const unsigned short int rap_side[52] = {
|
||||
0x322, 0x3A2, 0x3B2, 0x332, 0x372, 0x37A, 0x33A, 0x3BA, 0x39A, 0x3DA,
|
||||
0x3CA, 0x38A, 0x30A, 0x31A, 0x312, 0x392, 0x3D2, 0x3D6, 0x3D4, 0x394,
|
||||
0x3B4, 0x3A4, 0x3A6, 0x3AE, 0x3AC, 0x3A8, 0x328, 0x32C, 0x32E, 0x326,
|
||||
@ -502,7 +502,7 @@ static const int rap_side[52] = {
|
||||
};
|
||||
|
||||
/* Centre Row Address Pattern from Table 2 */
|
||||
static const int rap_centre[52] = {
|
||||
static const unsigned short int rap_centre[52] = {
|
||||
0x2CE, 0x24E, 0x26E, 0x22E, 0x226, 0x236, 0x216, 0x212, 0x21A, 0x23A,
|
||||
0x232, 0x222, 0x262, 0x272, 0x27A, 0x2FA, 0x2F2, 0x2F6, 0x276, 0x274,
|
||||
0x264, 0x266, 0x246, 0x242, 0x2C2, 0x2E2, 0x2E6, 0x2E4, 0x2EC, 0x26C,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008-2016 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2017 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2006 Kentaro Fukuchi <fukuchi@megaui.net>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -144,14 +144,14 @@ static int qr_table_e1[] = {
|
||||
6, 30, 58, 86, 114, 142, 170
|
||||
};
|
||||
|
||||
static unsigned int qr_annex_c[] = {
|
||||
static const unsigned int qr_annex_c[] = {
|
||||
/* Format information bit sequences */
|
||||
0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, 0x77c4, 0x72f3, 0x7daa, 0x789d,
|
||||
0x662f, 0x6318, 0x6c41, 0x6976, 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b,
|
||||
0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed
|
||||
};
|
||||
|
||||
static long int qr_annex_d[] = {
|
||||
static const unsigned int qr_annex_d[] = {
|
||||
/* Version information bit sequences */
|
||||
0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78,
|
||||
0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab,
|
||||
@ -159,7 +159,7 @@ static long int qr_annex_d[] = {
|
||||
0x2542e, 0x26a64, 0x27541, 0x28c69
|
||||
};
|
||||
|
||||
static int qr_annex_c1[] = {
|
||||
static const unsigned int qr_annex_c1[] = {
|
||||
/* Micro QR Code format information */
|
||||
0x4445, 0x4172, 0x4e2b, 0x4b1c, 0x55ae, 0x5099, 0x5fc0, 0x5af7, 0x6793, 0x62a4, 0x6dfd, 0x68ca, 0x7678, 0x734f,
|
||||
0x7c16, 0x7921, 0x06de, 0x03e9, 0x0cb0, 0x0987, 0x1735, 0x1202, 0x1d5b, 0x186c, 0x2508, 0x203f, 0x2f66, 0x2a51, 0x34e3,
|
||||
|
@ -39,7 +39,7 @@
|
||||
## You can use, modify, distribute this table freely.
|
||||
*/
|
||||
|
||||
unsigned long int sjis_lookup[] = {
|
||||
static const unsigned short int sjis_lookup[] = {
|
||||
0x005C, 0x815F, // REVERSE SOLIDUS
|
||||
0x00A2, 0x8191, // CENT SIGN
|
||||
0x00A3, 0x8192, // POUND SIGN
|
||||
|
Loading…
Reference in New Issue
Block a user