diff options
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/em-format-quote.c | 50 | ||||
-rw-r--r-- | em-format/em-format-quote.h | 2 | ||||
-rw-r--r-- | em-format/em-format.c | 110 | ||||
-rw-r--r-- | em-format/em-format.h | 48 | ||||
-rw-r--r-- | em-format/em-stripsig-filter.c | 26 |
5 files changed, 118 insertions, 118 deletions
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index 7918b94d88..bb56670f24 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -42,14 +42,14 @@ #include "em-format-quote.h" struct _EMFormatQuotePrivate { - int dummy; + gint dummy; }; -static void emfq_format_clone(EMFormat *, CamelFolder *, const char *, CamelMimeMessage *, EMFormat *); -static void emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt); +static void emfq_format_clone(EMFormat *, CamelFolder *, const gchar *, CamelMimeMessage *, EMFormat *); +static void emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt); static void emfq_format_message(EMFormat *, CamelStream *, CamelMimePart *, const EMFormatHandler *); static void emfq_format_source(EMFormat *, CamelStream *, CamelMimePart *); -static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *); +static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *); static void emfq_builtin_init(EMFormatQuoteClass *efhc); @@ -153,7 +153,7 @@ emfq_format_empty_line(EMFormat *emf, CamelStream *stream, CamelMimePart *part, } static void -emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src) +emfq_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *src) { EMFormatQuote *emfq = (EMFormatQuote *) emf; const EMFormatHandler *handle; @@ -180,16 +180,16 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime } static void -emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt) +emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt) { /* FIXME: should we even bother writing error text for quoting? probably not... */ } static void -emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const char *label, const char *value, guint32 flags, int is_html) +emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags, gint is_html) { - const char *fmt, *html; - char *mhtml = NULL; + const gchar *fmt, *html; + gchar *mhtml = NULL; if (value == NULL) return; @@ -220,7 +220,7 @@ static const gchar *addrspec_hdrs[] = { #if 0 /* FIXME: include Sender and Resent-* headers too? */ /* For Translators only: The following strings are used in the header table in the preview pane */ -static char *i18n_hdrs[] = { +static gchar *i18n_hdrs[] = { N_("From"), N_("Reply-To"), N_("To"), N_("Cc"), N_("Bcc") }; #endif @@ -229,7 +229,7 @@ static void emfq_format_address (GString *out, struct _camel_header_address *a) { guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES; - char *name, *mailto, *addr; + gchar *name, *mailto, *addr; while (a) { if (a->name) @@ -240,11 +240,11 @@ emfq_format_address (GString *out, struct _camel_header_address *a) switch (a->type) { case CAMEL_HEADER_ADDRESS_NAME: if (name && *name) { - char *real, *mailaddr; + gchar *real, *mailaddr; g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((unsigned char *)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, "?=&()"); @@ -282,9 +282,9 @@ emfq_format_address (GString *out, struct _camel_header_address *a) } static void -canon_header_name (char *name) +canon_header_name (gchar *name) { - char *inptr = name; + gchar *inptr = name; /* canonicalise the header name... first letter is * capitalised and any letter following a '-' also gets @@ -306,15 +306,15 @@ canon_header_name (char *name) } static void -emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const char *namein, guint32 flags, const char *charset) +emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const gchar *namein, guint32 flags, const gchar *charset) { CamelMimeMessage *msg = (CamelMimeMessage *) part; EMFormatQuote *emfq = (EMFormatQuote *) emf; - char *name, *buf, *value = NULL; - const char *txt, *label; + gchar *name, *buf, *value = NULL; + const gchar *txt, *label; gboolean addrspec = FALSE; - int is_html = FALSE; - int i; + gint is_html = FALSE; + gint i; name = g_alloca (strlen (namein) + 1); strcpy (name, namein); @@ -388,7 +388,7 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part { EMFormat *emf = (EMFormat *) emfq; CamelContentType *ct; - const char *charset; + const gchar *charset; EMFormatHeader *h; if (!part) @@ -456,10 +456,10 @@ emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part) } static void -emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle) +emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle) { if (handle && em_format_is_inline(emf, emf->part_id->str, part, handle)) { - char *text, *html; + gchar *text, *html; camel_stream_write_string(stream, "<table border=1 cellspacing=0 cellpadding=0><tr><td><font size=-1>\n"); @@ -489,7 +489,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E CamelMimeFilter *html_filter; CamelMimeFilter *sig_strip; CamelContentType *type; - const char *format; + const gchar *format; guint32 rgb = 0x737373, flags; if (!part) @@ -579,7 +579,7 @@ static EMFormatHandler type_builtin_table[] = { static void emfq_builtin_init(EMFormatQuoteClass *efhc) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]); diff --git a/em-format/em-format-quote.h b/em-format/em-format-quote.h index 8aca4b8e3f..5b010e1da5 100644 --- a/em-format/em-format-quote.h +++ b/em-format/em-format-quote.h @@ -59,7 +59,7 @@ struct _EMFormatQuote { EMFormatQuotePrivate *priv; - char *credits; + gchar *credits; CamelStream *stream; guint32 flags; diff --git a/em-format/em-format.c b/em-format/em-format.c index c2669e7c5b..391b6b5c51 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -65,9 +65,9 @@ struct _EMFormatCache { CamelCipherValidity *valid; /* validity copy */ CamelMimePart *secured; /* encrypted subpart */ - unsigned int state:2; /* inline state */ + guint state:2; /* inline state */ - char partid[1]; + gchar partid[1]; }; #define INLINE_UNSET (0) @@ -76,8 +76,8 @@ struct _EMFormatCache { static void emf_builtin_init(EMFormatClass *); -static const EMFormatHandler *emf_find_handler(EMFormat *emf, const char *mime_type); -static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource); +static const EMFormatHandler *emf_find_handler(EMFormat *emf, const gchar *mime_type); +static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource); static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid); static gboolean emf_busy(EMFormat *emf); enum { @@ -99,7 +99,7 @@ emf_free_cache(struct _EMFormatCache *efc) } static struct _EMFormatCache * -emf_insert_cache(EMFormat *emf, const char *partid) +emf_insert_cache(EMFormat *emf, const gchar *partid) { struct _EMFormatCache *new; @@ -329,7 +329,7 @@ em_format_find_handler (EMFormat *emf, * Return value: NULL if no handler is available. **/ static const EMFormatHandler * -emf_find_handler(EMFormat *emf, const char *mime_type) +emf_find_handler(EMFormat *emf, const gchar *mime_type) { EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS(emf); @@ -348,13 +348,13 @@ emf_find_handler(EMFormat *emf, const char *mime_type) * Return value: **/ const EMFormatHandler * -em_format_fallback_handler(EMFormat *emf, const char *mime_type) +em_format_fallback_handler(EMFormat *emf, const gchar *mime_type) { - char *mime, *s; + gchar *mime, *s; s = strchr(mime_type, '/'); if (s == NULL) - mime = (char *)mime_type; + mime = (gchar *)mime_type; else { size_t len = (s-mime_type)+1; @@ -391,10 +391,10 @@ em_format_fallback_handler(EMFormat *emf, const char *mime_type) * are resolved by forgetting the old PURI in the global index. **/ EMFormatPURI * -em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *part, EMFormatPURIFunc func) +em_format_add_puri(EMFormat *emf, size_t size, const gchar *cid, CamelMimePart *part, EMFormatPURIFunc func) { EMFormatPURI *puri; - const char *tmp; + const gchar *tmp; d(printf("adding puri for part: %s\n", emf->part_id->str)); @@ -511,7 +511,7 @@ em_format_pull_level(EMFormat *emf) * Return value: **/ EMFormatPURI * -em_format_find_visible_puri(EMFormat *emf, const char *uri) +em_format_find_visible_puri(EMFormat *emf, const gchar *uri) { EMFormatPURI *pw; struct _EMFormatPURITree *ptree; @@ -545,7 +545,7 @@ em_format_find_visible_puri(EMFormat *emf, const char *uri) **/ EMFormatPURI * -em_format_find_puri(EMFormat *emf, const char *uri) +em_format_find_puri(EMFormat *emf, const gchar *uri) { return g_hash_table_lookup(emf->pending_uri_table, uri); } @@ -614,12 +614,12 @@ em_format_clear_puri_tree(EMFormat *emf) /* use mime_type == NULL to force showing as application/octet-stream */ void -em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type) +em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type) { const EMFormatHandler *handle = NULL; - const char *snoop_save = emf->snoop_mime_type, *tmp; + const gchar *snoop_save = emf->snoop_mime_type, *tmp; CamelURL *base_save = emf->base, *base = NULL; - char *basestr = NULL; + gchar *basestr = NULL; d(printf("format_part_as()\n")); @@ -677,7 +677,7 @@ finish: void em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part) { - char *mime_type; + gchar *mime_type; CamelDataWrapper *dw; dw = camel_medium_get_content_object((CamelMedium *)part); @@ -691,7 +691,7 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part) } static void -emf_clone_inlines(void *key, void *val, void *data) +emf_clone_inlines(gpointer key, gpointer val, gpointer data) { struct _EMFormatCache *emfc = val, *new; @@ -704,7 +704,7 @@ emf_clone_inlines(void *key, void *val, void *data) } static void -emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource) +emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource) { em_format_clear_puri_tree(emf); @@ -761,7 +761,7 @@ static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid) { CamelCipherValidity *save = emf->valid_parent; - int len; + gint len; /* Note that this also requires support from higher up in the class chain - validity needs to be cleared when you start output @@ -874,7 +874,7 @@ em_format_set_mode(EMFormat *emf, em_format_mode_t type) * required. **/ void -em_format_set_charset(EMFormat *emf, const char *charset) +em_format_set_charset(EMFormat *emf, const gchar *charset) { if ((emf->charset && charset && g_ascii_strcasecmp(emf->charset, charset) == 0) || (emf->charset == NULL && charset == NULL) @@ -898,7 +898,7 @@ em_format_set_charset(EMFormat *emf, const char *charset) * when it isn't). **/ void -em_format_set_default_charset(EMFormat *emf, const char *charset) +em_format_set_default_charset(EMFormat *emf, const gchar *charset) { if ((emf->default_charset && charset && g_ascii_strcasecmp(emf->default_charset, charset) == 0) || (emf->default_charset == NULL && charset == NULL) @@ -930,7 +930,7 @@ em_format_clear_headers(EMFormat *emf) /* note: also copied in em-mailer-prefs.c */ static const struct { - const char *name; + const gchar *name; guint32 flags; } default_headers[] = { { N_("From"), EM_FORMAT_HEADER_BOLD }, @@ -955,7 +955,7 @@ static const struct { void em_format_default_headers(EMFormat *emf) { - int i; + gint i; em_format_clear_headers(emf); for (i=0; i<sizeof(default_headers)/sizeof(default_headers[0]); i++) @@ -973,7 +973,7 @@ em_format_default_headers(EMFormat *emf) * headers included in this list will be shown using special * formatting routines. **/ -void em_format_add_header(EMFormat *emf, const char *name, guint32 flags) +void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags) { EMFormatHeader *h; @@ -999,7 +999,7 @@ void em_format_add_header(EMFormat *emf, const char *name, guint32 flags) * * Return value: TRUE/FALSE **/ -int em_format_is_attachment(EMFormat *emf, CamelMimePart *part) +gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part) { /*CamelContentType *ct = camel_mime_part_get_content_type(part);*/ CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part); @@ -1031,10 +1031,10 @@ int em_format_is_attachment(EMFormat *emf, CamelMimePart *part) * * Return value: **/ -int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle) +gint em_format_is_inline(EMFormat *emf, const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle) { struct _EMFormatCache *emfc; - const char *tmp; + const gchar *tmp; if (handle == NULL) return FALSE; @@ -1065,7 +1065,7 @@ int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, * @state. This is used only to record the change for a redraw or * cloned layout render and does not force a redraw. **/ -void em_format_set_inline(EMFormat *emf, const char *partid, int state) +void em_format_set_inline(EMFormat *emf, const gchar *partid, gint state) { struct _EMFormatCache *emfc; @@ -1201,7 +1201,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw) { CamelStreamFilter *filter_stream; CamelMimeFilterCharset *filter; - const char *charset = NULL; + const gchar *charset = NULL; CamelMimeFilterWindows *windows = NULL; CamelStream *mem_stream = NULL; size_t size; @@ -1280,12 +1280,12 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw) * * Return value: **/ -char * -em_format_describe_part(CamelMimePart *part, const char *mime_type) +gchar * +em_format_describe_part(CamelMimePart *part, const gchar *mime_type) { GString *stext; - const char *filename, *description; - char *content_type, *desc; + const gchar *filename, *description; + gchar *content_type, *desc; stext = g_string_new(""); content_type = g_content_type_from_mime_type (mime_type); @@ -1353,7 +1353,7 @@ emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *par { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); CamelMimePart *mime_part; - int len; + gint len; if (!CAMEL_IS_MULTIPART(mp)) { em_format_format_source(emf, stream, part); @@ -1377,7 +1377,7 @@ static void emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); - int i, nparts, len; + gint i, nparts, len; if (!CAMEL_IS_MULTIPART(mp)) { em_format_format_source(emf, stream, part); @@ -1399,7 +1399,7 @@ static void emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); - int i, nparts, bestid = 0; + gint i, nparts, bestid = 0; CamelMimePart *best = NULL; if (!CAMEL_IS_MULTIPART(mp)) { @@ -1411,7 +1411,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par nparts = camel_multipart_get_number(mp); for (i = 0; i < nparts; i++) { CamelContentType *type; - char *mime_type; + gchar *mime_type; /* is it correct to use the passed in *part here? */ part = camel_multipart_get_part(mp, i); @@ -1437,7 +1437,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par } if (best) { - int len = emf->part_id->len; + gint len = emf->part_id->len; g_string_append_printf(emf->part_id, ".alternative.%d", bestid); em_format_part(emf, stream, best); @@ -1451,7 +1451,7 @@ emf_multipart_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *part, { CamelCipherContext *context; CamelException *ex; - const char *protocol; + const gchar *protocol; CamelMimePart *opart; CamelCipherValidity *valid; CamelMultipartEncrypted *mpe; @@ -1518,9 +1518,9 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); CamelMimePart *body_part, *display_part = NULL; CamelContentType *content_type; - const char *start; - int i, nparts, partidlen, displayid = 0; - char *oldpartid; + const gchar *start; + gint i, nparts, partidlen, displayid = 0; + gchar *oldpartid; struct _EMFormatPURITree *ptree; EMFormatPURI *puri, *purin; @@ -1534,8 +1534,8 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c content_type = camel_mime_part_get_content_type(part); start = camel_content_type_param (content_type, "start"); if (start && strlen(start)>2) { - int len; - const char *cid; + gint len; + const gchar *cid; /* strip <>'s */ len = strlen (start) - 2; @@ -1674,7 +1674,7 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons { CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part); const EMFormatHandler *handle; - int len; + gint len; if (!CAMEL_IS_MIME_MESSAGE(dw)) { em_format_format_source(emf, stream, part); @@ -1709,7 +1709,7 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E CamelMimePart *opart; CamelStream *ostream; CamelException *ex; - char *type; + gchar *type; if (!ipart) { em_format_format_error(emf, stream, _("Unknown error verifying signature")); @@ -1787,7 +1787,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart CamelException *ex; CamelMimePart *opart; CamelDataWrapper *dw; - char *mime_type; + gchar *mime_type; cipher = camel_gpg_context_new(emf->session); ex = camel_exception_new(); @@ -1811,7 +1811,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart /* this ensures to show the 'opart' as inlined, if possible */ if (mime_type && g_ascii_strcasecmp (mime_type, "application/octet-stream") == 0) { - const char *snoop = em_format_snoop_type (opart); + const gchar *snoop = em_format_snoop_type (opart); if (snoop) camel_data_wrapper_set_mime_type (dw, snoop); @@ -1857,7 +1857,7 @@ static EMFormatHandler type_builtin_table[] = { static void emf_builtin_init(EMFormatClass *class) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) g_hash_table_insert(class->type_handlers, type_builtin_table[i].mime_type, &type_builtin_table[i]); @@ -1871,14 +1871,14 @@ emf_builtin_init(EMFormatClass *class) * * Return value: NULL if unknown (more likely application/octet-stream). **/ -const char * +const gchar * em_format_snoop_type (CamelMimePart *part) { - /* cache is here only to be able still return const char * */ + /* cache is here only to be able still return const gchar * */ static GHashTable *types_cache = NULL; - const char *filename; - char *name_type = NULL, *magic_type = NULL, *res, *tmp; + const gchar *filename; + gchar *name_type = NULL, *magic_type = NULL, *res, *tmp; CamelDataWrapper *dw; filename = camel_mime_part_get_filename (part); @@ -1890,7 +1890,7 @@ em_format_snoop_type (CamelMimePart *part) CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new(); if (camel_data_wrapper_decode_to_stream(dw, (CamelStream *)mem) > 0) { - char *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL); + gchar *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL); if (ct) magic_type = g_content_type_get_mime_type (ct); diff --git a/em-format/em-format.h b/em-format/em-format.h index a9d9356778..652ec33ae8 100644 --- a/em-format/em-format.h +++ b/em-format/em-format.h @@ -140,14 +140,14 @@ struct _EMFormatPURI { void (*free)(struct _EMFormatPURI *p); /* optional callback for freeing user-fields */ struct _EMFormat *format; - char *uri; /* will be the location of the part, may be empty */ - char *cid; /* will always be set, a fake one created if needed */ - char *part_id; /* will always be set, emf->part_id->str for this part */ + gchar *uri; /* will be the location of the part, may be empty */ + gchar *cid; /* will always be set, a fake one created if needed */ + gchar *part_id; /* will always be set, emf->part_id->str for this part */ EMFormatPURIFunc func; CamelMimePart *part; - unsigned int use_count; /* used by multipart/related to see if it was accessed */ + guint use_count; /* used by multipart/related to see if it was accessed */ }; /** @@ -176,7 +176,7 @@ struct _EMFormatHeader { struct _EMFormatHeader *next, *prev; guint32 flags; /* E_FORMAT_HEADER_* */ - char name[1]; + gchar name[1]; }; #define EM_FORMAT_HEADER_BOLD (1<<0) @@ -218,7 +218,7 @@ struct _EMFormat { CamelMimeMessage *message; /* the current message */ CamelFolder *folder; - char *uid; + gchar *uid; GString *part_id; /* current part id prefix, for identifying parts directly */ @@ -227,7 +227,7 @@ struct _EMFormat { CamelSession *session; /* session, used for authentication when required */ CamelURL *base; /* content-base header or absolute content-location, for any part */ - const char *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */ + const gchar *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */ /* for validity enveloping */ CamelCipherValidity *valid; @@ -245,8 +245,8 @@ struct _EMFormat { struct _EMFormatPURITree *pending_uri_level; em_format_mode_t mode; /* source/headers/etc */ - char *charset; /* charset override */ - char *default_charset; /* charset fallback */ + gchar *charset; /* charset override */ + gchar *default_charset; /* charset fallback */ gboolean composer; /* Formatting from composer ?*/ gboolean print; }; @@ -257,16 +257,16 @@ struct _EMFormatClass { GHashTable *type_handlers; /* lookup handler, default falls back to hashtable above */ - const EMFormatHandler *(*find_handler)(EMFormat *, const char *mime_type); + const EMFormatHandler *(*find_handler)(EMFormat *, const gchar *mime_type); /* start formatting a message */ - void (*format_clone)(EMFormat *, CamelFolder *, const char *uid, CamelMimeMessage *, EMFormat *); + void (*format_clone)(EMFormat *, CamelFolder *, const gchar *uid, CamelMimeMessage *, EMFormat *); /* some internel error/inconsistency */ - void (*format_error)(EMFormat *, CamelStream *, const char *msg); + void (*format_error)(EMFormat *, CamelStream *, const gchar *msg); /* use for external structured parts */ - void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info); + void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const gchar *mime_type, const struct _EMFormatHandler *info); /* use for unparsable content */ void (*format_source)(EMFormat *, CamelStream *, CamelMimePart *); @@ -287,9 +287,9 @@ struct _EMFormatClass { void em_format_set_mode (EMFormat *emf, em_format_mode_t type); void em_format_set_charset (EMFormat *emf, - const char *charset); + const gchar *charset); void em_format_set_default_charset (EMFormat *emf, - const char *charset); + const gchar *charset); /* also indicates to show all headers */ void em_format_clear_headers (EMFormat *emf); @@ -306,15 +306,15 @@ int em_format_is_attachment (EMFormat *emf, CamelMimePart *part); int em_format_is_inline (EMFormat *emf, - const char *partid, + const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle); void em_format_set_inline (EMFormat *emf, - const char *partid, - int state); + const gchar *partid, + gint state); -char * em_format_describe_part (CamelMimePart *part, - const char *mime_type); +gchar * em_format_describe_part (CamelMimePart *part, + const gchar *mime_type); /* for implementers */ GType em_format_get_type (void); @@ -333,13 +333,13 @@ const EMFormatHandler * /* puri is short for pending uri ... really */ EMFormatPURI * em_format_add_puri (EMFormat *emf, size_t size, - const char *uri, + const gchar *uri, CamelMimePart *part, EMFormatPURIFunc func); EMFormatPURI * em_format_find_visible_puri (EMFormat *emf, - const char *uri); + const gchar *uri); EMFormatPURI * em_format_find_puri (EMFormat *emf, - const char *uri); + const gchar *uri); void em_format_clear_puri_tree (EMFormat *emf); void em_format_push_level (EMFormat *emf); void em_format_pull_level (EMFormat *emf); @@ -396,7 +396,7 @@ void em_format_part (EMFormat *emf, void em_format_merge_handler (EMFormat *new, EMFormat *old); -const char * em_format_snoop_type (CamelMimePart *part); +const gchar * em_format_snoop_type (CamelMimePart *part); G_END_DECLS diff --git a/em-format/em-stripsig-filter.c b/em-format/em-stripsig-filter.c index 1600eeaed0..1b977e975f 100644 --- a/em-format/em-stripsig-filter.c +++ b/em-format/em-stripsig-filter.c @@ -34,10 +34,10 @@ static void em_stripsig_filter_class_init (EMStripSigFilterClass *klass); static void em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass); -static void filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace); -static void filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace); +static void filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace); +static void filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace); static void filter_reset (CamelMimeFilter *filter); @@ -83,13 +83,13 @@ em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass) } static void -strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace, int flush) +strip_signature (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace, gint flush) { EMStripSigFilter *stripsig = (EMStripSigFilter *) filter; - register const char *inptr = in; - const char *inend = in + len; - const char *start = NULL; + register const gchar *inptr = in; + const gchar *inend = in + len; + const gchar *start = NULL; if (stripsig->midline) { while (inptr < inend && *inptr != '\n') @@ -132,15 +132,15 @@ strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, } static void -filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace) +filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace) { strip_signature (filter, in, len, prespace, out, outlen, outprespace, FALSE); } static void -filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace) +filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace) { strip_signature (filter, in, len, prespace, out, outlen, outprespace, TRUE); } |