mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-18 00:54:36 -04:00
Make data types for tables consistent across symbologies
..and reduce library binary size slightly
This commit is contained in:
parent
50ec72527b
commit
1ca01e9322
15 changed files with 98 additions and 98 deletions
|
@ -38,32 +38,32 @@
|
|||
#define ALPHA_OR_ISO 121
|
||||
|
||||
/* RSS-14 Tables */
|
||||
static int g_sum_table[9] = {
|
||||
static const unsigned short int g_sum_table[9] = {
|
||||
0, 161, 961, 2015, 2715, 0, 336, 1036, 1516
|
||||
};
|
||||
|
||||
static int t_table[9] = {
|
||||
static const char t_table[9] = {
|
||||
1, 10, 34, 70, 126, 4, 20, 48, 81
|
||||
};
|
||||
|
||||
static int modules_odd[9] = {
|
||||
static const char modules_odd[9] = {
|
||||
12, 10, 8, 6, 4, 5, 7, 9, 11
|
||||
};
|
||||
|
||||
static int modules_even[9] = {
|
||||
static const char modules_even[9] = {
|
||||
4, 6, 8, 10, 12, 10, 8, 6, 4
|
||||
};
|
||||
|
||||
static int widest_odd[9] = {
|
||||
static const char widest_odd[9] = {
|
||||
8, 6, 4, 3, 1, 2, 4, 6, 8
|
||||
};
|
||||
|
||||
static int widest_even[9] = {
|
||||
static const char widest_even[9] = {
|
||||
1, 3, 5, 6, 8, 7, 5, 3, 1
|
||||
};
|
||||
|
||||
static int widths[8];
|
||||
static int finder_pattern[45] = {
|
||||
static const char finder_pattern[45] = {
|
||||
3, 8, 2, 1, 1,
|
||||
3, 5, 5, 1, 1,
|
||||
3, 3, 7, 1, 1,
|
||||
|
@ -75,7 +75,7 @@ static int finder_pattern[45] = {
|
|||
1, 3, 9, 1, 1
|
||||
};
|
||||
|
||||
static int checksum_weight[32] = {
|
||||
static const char checksum_weight[32] = {
|
||||
/* Table 5 */
|
||||
1, 3, 9, 27, 2, 6, 18, 54,
|
||||
4, 12, 36, 29, 8, 24, 72, 58,
|
||||
|
@ -84,33 +84,33 @@ static int checksum_weight[32] = {
|
|||
};
|
||||
|
||||
/* RSS Limited Tables */
|
||||
static int t_even_ltd[7] = {
|
||||
static const unsigned short int t_even_ltd[7] = {
|
||||
28, 728, 6454, 203, 2408, 1, 16632
|
||||
};
|
||||
|
||||
static int modules_odd_ltd[7] = {
|
||||
static const char modules_odd_ltd[7] = {
|
||||
17, 13, 9, 15, 11, 19, 7
|
||||
};
|
||||
|
||||
static int modules_even_ltd[7] = {
|
||||
static const char modules_even_ltd[7] = {
|
||||
9, 13, 17, 11, 15, 7, 19
|
||||
};
|
||||
|
||||
static int widest_odd_ltd[7] = {
|
||||
static const char widest_odd_ltd[7] = {
|
||||
6, 5, 3, 5, 4, 8, 1
|
||||
};
|
||||
|
||||
static int widest_even_ltd[7] = {
|
||||
static const char widest_even_ltd[7] = {
|
||||
3, 4, 6, 4, 5, 1, 8
|
||||
};
|
||||
|
||||
static int checksum_weight_ltd[28] = {
|
||||
static const char checksum_weight_ltd[28] = {
|
||||
/* Table 7 */
|
||||
1, 3, 9, 27, 81, 65, 17, 51, 64, 14, 42, 37, 22, 66,
|
||||
20, 60, 2, 6, 18, 54, 73, 41, 34, 13, 39, 28, 84, 74
|
||||
};
|
||||
|
||||
static int finder_pattern_ltd[1246] = {
|
||||
static const char finder_pattern_ltd[1246] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1,
|
||||
|
@ -203,31 +203,31 @@ static int finder_pattern_ltd[1246] = {
|
|||
};
|
||||
|
||||
/* RSS Expanded Tables */
|
||||
static int g_sum_exp[5] = {
|
||||
static const unsigned short int g_sum_exp[5] = {
|
||||
0, 348, 1388, 2948, 3988
|
||||
};
|
||||
|
||||
static int t_even_exp[5] = {
|
||||
static const unsigned short int t_even_exp[5] = {
|
||||
4, 20, 52, 104, 204
|
||||
};
|
||||
|
||||
static int modules_odd_exp[5] = {
|
||||
static const char modules_odd_exp[5] = {
|
||||
12, 10, 8, 6, 4
|
||||
};
|
||||
|
||||
static int modules_even_exp[5] = {
|
||||
static const char modules_even_exp[5] = {
|
||||
5, 7, 9, 11, 13
|
||||
};
|
||||
|
||||
static int widest_odd_exp[5] = {
|
||||
static const char widest_odd_exp[5] = {
|
||||
7, 5, 4, 3, 1
|
||||
};
|
||||
|
||||
static int widest_even_exp[5] = {
|
||||
static const char widest_even_exp[5] = {
|
||||
2, 4, 5, 6, 8
|
||||
};
|
||||
|
||||
static int checksum_weight_exp[184] = {
|
||||
static const unsigned short int checksum_weight_exp[184] = {
|
||||
/* Table 14 */
|
||||
1, 3, 9, 27, 81, 32, 96, 77,
|
||||
20, 60, 180, 118, 143, 7, 21, 63,
|
||||
|
@ -254,7 +254,7 @@ static int checksum_weight_exp[184] = {
|
|||
45, 135, 194, 160, 58, 174, 100, 89
|
||||
};
|
||||
|
||||
static int finder_pattern_exp[60] = {
|
||||
static const char finder_pattern_exp[60] = {
|
||||
/* Table 15 */
|
||||
1, 8, 4, 1, 1,
|
||||
1, 1, 4, 8, 1,
|
||||
|
@ -270,7 +270,7 @@ static int finder_pattern_exp[60] = {
|
|||
1, 1, 9, 2, 2
|
||||
};
|
||||
|
||||
static int finder_sequence[198] = {
|
||||
static const char finder_sequence[198] = {
|
||||
/* Table 16 */
|
||||
1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -284,7 +284,7 @@ static int finder_sequence[198] = {
|
|||
1, 2, 3, 4, 5, 8, 7, 10, 9, 12, 11
|
||||
};
|
||||
|
||||
static int weight_rows[210] = {
|
||||
static const char weight_rows[210] = {
|
||||
0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 5, 6, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 9, 10, 3, 4, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue