From 1bfe9b869ebcc5c9647e194617a7de5e4787da68 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Mon, 11 Jul 2011 15:11:24 -0700 Subject: [PATCH] mime.h: better comments Signed-off-by: Colin McCabe --- src/common/mime.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/mime.h b/src/common/mime.h index 625d5520d0b88..f62040a22cd83 100644 --- a/src/common/mime.h +++ b/src/common/mime.h @@ -20,6 +20,10 @@ extern "C" { #endif /* Encode a buffer as quoted-printable. + * + * The input is a null-terminated string. + * The output is a null-terminated string representing the input encoded as + * a MIME quoted-printable. * * Returns the length of the buffer we would need to do the encoding. * If we don't have enough buffer space, the output will be truncated. @@ -30,14 +34,18 @@ extern "C" { signed int mime_encode_as_qp(const char *input, char *output, int outlen); /* Decode a quoted-printable buffer. + * + * The input is a null-terminated string encoded as a MIME quoted-printable. + * The output is a null-terminated string representing the input decoded. * * Returns a negative error code if the input is not a valid quoted-printable * buffer. * Returns the length of the buffer we would need to do the encoding. * If we don't have enough buffer space, the output will be truncated. * - * You may call mime_encode_as_qp(input, NULL, 0) to find the size of the - * buffer you will need. + * You may call mime_decode_as_qp(input, NULL, 0) to find the size of the + * buffer you will need. The output will never be longer than the input for + * this function. */ signed int mime_decode_from_qp(const char *input, char *output, int outlen); -- 2.39.5