aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 11:30:17 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 11:30:17 +0100
commit2fba2f5bb99145eaa1635fe5a162426158d56a2c (patch)
tree9ab691842c6576fe48cca7df9fd4732b5d6d4093
parent33e955ab91d2f76bd8ea6e12fce215d863f4d7d7 (diff)
downloadbusybox-w32-2fba2f5bb99145eaa1635fe5a162426158d56a2c.tar.gz
busybox-w32-2fba2f5bb99145eaa1635fe5a162426158d56a2c.tar.bz2
busybox-w32-2fba2f5bb99145eaa1635fe5a162426158d56a2c.zip
unicode: relax array alignment for tables
text data bss dec hex filename 1022075 559 5052 1027686 fae66 busybox_old 1021988 559 5052 1027599 fae0f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/unicode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/unicode.c b/libbb/unicode.c
index bfeaef895..e98cbbf35 100644
--- a/libbb/unicode.c
+++ b/libbb/unicode.c
@@ -25,7 +25,7 @@ uint8_t unicode_status;
25 25
26void FAST_FUNC reinit_unicode(const char *LANG) 26void FAST_FUNC reinit_unicode(const char *LANG)
27{ 27{
28 static const char unicode_0x394[] = { 0xce, 0x94, 0 }; 28 static const char unicode_0x394[] ALIGN1 = { 0xce, 0x94, 0 };
29 size_t width; 29 size_t width;
30 30
31 /* We pass "" instead of "C" because some libc's have 31 /* We pass "" instead of "C" because some libc's have
@@ -589,12 +589,12 @@ int FAST_FUNC wcwidth(unsigned ucs)
589 BIG_(0xFE20, 0xFE23) \ 589 BIG_(0xFE20, 0xFE23) \
590 BIG_(0xFEFF, 0xFEFF) \ 590 BIG_(0xFEFF, 0xFEFF) \
591 BIG_(0xFFF9, 0xFFFB) 591 BIG_(0xFFF9, 0xFFFB)
592 static const struct interval combining[] = { ARRAY }; 592 static const struct interval combining[] ALIGN4 = { ARRAY };
593# undef BIG_ 593# undef BIG_
594# undef PAIR 594# undef PAIR
595# define BIG_(a,b) 595# define BIG_(a,b)
596# define PAIR(a,b) (a << 2) | (b-a), 596# define PAIR(a,b) (a << 2) | (b-a),
597 static const uint16_t combining1[] = { ARRAY }; 597 static const uint16_t combining1[] ALIGN2 = { ARRAY };
598# undef BIG_ 598# undef BIG_
599# undef PAIR 599# undef PAIR
600# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1]; 600# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1];
@@ -648,7 +648,7 @@ int FAST_FUNC wcwidth(unsigned ucs)
648# if CONFIG_LAST_SUPPORTED_WCHAR >= 0x10000 648# if CONFIG_LAST_SUPPORTED_WCHAR >= 0x10000
649 if (ucs >= 0x10000) { 649 if (ucs >= 0x10000) {
650 /* Combining chars in Supplementary Multilingual Plane 0x1xxxx */ 650 /* Combining chars in Supplementary Multilingual Plane 0x1xxxx */
651 static const struct interval combining0x10000[] = { 651 static const struct interval combining0x10000[] ALIGN4 = {
652 { 0x0A01, 0x0A03 }, { 0x0A05, 0x0A06 }, { 0x0A0C, 0x0A0F }, 652 { 0x0A01, 0x0A03 }, { 0x0A05, 0x0A06 }, { 0x0A0C, 0x0A0F },
653 { 0x0A38, 0x0A3A }, { 0x0A3F, 0x0A3F }, { 0xD167, 0xD169 }, 653 { 0x0A38, 0x0A3A }, { 0x0A3F, 0x0A3F }, { 0xD167, 0xD169 },
654 { 0xD173, 0xD182 }, { 0xD185, 0xD18B }, { 0xD1AA, 0xD1AD }, 654 { 0xD173, 0xD182 }, { 0xD185, 0xD18B }, { 0xD1AA, 0xD1AD },
@@ -759,12 +759,12 @@ int FAST_FUNC unicode_bidi_isrtl(wint_t wc)
759 {0x10E7F, 0x10FFF}, 759 {0x10E7F, 0x10FFF},
760 {0x1E800, 0x1EFFF} 760 {0x1E800, 0x1EFFF}
761 */ 761 */
762 static const struct interval rtl_b[] = { ARRAY }; 762 static const struct interval rtl_b[] ALIGN4 = { ARRAY };
763# undef BIG_ 763# undef BIG_
764# undef PAIR 764# undef PAIR
765# define BIG_(a,b) 765# define BIG_(a,b)
766# define PAIR(a,b) (a << 2) | (b-a), 766# define PAIR(a,b) (a << 2) | (b-a),
767 static const uint16_t rtl_p[] = { ARRAY }; 767 static const uint16_t rtl_p[] ALIGN2 = { ARRAY };
768# undef BIG_ 768# undef BIG_
769# undef PAIR 769# undef PAIR
770# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1]; 770# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1];
@@ -963,12 +963,12 @@ int FAST_FUNC unicode_bidi_is_neutral_wchar(wint_t wc)
963 {0x1F030, 0x1F093}, 963 {0x1F030, 0x1F093},
964 {0x1F100, 0x1F10A} 964 {0x1F100, 0x1F10A}
965 */ 965 */
966 static const struct interval neutral_b[] = { ARRAY }; 966 static const struct interval neutral_b[] ALIGN4 = { ARRAY };
967# undef BIG_ 967# undef BIG_
968# undef PAIR 968# undef PAIR
969# define BIG_(a,b) 969# define BIG_(a,b)
970# define PAIR(a,b) (a << 2) | (b-a), 970# define PAIR(a,b) (a << 2) | (b-a),
971 static const uint16_t neutral_p[] = { ARRAY }; 971 static const uint16_t neutral_p[] ALIGN2 = { ARRAY };
972# undef BIG_ 972# undef BIG_
973# undef PAIR 973# undef PAIR
974# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1]; 974# define BIG_(a,b) char big_##a[b < 0x4000 && b-a <= 3 ? -1 : 1];