aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/em-format-quote.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
commit948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch)
tree4133b1adfd94d8f889ca7ad4ad851346518f4171 /em-format/em-format-quote.c
parentcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff)
downloadgsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'em-format/em-format-quote.c')
-rw-r--r--em-format/em-format-quote.c50
1 files changed, 25 insertions, 25 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 &lt;", 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]);