diff options
author | Denys Vlasenko | 2010-09-16 17:51:13 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-09-16 17:51:13 +0200 |
commit | 9fe98f701d40835db32baa12c94b661d40231ea4 (patch) | |
tree | 781c9c71519f3eb79082eac54e0cc545e16b2fd1 /include | |
parent | 52e460b7440ed5b85e4125a4eccf1e665d92c0ff (diff) | |
download | busybox-9fe98f701d40835db32baa12c94b661d40231ea4.zip busybox-9fe98f701d40835db32baa12c94b661d40231ea4.tar.gz |
libbb: merge mail and uudecode's base64 decoders
function old new delta
read_base64 - 378 +378
uudecode_main 306 315 +9
parse 953 958 +5
read_stduu 250 254 +4
base64_main 217 219 +2
read_base64 358 - -358
decode_base64 371 - -371
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729) Total: -331 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index d5580b4..8d7beff 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1505,6 +1505,12 @@ unsigned get_cpu_count(void) FAST_FUNC; extern const char bb_uuenc_tbl_base64[]; extern const char bb_uuenc_tbl_std[]; void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; +enum { + BASE64_FLAG_UU_STOP = 0x100, + /* Sign-extends to a value which never matches fgetc result: */ + BASE64_FLAG_NO_STOP_CHAR = 0x80, +}; +void FAST_FUNC read_base64(FILE *src_stream, FILE *dst_stream, int flags); typedef struct sha1_ctx_t { uint32_t hash[8]; /* 5, +3 elements for sha256 */ |