diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:24:42 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:11 +0800 |
commit | 54da4fc09cf226fdb59b9f0c70555e2e57dc1f91 (patch) | |
tree | c62c9ac6d08670dffc400ff00117508512ce4f8b /em-format | |
parent | fe20f70779fb486169a0735499d24e001ffa0cab (diff) | |
download | gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.gz gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.bz2 gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.lz gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.xz gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.zst gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.zip |
Coding style cleanups.
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/em-format-quote.c | 8 | ||||
-rw-r--r-- | em-format/em-format.c | 64 | ||||
-rw-r--r-- | em-format/em-inline-filter.c | 14 |
3 files changed, 43 insertions, 43 deletions
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index be07485e3b..f0a005f9ab 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -304,7 +304,7 @@ emfq_format_address (GString *out, struct _camel_header_address *a) g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((guchar *)a->name))) { + if ((real = camel_header_encode_phrase ((guchar *) a->name))) { mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr); g_free (real); mailto = camel_url_encode (mailaddr, "?=&()"); @@ -514,13 +514,13 @@ emfq_format_message (EMFormat *emf, "key=\"orig\" value=\"1\">-->\n" "<blockquote type=cite>\n"); - if (((CamelMimePart *)emf->message) != part) { + if (((CamelMimePart *) emf->message) != part) { camel_stream_printf ( stream, "%s</br>\n", _("-------- Forwarded Message --------")); - emfq_format_headers (emfq, stream, (CamelMedium *)part); + emfq_format_headers (emfq, stream, (CamelMedium *) part); } else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) - emfq_format_headers (emfq, stream, (CamelMedium *)part); + emfq_format_headers (emfq, stream, (CamelMedium *) part); em_format_part (emf, stream, part, cancellable); diff --git a/em-format/em-format.c b/em-format/em-format.c index 6f3d547081..680d32b900 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -99,7 +99,7 @@ emf_clone_inlines (gpointer key, gpointer val, gpointer data) { EMFormatCache *emfc = val, *new; - new = emf_insert_cache ((EMFormat *)data, emfc->partid); + new = emf_insert_cache ((EMFormat *) data, emfc->partid); new->state = emfc->state; if (emfc->valid) new->valid = camel_cipher_validity_clone (emfc->valid); @@ -174,7 +174,7 @@ static const EMFormatHandler * emf_find_handler (EMFormat *emf, const gchar *mime_type) { - EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS (emf); + EMFormatClass *emfc = (EMFormatClass *) G_OBJECT_GET_CLASS (emf); return g_hash_table_lookup (emfc->type_handlers, mime_type); } @@ -268,7 +268,7 @@ emf_format_secure (EMFormat *emf, if (emf->valid == NULL) { emf->valid = valid; } else { - camel_dlist_addtail (&emf->valid_parent->children, (CamelDListNode *)valid); + camel_dlist_addtail (&emf->valid_parent->children, (CamelDListNode *) valid); camel_cipher_validity_envelope (emf->valid_parent, valid); } @@ -453,8 +453,8 @@ merge_missing (gpointer key, gpointer value, gpointer userdata) void em_format_merge_handler (EMFormat *new, EMFormat *old) { - EMFormatClass *oldc = (EMFormatClass *)G_OBJECT_GET_CLASS (old); - EMFormatClass *newc = (EMFormatClass *)G_OBJECT_GET_CLASS (new); + EMFormatClass *oldc = (EMFormatClass *) G_OBJECT_GET_CLASS (old); + EMFormatClass *newc = (EMFormatClass *) G_OBJECT_GET_CLASS (new); struct _class_handlers fclasses; fclasses.old = oldc; @@ -541,7 +541,7 @@ em_format_fallback_handler (EMFormat *emf, s = strchr (mime_type, '/'); if (s == NULL) - mime = (gchar *)mime_type; + mime = (gchar *) mime_type; else { gsize len = (s-mime_type)+1; @@ -1128,7 +1128,7 @@ em_format_is_attachment (EMFormat *emf, CamelMimePart *part) { /*CamelContentType *ct = camel_mime_part_get_content_type(part);*/ - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); if (!dw) return 0; @@ -1322,11 +1322,11 @@ em_format_format_content (EMFormat *emf, CamelMimePart *part, GCancellable *cancellable) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); if (camel_content_type_is (dw->mime_type, "text", "*")) em_format_format_text ( - emf, stream, (CamelDataWrapper *)part, cancellable); + emf, stream, (CamelDataWrapper *) part, cancellable); else camel_data_wrapper_decode_to_stream_sync ( dw, stream, cancellable, NULL); @@ -1373,14 +1373,14 @@ em_format_format_text (EMFormat *emf, filter_stream = camel_stream_filter_new (null); g_object_unref (null); - windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new (charset); + windows = (CamelMimeFilterWindows *) camel_mime_filter_windows_new (charset); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filter_stream), CAMEL_MIME_FILTER (windows)); camel_data_wrapper_decode_to_stream_sync ( - dw, (CamelStream *)filter_stream, cancellable, NULL); - camel_stream_flush ((CamelStream *)filter_stream, cancellable, NULL); + dw, (CamelStream *) filter_stream, cancellable, NULL); + camel_stream_flush ((CamelStream *) filter_stream, cancellable, NULL); g_object_unref (filter_stream); charset = camel_mime_filter_windows_real_charset (windows); @@ -1388,7 +1388,7 @@ em_format_format_text (EMFormat *emf, charset = emf->default_charset; } - mem_stream = (CamelStream *)camel_stream_mem_new (); + mem_stream = (CamelStream *) camel_stream_mem_new (); filter_stream = camel_stream_filter_new (mem_stream); if ((filter = camel_mime_filter_charset_new (charset, "UTF-8"))) { @@ -1413,9 +1413,9 @@ em_format_format_text (EMFormat *emf, size = camel_data_wrapper_decode_to_stream_sync ( emf->mode == EM_FORMAT_MODE_SOURCE ? (CamelDataWrapper *) dw : - camel_medium_get_content ((CamelMedium *)dw), - (CamelStream *)filter_stream, cancellable, NULL); - camel_stream_flush ((CamelStream *)filter_stream, cancellable, NULL); + camel_medium_get_content ((CamelMedium *) dw), + (CamelStream *) filter_stream, cancellable, NULL); + camel_stream_flush ((CamelStream *) filter_stream, cancellable, NULL); g_object_unref (filter_stream); camel_stream_reset (mem_stream, NULL); @@ -1425,7 +1425,7 @@ em_format_format_text (EMFormat *emf, camel_stream_flush ((CamelStream *) stream, cancellable, NULL); } else { EM_FORMAT_GET_CLASS (emf)->format_optional ( - emf, stream, (CamelMimePart *)dw, + emf, stream, (CamelMimePart *) dw, mem_stream, cancellable); } @@ -1602,7 +1602,7 @@ emf_multipart_appledouble (EMFormat *emf, CamelMimePart *mime_part; gint len; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1633,7 +1633,7 @@ emf_multipart_mixed (EMFormat *emf, CamelMultipart *mp; gint i, nparts, len; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1663,7 +1663,7 @@ emf_multipart_alternative (EMFormat *emf, gint i, nparts, bestid = 0; CamelMimePart *best = NULL; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1753,7 +1753,7 @@ emf_multipart_encrypted (EMFormat *emf, return; } - mpe = (CamelMultipartEncrypted*)camel_medium_get_content ((CamelMedium *)part); + mpe = (CamelMultipartEncrypted*) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART_ENCRYPTED (mpe)) { em_format_format_error ( emf, stream, _("Could not parse MIME message. " @@ -1841,7 +1841,7 @@ emf_multipart_related (EMFormat *emf, gchar *oldpartid; GList *link; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1948,9 +1948,9 @@ emf_multipart_signed (EMFormat *emf, return; } - mps = (CamelMultipartSigned *)camel_medium_get_content ((CamelMedium *)part); + mps = (CamelMultipartSigned *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART_SIGNED (mps) - || (cpart = camel_multipart_get_part ((CamelMultipart *)mps, + || (cpart = camel_multipart_get_part ((CamelMultipart *) mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) { em_format_format_error ( emf, stream, _("Could not parse MIME message. " @@ -2097,7 +2097,7 @@ emf_message_rfc822 (EMFormat *emf, GCancellable *cancellable, gboolean is_fallback) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); const EMFormatHandler *handle; gint len; gchar *parent_message_part_id; @@ -2134,7 +2134,7 @@ emf_message_deliverystatus (EMFormat *emf, gboolean is_fallback) { em_format_format_text ( - emf, stream, (CamelDataWrapper *)part, cancellable); + emf, stream, (CamelDataWrapper *) part, cancellable); } static void @@ -2189,17 +2189,17 @@ emf_inlinepgp_signed (EMFormat *emf, filtered_stream = camel_stream_filter_new (ostream); /* Add PGP header / footer filter */ - pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new (); + pgp_filter = (CamelMimeFilterPgp *) camel_mime_filter_pgp_new (); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), CAMEL_MIME_FILTER (pgp_filter)); g_object_unref (pgp_filter); /* Pass through the filters that have been setup */ - dw = camel_medium_get_content ((CamelMedium *)ipart); + dw = camel_medium_get_content ((CamelMedium *) ipart); camel_data_wrapper_decode_to_stream_sync ( - dw, (CamelStream *)filtered_stream, NULL, NULL); - camel_stream_flush ((CamelStream *)filtered_stream, NULL, NULL); + dw, (CamelStream *) filtered_stream, NULL, NULL); + camel_stream_flush ((CamelStream *) filtered_stream, NULL, NULL); g_object_unref (filtered_stream); /* Create a new text/plain MIME part containing the signed @@ -2280,7 +2280,7 @@ emf_inlinepgp_encrypted (EMFormat *emf, return; } - dw = camel_medium_get_content ((CamelMedium *)opart); + dw = camel_medium_get_content ((CamelMedium *) opart); mime_type = camel_data_wrapper_get_mime_type (dw); /* this ensures to show the 'opart' as inlined, if possible */ @@ -2368,7 +2368,7 @@ em_format_snoop_type (CamelMimePart *part) if (filename != NULL) name_type = e_util_guess_mime_type (filename, FALSE); - dw = camel_medium_get_content ((CamelMedium *)part); + dw = camel_medium_get_content ((CamelMedium *) part); if (!camel_data_wrapper_is_offline (dw)) { GByteArray *byte_array; CamelStream *stream; diff --git a/em-format/em-inline-filter.c b/em-format/em-inline-filter.c index 117ddb5366..c7a8014f6b 100644 --- a/em-format/em-inline-filter.c +++ b/em-format/em-inline-filter.c @@ -100,7 +100,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) else encoding = emif_types[emif->state].encoding; - g_byte_array_append (emif->data, (guchar *)data, len); + g_byte_array_append (emif->data, (guchar *) data, len); /* check the part will actually have content */ if (emif->data->len <= 0) { return; @@ -165,7 +165,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) dw->encoding = encoding; part = camel_mime_part_new (); - camel_medium_set_content ((CamelMedium *)part, dw); + camel_medium_set_content ((CamelMedium *) part, dw); camel_mime_part_set_encoding (part, encoding); g_object_unref (dw); @@ -191,7 +191,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) static gint inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) { - EMInlineFilter *emif = (EMInlineFilter *)f; + EMInlineFilter *emif = (EMInlineFilter *) f; gchar *inptr = in, *inend = in+len; gchar *data_start = in; gchar *start = in; @@ -297,9 +297,9 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) } else if (start > data_start) { /* backup the last line, in case the tag is divided within buffers */ camel_mime_filter_backup (f, start, inend - start); - g_byte_array_append (emif->data, (guchar *)data_start, start - data_start); + g_byte_array_append (emif->data, (guchar *) data_start, start - data_start); } else { - g_byte_array_append (emif->data, (guchar *)data_start, inend - data_start); + g_byte_array_append (emif->data, (guchar *) data_start, inend - data_start); } return 0; @@ -330,7 +330,7 @@ inline_filter_filter (CamelMimeFilter *filter, gsize *outlen, gsize *outprespace) { - inline_filter_scan (filter, (gchar *)in, len, FALSE); + inline_filter_scan (filter, (gchar *) in, len, FALSE); *out = (gchar *)in; *outlen = len; @@ -346,7 +346,7 @@ inline_filter_complete (CamelMimeFilter *filter, gsize *outlen, gsize *outprespace) { - inline_filter_scan (filter, (gchar *)in, len, TRUE); + inline_filter_scan (filter, (gchar *) in, len, TRUE); *out = (gchar *)in; *outlen = len; |