diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-11-15 14:33:49 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-11-15 14:33:49 +0800 |
commit | fb76cad79ae9228a426fcd0e4a39d920ec17d864 (patch) | |
tree | 07258553a2a620f026fbe27d71171c6dc9a61c11 /camel/camel-mime-utils.c | |
parent | 80bec4b3e5de8044697f4acddd05947cbf68d8c4 (diff) | |
download | gsoc2013-evolution-fb76cad79ae9228a426fcd0e4a39d920ec17d864.tar.gz gsoc2013-evolution-fb76cad79ae9228a426fcd0e4a39d920ec17d864.tar.zst gsoc2013-evolution-fb76cad79ae9228a426fcd0e4a39d920ec17d864.zip |
Removed local again, not quite ready.
2000-11-15 Not Zed <NotZed@HelixCode.com>
* providers/Makefile.am: Removed local again, not quite ready.
2000-11-14 Not Zed <NotZed@HelixCode.com>
* camel-folder-summary.c (message_info_new_from_message): Use
message_info_new to create the summary from headers, instead of
getting directly from the message.
(format_recipients): No longer required.
* providers/Makefile.am (SUBDIRS): Added local.
2000-11-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
at least 1, always. This is possibly a temporary fix for a
bad failure mode on bad multipart messages.
(folder_scan_content): Go until inend, not inend+1. Changed the
continuation and retry logic to be simpler and more robust. If we
can't find a marker within
the atleast we need, just set it to 1, and try again, rather than
just going to the next smaller limit (boundary check checks the
length anyway).
(header_append): streamline the empty line case. And strip
trailing \r's if there are any (\n's already stripped).
(folder_scan_header): Reordered and cleaned up a lot. Check for
continuation only once, and compress lwsp then. Assume the header
buffer already has end of line's stripped, and simplify some things:
Only check for end of headers once and easier.
Dont check to remove end of line character
Dont bother testing inptr-start if we get a boundary match - it is
always zero.
(folder_scan_header): Removed the unused part variable, and a few
pointless assignments.
(folder_scan_header): Change the end limit to be 1 higher, to make
sure we get all content.
(folder_scan_content): And here too.
(folder_scan_header): Killed a warning.
(folder_push_part): Removed a bad comment. Actually
boundarylenfinal can be zero for a new message not in a
multipart. So we fix that here.
2000-11-09 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_decode_param_list): Renamed from
header_param_list_decode.
(header_param_list_decode): New external function to decode a
parameter list.
(header_param_list_format_append): Made public.
(header_param_list_format): Another new public helper function for
formatting just a param list.
* camel-folder-summary.c (next_uid_string): Default implementation
is the same as before.
(camel_folder_summary_class_init): And set it up.
* camel-folder-summary.h: Make next_uid_string a virtual function.
* camel-folder.c (camel_folder_change_info_changed): New function
to return true if the changeset contains any changes.
svn path=/trunk/; revision=6577
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r-- | camel/camel-mime-utils.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 0bc0fa24dc..8db0e23fe4 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -2168,7 +2168,7 @@ header_mime_decode(const char *in, int *maj, int *min) } static struct _header_param * -header_param_list_decode(const char **in) +header_decode_param_list(const char **in) { const char *inptr = *in; struct _header_param *head = NULL, *tail = NULL; @@ -2198,7 +2198,16 @@ header_param_list_decode(const char **in) return head; } -static void +struct _header_param * +header_param_list_decode(const char *in) +{ + if (in == NULL) + return NULL; + + return header_decode_param_list(&in); +} + +void header_param_list_format_append(GString *out, struct _header_param *p) { int len = out->len; @@ -2227,6 +2236,18 @@ header_param_list_format_append(GString *out, struct _header_param *p) } } +char * +header_param_list_format(struct _header_param *p) +{ + GString *out = g_string_new(""); + char *ret; + + header_param_list_format_append(out, p); + ret = out->str; + g_string_free(out, FALSE); + return ret; +} + struct _header_content_type * header_content_type_decode(const char *in) { @@ -2253,7 +2274,7 @@ header_content_type_decode(const char *in) } t = header_content_type_new(type, subtype); - t->params = header_param_list_decode(&inptr); + t->params = header_decode_param_list(&inptr); g_free(type); g_free(subtype); } else { @@ -2334,7 +2355,7 @@ CamelMimeDisposition *header_disposition_decode(const char *in) d->disposition = decode_token(&inptr); if (d->disposition == NULL) w(g_warning("Empty disposition type")); - d->params = header_param_list_decode(&inptr); + d->params = header_decode_param_list(&inptr); return d; } |