aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-10-08 16:34:40 +0800
committerMilan Crha <mcrha@redhat.com>2010-10-08 16:34:40 +0800
commit8f413c5b279241a2db752f8a2ebba99d4ce820f4 (patch)
treeafe899e39a092d10790e699ce25a74b2531300ec
parent95d126005677d961909ae0dfeb4dd41152657c0d (diff)
downloadgsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar.gz
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar.bz2
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar.lz
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar.xz
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.tar.zst
gsoc2013-evolution-8f413c5b279241a2db752f8a2ebba99d4ce820f4.zip
Bug #552121 - Drop UUENCODE inline filter
-rw-r--r--mail/em-inline-filter.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 010a381472..7aeb36c291 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -37,7 +37,6 @@ G_DEFINE_TYPE (EMInlineFilter, em_inline_filter, CAMEL_TYPE_MIME_FILTER)
enum {
EMIF_PLAIN,
- EMIF_UUENC,
EMIF_BINHEX,
EMIF_POSTSCRIPT,
EMIF_PGPSIGNED,
@@ -51,7 +50,6 @@ static const struct {
guint plain:1;
} emif_types[] = {
{ "text", "plain", CAMEL_TRANSFER_ENCODING_DEFAULT, 1, },
- { "application", "octet-stream", CAMEL_TRANSFER_ENCODING_UUENCODE, 0, },
{ "application", "mac-binhex40", CAMEL_TRANSFER_ENCODING_7BIT, 0, },
{ "application", "postscript", CAMEL_TRANSFER_ENCODING_7BIT, 0, },
{ "application", "x-inlinepgp-signed", CAMEL_TRANSFER_ENCODING_DEFAULT, 0, },
@@ -178,28 +176,7 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final)
switch (emif->state) {
case EMIF_PLAIN:
- /* This could use some funky plugin, but this'll do for now */
- if (rest_len > 6 && strncmp (start, "begin ", 6) == 0
- && start[6] >= '0' && start[6] <= '7') {
- gint i = 7;
- gchar *name;
-
- while (i < rest_len && start[i] >='0' && start[i] <='7')
- i++;
-
- restore_inptr ();
-
- if (i >= rest_len || start[i++] != ' ')
- break;
-
- inline_filter_add_part (emif, data_start, start-data_start);
-
- name = g_strndup (start+i, inptr-start-i-1);
- emif->filename = camel_header_decode_string(name, emif->base_type?camel_content_type_param(emif->base_type, "charset"):NULL);
- g_free (name);
- data_start = start;
- emif->state = EMIF_UUENC;
- } else if (rest_len >= 45 && strncmp (start, "(This file must be converted with BinHex 4.0)", 45) == 0) {
+ if (rest_len >= 45 && strncmp (start, "(This file must be converted with BinHex 4.0)", 45) == 0) {
restore_inptr ();
inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
@@ -222,33 +199,6 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final)
}
break;
- case EMIF_UUENC:
- if (rest_len >= 3 && strncmp (start, "end", 3) == 0) {
- restore_inptr ();
- inline_filter_add_part (emif, data_start, inptr-data_start);
- data_start = inptr;
- emif->state = EMIF_PLAIN;
- } else {
- gint linelen;
-
- /* check the length byte matches the data, if not, output what we have and re-scan this line */
- len = ((start[0] - ' ') & 077);
- linelen = inptr-start-1;
- while (linelen > 0 && (start[linelen] == '\r' || start[linelen] == '\n'))
- linelen--;
- linelen--;
- linelen /= 4;
- linelen *= 3;
- if (!(len == linelen || len == linelen-1 || len == linelen-2)) {
- restore_inptr ();
- inline_filter_add_part (emif, data_start, start-data_start);
- data_start = start;
- inptr = start;
- emif->state = EMIF_PLAIN;
- continue;
- }
- }
- break;
case EMIF_BINHEX:
if (inptr > (start+1) && inptr[-2] == ':') {
restore_inptr ();