From 9f492d6f811b84bf671f9f7542391e02c03179b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 11 Sep 2002 05:40:01 +0000 Subject: Revert a patch that I had not meant to commit that was aimed at fixing bug 2002-09-11 Jeffrey Stedfast * camel-mime-utils.c (header_encode_string): Revert a patch that I had not meant to commit that was aimed at fixing bug #29234. svn path=/trunk/; revision=18040 --- camel/ChangeLog | 5 +++++ camel/camel-mime-utils.c | 38 ++++++++------------------------------ 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index bc9fc2b303..b029bbcb0f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2002-09-11 Jeffrey Stedfast + + * camel-mime-utils.c (header_encode_string): Revert a patch that I + had not meant to commit that was aimed at fixing bug #29234. + 2002-09-10 Jeffrey Stedfast * camel-store-summary.c (camel_store_summary_load): Same as diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index d49c41a874..f1a3792f60 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -1338,7 +1338,7 @@ header_encode_string (const unsigned char *in) int encoding; GString *out; char *outstr; - + g_return_val_if_fail (g_utf8_validate (in, -1, NULL), NULL); if (in == NULL) @@ -1350,7 +1350,7 @@ header_encode_string (const unsigned char *in) break; inptr++; } - if (FALSE && *inptr == '\0') + if (*inptr == '\0') return g_strdup (in); /* This gets each word out of the input, and checks to see what charset @@ -1376,20 +1376,9 @@ header_encode_string (const unsigned char *in) if (g_unichar_isspace (c) && !last_was_space) { /* we've reached the end of a 'word' */ - if (word) { - int len = inptr - word; - - printf ("checking word '%.*s'\n", len, word); - if (!encoding && len > 8 && !strncmp (word, "=?", 2) && !strncmp (inptr - 2, "?=", 2)) { - printf ("yes...\n"); - encoding = 1; - } else - printf ("no...\n"); - - if (!(last_was_encoded && encoding)) { - g_string_append_len (out, start, word - start); - start = word; - } + if (word && !(last_was_encoded && encoding)) { + g_string_append_len (out, start, word - start); + start = word; } switch (encoding) { @@ -1435,20 +1424,9 @@ header_encode_string (const unsigned char *in) } if (inptr - start) { - if (word) { - int len = inptr - word; - - printf ("checking word '%.*s'\n", len, word); - if (!encoding && len > 8 && !strncmp (word, "=?", 2) && !strncmp (inptr - 3, "?=", 2)) { - printf ("yes...\n"); - encoding = 1; - } else - printf ("no...\n"); - - if (!(last_was_encoded && encoding)) { - g_string_append_len (out, start, word - start); - start = word; - } + if (word && !(last_was_encoded && encoding)) { + g_string_append_len (out, start, word - start); + start = word; } switch (encoding) { -- cgit v1.2.3