[gmime] Fixed QP_ENCODE_LEN macro



commit c4a478ad2e56573a6edf3cb94091654ec09c6f49
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri May 14 10:34:22 2010 -0400

    Fixed QP_ENCODE_LEN macro
    
    2010-05-14  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Fixed to take
    	into acount the possibility of having to force-wrap lines at 72+
    	characters.

 ChangeLog               |    6 ++++++
 gmime/gmime-encodings.h |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index df0085d..3442073 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-14  Jeffrey Stedfast  <fejj novell com>
+
+	* gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Fixed to take
+	into acount the possibility of having to force-wrap lines at 72+
+	characters.
+
 2010-05-06  Jeffrey Stedfast  <fejj novell com>
 
 	* gmime/gmime-data-wrapper.c (g_mime_data_wrapper_get_stream):
diff --git a/gmime/gmime-encodings.h b/gmime/gmime-encodings.h
index 4d6dc96..01935d0 100644
--- a/gmime/gmime-encodings.h
+++ b/gmime/gmime-encodings.h
@@ -96,7 +96,7 @@ const char *g_mime_content_encoding_to_string (GMimeContentEncoding encoding);
  * Returns: the number of output bytes needed to encode an input buffer
  * of size @x using the quoted-printable encoding.
  **/
-#define GMIME_QP_ENCODE_LEN(x)     ((size_t) ((((x) + 1) * 3) + 1))
+#define GMIME_QP_ENCODE_LEN(x)     ((size_t) ((((x) / 24) * 73) + 74))
 
 
 /**



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