[glib] g_base64_encode_step: clarify break_lines behavior a bit



commit 3691194b357aa5a045f8f87658150670834f45c2
Author: Dan Winship <danw gnome org>
Date:   Wed Jan 18 09:02:21 2012 -0500

    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

 glib/gbase64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/gbase64.c b/glib/gbase64.c
index d3c26a2..5839936 100644
--- a/glib/gbase64.c
+++ b/glib/gbase64.c
@@ -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
  *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]