diff options
author | Denys Vlasenko | 2020-11-28 12:48:34 +0100 |
---|---|---|
committer | Denys Vlasenko | 2020-11-28 12:48:34 +0100 |
commit | fc6faac84e978c9482106f53e711ab971a0ce188 (patch) | |
tree | 0831d4e33bbcd1949b8a9665a5c215b09bbfe08b /libbb | |
parent | f140b49f5f631b09acf7811933d843fe17f06343 (diff) | |
download | busybox-fc6faac84e978c9482106f53e711ab971a0ce188.zip busybox-fc6faac84e978c9482106f53e711ab971a0ce188.tar.gz |
libbb: trim base32/64 tables
function old new delta
bb_uuenc_tbl_base64 66 65 -1
bb_uuenc_tbl_base32 34 32 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/uuencode.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/libbb/uuencode.c b/libbb/uuencode.c index 6205af2..139c60b 100644 --- a/libbb/uuencode.c +++ b/libbb/uuencode.c @@ -9,8 +9,17 @@ #include "libbb.h" /* Conversion tables */ +#if ENABLE_BASE32 +const char bb_uuenc_tbl_base32[] ALIGN1 = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', '2', '3', '4', '5', '6', '7', + /* unused: '=', */ +}; +#endif /* for base 64 */ -const char bb_uuenc_tbl_base64[65 + 1] ALIGN1 = { +const char bb_uuenc_tbl_base64[] ALIGN1 = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', @@ -20,19 +29,8 @@ const char bb_uuenc_tbl_base64[65 + 1] ALIGN1 = { 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '=' /* termination character */, - '\0' /* needed for uudecode.c only */ }; -#if ENABLE_BASE32 -const char bb_uuenc_tbl_base32[33 + 1] ALIGN1 = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', - 'Y', 'Z', '2', '3', '4', '5', '6', '7', - '=', - '\0' -}; -#endif -const char bb_uuenc_tbl_std[65] ALIGN1 = { +const char bb_uuenc_tbl_std[] ALIGN1 = { '`', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', |