g_base64_encode_step: clarify break_lines behavior a bit

break_lines uses LFs, not CRLFs like you might expect (since it's
designed for email-related use), but we can't change that now since
the caller has to allocate the output buffer and so the
number-of-bytes-output is part of the ABI. So, just document that.

https://bugzilla.gnome.org/show_bug.cgi?id=668158
This commit is contained in:
Dan Winship 2012-01-18 09:02:21 -05:00
parent 08036ce303
commit 3691194b35

View File

@ -81,6 +81,9 @@ static const char base64_alphabet[] =
* @break_lines is typically used when putting base64-encoded data in emails.
* It breaks the lines at 72 columns instead of putting all of the text on
* the same line. This avoids problems with long lines in the email system.
* Note however that it breaks the lines with <literal>LF</literal>
* characters, not <literal>CR LF</literal> sequences, so the result cannot
* be passed directly to SMTP or certain other protocols.
*
* Return value: The number of bytes of output that was written
*