diff src/libstrfunc.c @ 257:c947b8812120

rfc2047 and rfc2231 encoding for non-ascii headers and attachment filenames
author Carl Byington <carl@five-ten-sg.com>
date Fri, 24 Dec 2010 19:26:05 -0800
parents 6954d315aaa8
children
line wrap: on
line diff
--- a/src/libstrfunc.c	Mon Sep 13 15:10:52 2010 -0700
+++ b/src/libstrfunc.c	Fri Dec 24 19:26:05 2010 -0800
@@ -14,7 +14,7 @@
         *line_count = 0;
     }
     *(*ou)++ = data;
-    (*line_count)++;
+    if (*line_count >= 0) (*line_count)++;
 }
 
 
@@ -25,6 +25,13 @@
 }
 
 
+char *pst_base64_encode_single(void *data, size_t size)
+{
+    int line_count = -1;
+    return pst_base64_encode_multiple(data, size, &line_count);
+}
+
+
 char *pst_base64_encode_multiple(void *data, size_t size, int *line_count)
 {
     char *output;