aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/em-format.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-08 00:22:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-08 06:48:38 +0800
commit4cfb84c573f21ca7519e24cff1c5742b715355c4 (patch)
tree92314a7c4ebb1b82f5bbe0e48856e23f06dcfc95 /em-format/em-format.c
parentc7b455de89487e606fc620420c1778f5e55afcac (diff)
downloadgsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.gz
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.bz2
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.lz
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.xz
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.zst
gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.zip
Whitespace and coding style cleanups.
Diffstat (limited to 'em-format/em-format.c')
-rw-r--r--em-format/em-format.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 26f0897223..6f3d547081 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -484,9 +484,12 @@ em_format_class_remove_handler (EMFormatClass *emfc,
if (current == info) {
current = info->old;
if (current)
- g_hash_table_insert (emfc->type_handlers, (gpointer) current->mime_type, current);
+ g_hash_table_insert (
+ emfc->type_handlers,
+ (gpointer) current->mime_type, current);
else
- g_hash_table_remove (emfc->type_handlers, info->mime_type);
+ g_hash_table_remove (
+ emfc->type_handlers, info->mime_type);
} else {
while (current && current->old != info)
current = current->old;
@@ -1417,8 +1420,9 @@ em_format_format_text (EMFormat *emf,
camel_stream_reset (mem_stream, NULL);
if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
- camel_stream_write_to_stream (mem_stream, (CamelStream *)stream, cancellable, NULL);
- camel_stream_flush ((CamelStream *)stream, cancellable, NULL);
+ camel_stream_write_to_stream (
+ mem_stream, (CamelStream *) stream, cancellable, NULL);
+ camel_stream_flush ((CamelStream *) stream, cancellable, NULL);
} else {
EM_FORMAT_GET_CLASS (emf)->format_optional (
emf, stream, (CamelMimePart *)dw,
@@ -1594,10 +1598,12 @@ emf_multipart_appledouble (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
CamelMimePart *mime_part;
gint len;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1624,9 +1630,11 @@ emf_multipart_mixed (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
gint i, nparts, len;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1651,10 +1659,12 @@ emf_multipart_alternative (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1753,7 +1763,8 @@ emf_multipart_encrypted (EMFormat *emf,
}
/* Currently we only handle RFC2015-style PGP encryption. */
- protocol = camel_content_type_param(((CamelDataWrapper *)mpe)->mime_type, "protocol");
+ protocol = camel_content_type_param (
+ ((CamelDataWrapper *)mpe)->mime_type, "protocol");
if (!protocol || g_ascii_strcasecmp (protocol, "application/pgp-encrypted") != 0) {
em_format_format_error (
emf, stream, _("Unsupported encryption "
@@ -1822,7 +1833,7 @@ emf_multipart_related (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
const gchar *start;
@@ -1830,6 +1841,8 @@ emf_multipart_related (EMFormat *emf,
gchar *oldpartid;
GList *link;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -2148,7 +2161,9 @@ emf_inlinepgp_signed (EMFormat *emf,
return;
}
- emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SIGNED | EM_FORMAT_VALIDITY_FOUND_PGP;
+ emf->validity_found |=
+ EM_FORMAT_VALIDITY_FOUND_SIGNED |
+ EM_FORMAT_VALIDITY_FOUND_PGP;
cipher = camel_gpg_context_new (emf->session);
/* Verify the signature of the message */