aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-28 12:48:34 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-28 12:48:34 +0100
commitfc6faac84e978c9482106f53e711ab971a0ce188 (patch)
tree0831d4e33bbcd1949b8a9665a5c215b09bbfe08b
parentf140b49f5f631b09acf7811933d843fe17f06343 (diff)
downloadbusybox-w32-fc6faac84e978c9482106f53e711ab971a0ce188.tar.gz
busybox-w32-fc6faac84e978c9482106f53e711ab971a0ce188.tar.bz2
busybox-w32-fc6faac84e978c9482106f53e711ab971a0ce188.zip
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>
-rw-r--r--libbb/uuencode.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/libbb/uuencode.c b/libbb/uuencode.c
index 6205af261..139c60bd5 100644
--- a/libbb/uuencode.c
+++ b/libbb/uuencode.c
@@ -9,8 +9,17 @@
9#include "libbb.h" 9#include "libbb.h"
10 10
11/* Conversion tables */ 11/* Conversion tables */
12#if ENABLE_BASE32
13const char bb_uuenc_tbl_base32[] ALIGN1 = {
14 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
15 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
16 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
17 'Y', 'Z', '2', '3', '4', '5', '6', '7',
18 /* unused: '=', */
19};
20#endif
12/* for base 64 */ 21/* for base 64 */
13const char bb_uuenc_tbl_base64[65 + 1] ALIGN1 = { 22const char bb_uuenc_tbl_base64[] ALIGN1 = {
14 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 23 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
15 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 24 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
16 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 25 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
@@ -20,19 +29,8 @@ const char bb_uuenc_tbl_base64[65 + 1] ALIGN1 = {
20 'w', 'x', 'y', 'z', '0', '1', '2', '3', 29 'w', 'x', 'y', 'z', '0', '1', '2', '3',
21 '4', '5', '6', '7', '8', '9', '+', '/', 30 '4', '5', '6', '7', '8', '9', '+', '/',
22 '=' /* termination character */, 31 '=' /* termination character */,
23 '\0' /* needed for uudecode.c only */
24}; 32};
25#if ENABLE_BASE32 33const char bb_uuenc_tbl_std[] ALIGN1 = {
26const char bb_uuenc_tbl_base32[33 + 1] ALIGN1 = {
27 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
28 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
29 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
30 'Y', 'Z', '2', '3', '4', '5', '6', '7',
31 '=',
32 '\0'
33};
34#endif
35const char bb_uuenc_tbl_std[65] ALIGN1 = {
36 '`', '!', '"', '#', '$', '%', '&', '\'', 34 '`', '!', '"', '#', '$', '%', '&', '\'',
37 '(', ')', '*', '+', ',', '-', '.', '/', 35 '(', ')', '*', '+', ',', '-', '.', '/',
38 '0', '1', '2', '3', '4', '5', '6', '7', 36 '0', '1', '2', '3', '4', '5', '6', '7',