[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Mailutils branch, master, updated. rel-2_1-62-gd1b1cba
From: |
Sergey Poznyakoff |
Subject: |
[SCM] GNU Mailutils branch, master, updated. rel-2_1-62-gd1b1cba |
Date: |
Thu, 08 Apr 2010 10:30:15 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=d1b1cba265616c7b48948c7f27d4a15f335fd6ae
The branch, master has been updated
via d1b1cba265616c7b48948c7f27d4a15f335fd6ae (commit)
from 7287e840118d680efe1795e053500c999a950ade (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d1b1cba265616c7b48948c7f27d4a15f335fd6ae
Author: Sergey Poznyakoff <address@hidden>
Date: Thu Apr 8 13:29:31 2010 +0300
Bugfixes.
* mailbox/mimehdr.c (_header_get_param): If buf is NULL
on entry, make sure it alwaus points to allocated memory
afterwards.
* examples/mimetest.c (charset): New variable.
(main): New command line option -c.
(message_display_parts): Use mu_message_aget_decoded_attachment_name.
Pass fname to mu_message_save_attachment.
-----------------------------------------------------------------------
Summary of changes:
examples/mimetest.c | 26 ++++++++++++++++++++++----
mailbox/mimehdr.c | 2 +-
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/examples/mimetest.c b/examples/mimetest.c
index c42dc44..53ae377 100644
--- a/examples/mimetest.c
+++ b/examples/mimetest.c
@@ -35,6 +35,7 @@ void message_display_parts(mu_message_t msg, int indent);
const char *from;
const char *subject;
+const char *charset = "UTF-8";
int print_attachments;
int indent_level = 4;
@@ -72,7 +73,23 @@ main (int argc, char **argv)
else if (strcmp (argv[i], "-p") == 0)
print_attachments = 1;
else if (strcmp (argv[i], "-i") == 0)
- indent_level = strtoul (argv[++i], NULL, 0);
+ {
+ if (++i == argc)
+ {
+ mu_error ("-i requires argument");
+ exit (1);
+ }
+ indent_level = strtoul (argv[i], NULL, 0);
+ }
+ else if (strcmp (argv[i], "-c") == 0)
+ {
+ if (++i == argc)
+ {
+ mu_error ("-c requires argument");
+ exit (1);
+ }
+ charset = argv[i];
+ }
else
break;
}
@@ -242,8 +259,9 @@ message_display_parts (mu_message_t msg, int indent)
{
/* Save the attachements. */
char *fname = NULL;
- /* FIXME: CS/Lang info is ignored */
- mu_message_aget_attachment_name (part, &fname, NULL);
+
+ mu_message_aget_decoded_attachment_name (part, charset,
+ &fname, NULL);
if (fname == NULL)
fname = mu_tempname (NULL);
@@ -251,7 +269,7 @@ message_display_parts (mu_message_t msg, int indent)
fname);
printf ("%*.*sBegin\n", indent, indent, "");
/*FIXME: What is the 'data' argument for? */
- mu_message_save_attachment (part, NULL, NULL);
+ mu_message_save_attachment (part, fname, NULL);
if (print_attachments)
print_file (fname, indent);
free (fname);
diff --git a/mailbox/mimehdr.c b/mailbox/mimehdr.c
index 0c04c23..2e09903 100644
--- a/mailbox/mimehdr.c
+++ b/mailbox/mimehdr.c
@@ -276,7 +276,7 @@ _header_get_param (const char *field_body,
res = ENOMEM;
break;
}
- mem = newmem;
+ buf = mem = newmem;
}
}
hooks/post-receive
--
GNU Mailutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Mailutils branch, master, updated. rel-2_1-62-gd1b1cba,
Sergey Poznyakoff <=