From c64411a38a25e696edb33e49f8917012d0cd4cba Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Wed, 30 Apr 2008 17:40:38 -0400 Subject: 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 --- src/base64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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")); -- cgit v1.2.3-70-g09d2