aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-mime-utils.c8
-rw-r--r--camel/camel-mime-utils.h4
-rw-r--r--camel/camel-search-private.c2
4 files changed, 14 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 99235d0922..aea071af4d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-28 Not Zed <NotZed@Ximian.com>
+
+ * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
+ recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
+ smtp max line size) as the hard limit for any output.
+
2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 257c0e323e..b908f86059 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -4080,11 +4080,11 @@ header_fold(const char *in, size_t headerlen)
g_string_append(out, "\n\t");
outlen = 1;
/* check for very long words, just cut them up */
- while (outlen+len > CAMEL_FOLD_SIZE) {
- for (i=0;i<CAMEL_FOLD_SIZE-outlen;i++)
+ while (outlen+len > CAMEL_FOLD_MAX_SIZE) {
+ for (i=0;i<CAMEL_FOLD_MAX_SIZE-outlen;i++)
g_string_append_c(out, inptr[i]);
- inptr += CAMEL_FOLD_SIZE-outlen;
- len -= CAMEL_FOLD_SIZE-outlen;
+ inptr += CAMEL_FOLD_MAX_SIZE-outlen;
+ len -= CAMEL_FOLD_MAX_SIZE-outlen;
g_string_append(out, "\n\t");
outlen = 1;
}
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index 50a3eb856b..f2327ae6d0 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -25,8 +25,10 @@
#include <time.h>
#include <glib.h>
-/* maximum size of a line from header_fold() */
+/* maximum recommended size of a line from header_fold() */
#define CAMEL_FOLD_SIZE (77)
+/* maximum hard size of a line from header_fold() */
+#define CAMEL_FOLD_MAX_SIZE (998)
#define CAMEL_UUDECODE_STATE_INIT (0)
#define CAMEL_UUDECODE_STATE_BEGIN (1 << 16)
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index a8b73525ae..6ecb64a1ae 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -347,7 +347,7 @@ header_match(const char *value, const char *match, camel_search_match_t how)
if (how == CAMEL_SEARCH_MATCH_SOUNDEX)
return header_soundex (value, match);
-
+
vlen = strlen(value);
mlen = strlen(match);
if (vlen < mlen)