summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBo Borgerson <gigabo@gmail.com>2008-04-30 17:40:38 -0400
committerJim Meyering <meyering@redhat.com>2008-05-05 17:57:41 +0200
commitc64411a38a25e696edb33e49f8917012d0cd4cba (patch)
treeba9d728482ddbc89202fbc551f0ee6f044418b9b /src
parentfcd450ecb9121c3e2f9c11a5c0ed037b347730fa (diff)
downloadcoreutils-c64411a38a25e696edb33e49f8917012d0cd4cba.tar.xz
base64 module: adjust API so it's compatible with gnulib's
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in, treat newlines as garbage (this is the historical behavior). Formerly base64_decode. (base64_decode_alloc_ctx): Formerly base64_decode_alloc. * gl/lib/base64.h (base64_decode): Macro for four-argument calls. (base64_decode_alloc): Likewise. * src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/base64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base64.c b/src/base64.c
index aa2fc8fd6..983b8cb88 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -223,7 +223,7 @@ do_decode (FILE *in, FILE *out, bool ignore_garbage)
if (k == 1 && ctx.i == 0)
break;
n = BLOCKSIZE;
- ok = base64_decode (&ctx, inbuf, (k == 0 ? sum : 0), outbuf, &n);
+ ok = base64_decode_ctx (&ctx, inbuf, (k == 0 ? sum : 0), outbuf, &n);
if (fwrite (outbuf, 1, n, out) < n)
error (EXIT_FAILURE, errno, _("write error"));