aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-26 15:59:37 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-26 15:59:37 +0000
commite8240f19bd99802e0ccb1738b2d2e630b6eb9087 (patch)
treed9b7c5da8a146e809140d0c8c9e270df765159f9 /libbb
parent1fc6238ffab2cbd09b9ce573b99d82f3eaeb5b77 (diff)
downloadbusybox-w32-e8240f19bd99802e0ccb1738b2d2e630b6eb9087.tar.gz
busybox-w32-e8240f19bd99802e0ccb1738b2d2e630b6eb9087.tar.bz2
busybox-w32-e8240f19bd99802e0ccb1738b2d2e630b6eb9087.zip
uuencode: shrink
function old new delta uuencode_main 427 337 -90 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-90) Total: -90 bytes text data bss dec hex filename 734981 3028 14400 752409 b7b19 busybox_old 734889 3028 14400 752317 b7abd busybox_unstripped
Diffstat (limited to 'libbb')
-rw-r--r--libbb/uuencode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/uuencode.c b/libbb/uuencode.c
index bbb92d600..08fe3f366 100644
--- a/libbb/uuencode.c
+++ b/libbb/uuencode.c
@@ -34,14 +34,15 @@ const char bb_uuenc_tbl_std[65] = {
34}; 34};
35 35
36/* 36/*
37 * Encode the string S of length LENGTH to base64 format and place it 37 * Encode bytes at S of length LENGTH to uuencode or base64 format and place it
38 * to STORE. STORE will be 0-terminated, and must point to a writable 38 * to STORE. STORE will be 0-terminated, and must point to a writable
39 * buffer of at least 1+BASE64_LENGTH(length) bytes. 39 * buffer of at least 1+BASE64_LENGTH(length) bytes.
40 * where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3)) 40 * where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3))
41 */ 41 */
42void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl) 42void bb_uuencode(char *store, const void *src, int length, const char *tbl)
43{ 43{
44 int i; 44 int i;
45 const unsigned char *s = src;
45 char *p = store; 46 char *p = store;
46 47
47 /* Transform the 3x8 bits to 4x6 bits, as required by base64. */ 48 /* Transform the 3x8 bits to 4x6 bits, as required by base64. */