diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-02 07:09:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-02 22:35:03 +0800 |
commit | 433eac7844481b8ceda0bae8bf08f6bb623185b0 (patch) | |
tree | d66a04ad4fa676b4bfce762dee09a82f4434d374 /mail | |
parent | e6c6cbdfb5fd5723ff840b24b29690235be0d74d (diff) | |
download | gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.gz gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.bz2 gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.lz gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.xz gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.zst gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.zip |
More code cleanup.
Diffstat (limited to 'mail')
39 files changed, 121 insertions, 121 deletions
diff --git a/mail/e-mail-shell-migrate.c b/mail/e-mail-shell-migrate.c index 147cce01a4..5ebc833902 100644 --- a/mail/e-mail-shell-migrate.c +++ b/mail/e-mail-shell-migrate.c @@ -97,7 +97,7 @@ emm_load_xml (const gchar *dirname, const gchar *filename) return doc; } -static int +static gint emm_save_xml (xmlDocPtr doc, const gchar *dirname, const gchar *filename) { gchar *path; @@ -1189,7 +1189,7 @@ em_migrate_set_progress (double percent) { gchar text[5]; - snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f)); + snprintf (text, sizeof (text), "%d%%", (gint) (percent * 100.0f)); gtk_progress_bar_set_fraction (progress, percent); gtk_progress_bar_set_text (progress, text); @@ -1370,9 +1370,9 @@ static gboolean cp (const gchar *src, const gchar *dest, gboolean show_progress, gint mode) { guchar readbuf[65536]; - ssize_t nread, nwritten; + gssize nread, nwritten; gint errnosav, readfd, writefd; - size_t total = 0; + gsize total = 0; struct stat st; struct utimbuf ut; @@ -1453,7 +1453,7 @@ cp_r (const gchar *src, const gchar *dest, const gchar *pattern, gint mode) { GString *srcpath, *destpath; struct dirent *dent; - size_t slen, dlen; + gsize slen, dlen; struct stat st; DIR *dir; @@ -1568,7 +1568,7 @@ em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar * /* Manually copy local mbox files, its much faster */ if (!strncmp (uri, "mbox:", 5)) { static const gchar *meta_ext[] = { ".summary", ".ibex.index", ".ibex.index.data" }; - size_t slen, dlen; + gsize slen, dlen; FILE *fp; gchar *p; gint mode; @@ -2000,7 +2000,7 @@ em_migrate_pop_uid_caches_1_4 (const gchar *data_dir, GError **error) { GString *oldpath, *newpath; struct dirent *dent; - size_t olen, nlen; + gsize olen, nlen; gchar *cache_dir; DIR *dir; gboolean success = TRUE; @@ -2109,7 +2109,7 @@ static gboolean em_migrate_folder_expand_state_1_4 (const gchar *data_dir, GError **error) { GString *srcpath, *destpath; - size_t slen, dlen, rlen; + gsize slen, dlen, rlen; gchar *evo14_mbox_root; struct dirent *dent; struct stat st; @@ -2207,7 +2207,7 @@ static gboolean em_migrate_folder_view_settings_1_4 (const gchar *data_dir, GError **error) { GString *srcpath, *destpath; - size_t slen, dlen, rlen; + gsize slen, dlen, rlen; gchar *evo14_mbox_root; struct dirent *dent; struct stat st; @@ -2243,7 +2243,7 @@ em_migrate_folder_view_settings_1_4 (const gchar *data_dir, GError **error) while ((dent = readdir (dir))) { gchar *full_name, *inptr, *buf = NULL; const gchar *filename, *ext; - size_t prelen = 0; + gsize prelen = 0; GString *new; if (dent->d_name[0] == '.') diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 277e80ca19..ed4a01c4c5 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -97,7 +97,7 @@ loop: static const gchar *ignored_tags[] = { "B", "I", "FONT", "TT", "EM", /* and more? */}; -static int +static gint ignore_tag (const gchar *tag) { gchar *t = alloca(strlen(tag)+1), c, *out; @@ -533,7 +533,7 @@ output_match(struct _searcher *s, guint start, guint end) /* output highlight/bold */ if (s->flags & SEARCH_BOLD) { - sprintf(b, "%c<b>", (char)TAG_ESCAPE); + sprintf(b, "%c<b>", (gchar)TAG_ESCAPE); append_token(&s->output, b, -1); } if (s->tags) @@ -561,7 +561,7 @@ output_match(struct _searcher *s, guint start, guint end) /* and close bold if we need to */ if (s->flags & SEARCH_BOLD) { - sprintf(b, "%c</b>", (char)TAG_ESCAPE); + sprintf(b, "%c</b>", (gchar)TAG_ESCAPE); append_token(&s->output, b, -1); } } @@ -578,7 +578,7 @@ output_subpending (struct _searcher *s) } /* returns true if a merge took place */ -static int +static gint merge_subpending (struct _searcher *s, gint offstart, gint offend) { gint i; @@ -771,7 +771,7 @@ searcher_peek_token(struct _searcher *s) return tok; } -static int +static gint searcher_pending (struct _searcher *s) { return !(e_dlist_empty(&s->input) && e_dlist_empty(&s->output)); diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 27c04c83fb..99938fadce 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -618,7 +618,7 @@ emae_signature_added(ESignatureList *signatures, ESignature *sig, EMAccountEdito gtk_combo_box_set_active(emae->priv->signatures_dropdown, gtk_tree_model_iter_n_children(model, NULL)-1); } -static int +static gint emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **modelp, GtkTreeIter *iter) { GtkTreeModel *model; @@ -1245,7 +1245,7 @@ emae_path_changed(GtkWidget *widget, EMAccountEditorService *service) emae_service_url_path_changed(service, camel_url_set_path, widget); } -static int +static gint emae_ssl_update(EMAccountEditorService *service, CamelURL *url) { gint id = gtk_combo_box_get_active(service->use_ssl); @@ -2747,7 +2747,7 @@ struct _server_prefill { {"msn", "pop3.email.msn.com", "smtp.email.msn.com", "pop", "never"} }; -static int +static gint check_servers (gchar *server) { gint len = G_N_ELEMENTS(mail_servers), i; diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 67d26f440d..74438b2043 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1106,7 +1106,7 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, flags |= EM_FORMAT_QUOTE_CITE; for (i = 0; i < messages->len; i++) { - ssize_t len; + gssize len; message = messages->pdata[i]; subject = mail_tool_generate_forward_subject (message); @@ -2214,7 +2214,7 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat * gchar *text, *credits; CamelMimePart *part; GConfClient *gconf; - ssize_t len = 0; + gssize len = 0; gboolean start_bottom; gconf = mail_config_get_gconf_client (); @@ -2273,7 +2273,7 @@ gchar * em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source) { gchar *text, *credits; - ssize_t len = 0; + gssize len = 0; gboolean start_bottom = 0; credits = attribution_format (ATTRIBUTION, message); diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c index 1e1f1495f9..145240dfbb 100644 --- a/mail/em-filter-folder-element.c +++ b/mail/em-filter-folder-element.c @@ -157,7 +157,7 @@ validate(FilterElement *fe) } } -static int +static gint folder_eq(FilterElement *fe, FilterElement *cm) { return FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm) @@ -192,7 +192,7 @@ xml_encode(FilterElement *fe) return value; } -static int +static gint xml_decode(FilterElement *fe, xmlNodePtr node) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 03d0028b6e..47c5e4d0d2 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -171,7 +171,7 @@ em_filter_rule_build_action(EMFilterRule *fr, GString *out) g_string_append(out, ")\n"); } -static int +static gint validate(FilterRule *fr) { EMFilterRule *ff =(EMFilterRule *)fr; @@ -190,7 +190,7 @@ validate(FilterRule *fr) return valid; } -static int +static gint list_eq(GList *al, GList *bl) { gint truth = TRUE; @@ -206,7 +206,7 @@ list_eq(GList *al, GList *bl) return truth && al == NULL && bl == NULL; } -static int +static gint filter_eq(FilterRule *fr, FilterRule *cm) { return FILTER_RULE_CLASS(parent_class)->eq(fr, cm) @@ -262,7 +262,7 @@ load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc) } } -static int +static gint xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc) { EMFilterRule *ff =(EMFilterRule *)fr; diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index 126cbe2a50..1fd5a518ad 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -151,7 +151,7 @@ em_filter_source_element_new(void) return (EMFilterSourceElement *)g_object_new(em_filter_source_element_get_type(), NULL, NULL); } -static int +static gint source_eq(FilterElement *fe, FilterElement *cm) { EMFilterSourceElement *fs = (EMFilterSourceElement *)fe, *cs = (EMFilterSourceElement *)cm; diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index cd3f35df0a..f1c8bdc72f 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -575,7 +575,7 @@ static MailMsgInfo vfolder_setup_info = { }; /* sources_uri should be camel uri's */ -static int +static gint vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel) { struct _setup_msg *m; @@ -610,8 +610,8 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) CamelFolder *folder; CamelStore *store; GPtrArray *folders; - GList *folder_list_account = NULL ; - GList *l, *folder_list = NULL ; + GList *folder_list_account = NULL; + GList *l, *folder_list = NULL; CamelException *ex; ex = camel_exception_new (); @@ -1054,7 +1054,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act) EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; /* Stop button */ - state = mail_msg_active((unsigned int)-1); + state = mail_msg_active((guint)-1); bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", state?"1":"0", NULL); // /* HideDeleted */ diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index b4e239e36b..70cdf88350 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -127,7 +127,7 @@ emfp_free(EConfig *ec, GSList *items, gpointer data) g_free (prop_data); } -static int +static gint add_numbered_row (GtkTable *table, gint row, const gchar *description, const gchar *format, gint num) { gchar *str; @@ -198,7 +198,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, else descr = g_strdup_printf (_("Quota usage")); - procs = (int) ((((double) info->used) / ((double) info->total)) * 100.0 + 0.5); + procs = (gint) ((((double) info->used) / ((double) info->total)) * 100.0 + 0.5); row = add_numbered_row (GTK_TABLE (table), row, descr, "%d%%", procs); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index b1ee7eff2d..adc77fdbfe 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -138,7 +138,7 @@ folder_tree_model_load_state (EMFolderTreeModel *model, xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true"); } -static int +static gint folder_tree_model_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index a98b1c9ed8..65fdf8f726 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -597,7 +597,7 @@ emft_expand_node (EMFolderTreeModel *model, const gchar *key, EMFolderTree *emft CamelStore *store; const gchar *p; gchar *uid; - size_t n; + gsize n; struct _selected_uri *u; if (!(p = strchr (key, '/'))) @@ -1374,7 +1374,7 @@ tree_autoscroll (EMFolderTree *emft) GdkRectangle rect; GdkWindow *window; gint offset, y; - float value; + gfloat value; /* get the y pointer position relative to the treeview */ tree_view = GTK_TREE_VIEW (emft); @@ -2027,7 +2027,7 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr if (event->button != 3 && !(event->button == 1 && event->type == GDK_2BUTTON_PRESS)) return FALSE; - if (!gtk_tree_view_get_path_at_pos (treeview, (int) event->x, (int) event->y, &tree_path, NULL, NULL, NULL)) + if (!gtk_tree_view_get_path_at_pos (treeview, (gint) event->x, (gint) event->y, &tree_path, NULL, NULL, NULL)) return FALSE; /* select/focus the row that was right-clicked or double-clicked */ diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 4ad9378549..f92e8e3115 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -438,7 +438,7 @@ em_folder_utils_rename_folder (CamelFolder *folder) const gchar *p; CamelStore *local_store; gboolean done = FALSE; - size_t base_len; + gsize base_len; local_store = e_mail_shell_backend_get_local_store (global_mail_shell_backend); @@ -450,7 +450,7 @@ em_folder_utils_rename_folder (CamelFolder *folder) } if ((p = strrchr (folder->full_name, '/'))) - base_len = (size_t) (p - folder->full_name); + base_len = (gsize) (p - folder->full_name); else base_len = 0; @@ -578,7 +578,7 @@ static MailMsgInfo create_folder_info = { }; -static int +static gint emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done) (CamelFolderInfo *fi, gpointer user_data), gpointer user_data) { gchar *name, *namebuf = NULL; diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 71f5a1f037..8bb0c1e336 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -572,7 +572,7 @@ mst_free (struct mst_t *mst) g_free (mst); } -static int +static gint do_mark_seen (gpointer user_data) { struct mst_t *mst = user_data; @@ -798,7 +798,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu return des_menu; } -static int +static gint emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *emfv) { GtkMenu *menu = NULL; diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index ad7cbd7144..61cc515684 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -157,7 +157,7 @@ error: return NULL; } -static int +static gint emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) { xmlNodePtr node; diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 1991c0d67f..0d1b6c545a 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1153,7 +1153,7 @@ em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar /* all this api is a pain in the bum ... */ EMFormatHTMLPObject * -em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func) +em_format_html_add_pobject(EMFormatHTML *efh, gsize size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func) { EMFormatHTMLPObject *pobj; @@ -1263,7 +1263,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled) CamelURL *url; CamelContentType *content_type; CamelHttpStream *tmp_stream; - ssize_t n, total = 0, pc_complete = 0, nread = 0; + gssize n, total = 0, pc_complete = 0, nread = 0; gchar buffer[1500]; const gchar *length; @@ -1822,7 +1822,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part s = d = url; while (*s) { /* FIXME: use camel_isspace */ - if (!isspace ((unsigned char)*s)) + if (!isspace ((guchar)*s)) *d++ = *s; s++; } diff --git a/mail/em-format-html.h b/mail/em-format-html.h index bcc9a917a9..4f9c0b209b 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -268,7 +268,7 @@ CamelMimePart * em_format_html_file_part (EMFormatHTML *efh, /* for implementers */ EMFormatHTMLPObject * em_format_html_add_pobject (EMFormatHTML *efh, - size_t size, + gsize size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func); diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c index 820e4a83af..cc3c795d32 100644 --- a/mail/em-html-stream.c +++ b/mail/em-html-stream.c @@ -56,10 +56,10 @@ emhs_gtkhtml_destroy (GtkHTML *html, emhs_cleanup (emhs); } -static ssize_t +static gssize emhs_sync_write (CamelStream *stream, const gchar *buffer, - size_t n) + gsize n) { EMHTMLStream *emhs = EM_HTML_STREAM (stream); @@ -72,10 +72,10 @@ emhs_sync_write (CamelStream *stream, gtk_html_stream_write (emhs->html_stream, buffer, n); - return (ssize_t) n; + return (gssize) n; } -static int +static gint emhs_sync_flush(CamelStream *stream) { EMHTMLStream *emhs = (EMHTMLStream *)stream; @@ -88,7 +88,7 @@ emhs_sync_flush(CamelStream *stream) return 0; } -static int +static gint emhs_sync_close (CamelStream *stream) { EMHTMLStream *emhs = (EMHTMLStream *)stream; diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c index 91dc5e10ca..384d79846f 100644 --- a/mail/em-icon-stream.c +++ b/mail/em-icon-stream.c @@ -50,7 +50,7 @@ static void em_icon_stream_class_init (EMIconStreamClass *klass); static void em_icon_stream_init (CamelObject *object); static void em_icon_stream_finalize (CamelObject *object); -static ssize_t emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n); +static gssize emis_sync_write(CamelStream *stream, const gchar *buffer, gsize n); static gint emis_sync_close(CamelStream *stream); static gint emis_sync_flush(CamelStream *stream); @@ -132,8 +132,8 @@ em_icon_stream_finalize(CamelObject *object) emis_cleanup(emis); } -static ssize_t -emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n) +static gssize +emis_sync_write(CamelStream *stream, const gchar *buffer, gsize n) { EMIconStream *emis = EM_ICON_STREAM (stream); @@ -145,10 +145,10 @@ emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n) return -1; } - return (ssize_t) n; + return (gssize) n; } -static int +static gint emis_sync_flush(CamelStream *stream) { return 0; @@ -190,7 +190,7 @@ emis_fit(GdkPixbuf *pixbuf, gint maxwidth, gint maxheight, gint *scale) return mini; } -static int +static gint emis_sync_close(CamelStream *stream) { EMIconStream *emis = (EMIconStream *)stream; diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index e8dab897a0..ddc579b40b 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -40,8 +40,8 @@ static void em_inline_filter_class_init (EMInlineFilterClass *klass); static void em_inline_filter_init (CamelObject *object); static void em_inline_filter_finalize (CamelObject *object); -static void emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace); -static void emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace); +static void emif_filter(CamelMimeFilter *f, gchar *in, gsize len, gsize prespace, gchar **out, gsize *outlen, gsize *outprespace); +static void emif_complete(CamelMimeFilter *f, gchar *in, gsize len, gsize prespace, gchar **out, gsize *outlen, gsize *outprespace); static void emif_reset(CamelMimeFilter *f); static CamelMimeFilterClass *parent_class = NULL; @@ -191,8 +191,8 @@ emif_add_part(EMInlineFilter *emif, const gchar *data, gint len) emif->parts = g_slist_append(emif->parts, part); } -static int -emif_scan(CamelMimeFilter *f, gchar *in, size_t len, gint final) +static gint +emif_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) { EMInlineFilter *emif = (EMInlineFilter *)f; gchar *inptr = in, *inend = in+len; @@ -335,7 +335,7 @@ emif_scan(CamelMimeFilter *f, gchar *in, size_t len, gint final) } static void -emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace) +emif_filter(CamelMimeFilter *f, gchar *in, gsize len, gsize prespace, gchar **out, gsize *outlen, gsize *outprespace) { emif_scan(f, in, len, FALSE); @@ -345,7 +345,7 @@ emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar ** } static void -emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace) +emif_complete(CamelMimeFilter *f, gchar *in, gsize len, gsize prespace, gchar **out, gsize *outlen, gsize *outprespace) { emif_scan(f, in, len, TRUE); diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c index a0a2a205ce..d032823bed 100644 --- a/mail/em-junk-hook.c +++ b/mail/em-junk-hook.c @@ -267,7 +267,7 @@ error: return NULL; } -static int +static gint emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) { xmlNodePtr node; diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 156e7824e0..79648a3170 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -160,7 +160,7 @@ mark_seen_timeout_transform (const GValue *src_value, { gdouble v_double; - /* Shell Settings (int) -> Spin Button (double) */ + /* Shell Settings (gint) -> Spin Button (double) */ v_double = (gdouble) g_value_get_int (src_value); g_value_set_double (dst_value, v_double / 1000.0); @@ -174,7 +174,7 @@ mark_seen_timeout_reverse_transform (const GValue *src_value, { gdouble v_double; - /* Spin Button (double) -> Shell Settings (int) */ + /* Spin Button (double) -> Shell Settings (gint) */ v_double = g_value_get_double (src_value); g_value_set_int (dst_value, v_double * 1000); diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index c5fdb54896..8bea632f24 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -246,7 +246,7 @@ static MailMsgInfo sub_subscribe_folder_info = { }; /* spath is tree path in string form */ -static int +static gint sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const gchar *spath) { struct _zsubscribe_msg *m; @@ -421,7 +421,7 @@ static MailMsgInfo sub_folderinfo_info = { (MailMsgFreeFunc) sub_folderinfo_free }; -static int +static gint sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node) { struct _emse_folderinfo_msg *m; diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c index 138932cfc7..7e93b33dde 100644 --- a/mail/em-sync-stream.c +++ b/mail/em-sync-stream.c @@ -138,7 +138,7 @@ emss_stream_write (CamelStream *stream, const gchar *string, gsize len) return (gssize) len; } -static int +static gint emss_stream_flush (CamelStream *stream) { EMSyncStream *emss = EM_SYNC_STREAM (stream); @@ -154,7 +154,7 @@ emss_stream_flush (CamelStream *stream) return 0; } -static int +static gint emss_stream_close (CamelStream *stream) { EMSyncStream *emss = EM_SYNC_STREAM (stream); diff --git a/mail/em-sync-stream.h b/mail/em-sync-stream.h index fc687fa462..16cdc272d1 100644 --- a/mail/em-sync-stream.h +++ b/mail/em-sync-stream.h @@ -61,8 +61,8 @@ struct _EMSyncStreamClass { gssize (*sync_write) (CamelStream *stream, const gchar *string, gsize len); - int (*sync_close) (CamelStream *stream); - int (*sync_flush) (CamelStream *stream); + gint (*sync_close) (CamelStream *stream); + gint (*sync_flush) (CamelStream *stream); }; CamelType em_sync_stream_get_type (void); diff --git a/mail/em-utils.c b/mail/em-utils.c index c3740d8a70..6617b041d2 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -487,7 +487,7 @@ get_unique_file_names (GSList *parts) /* if we have an extension, then place number before it (at p is ".ext"), otherwise just append number in brackets */ if (p) - new_name = g_strdup_printf ("%.*s(%d)%s", (int) (p - name), name, counter, p); + new_name = g_strdup_printf ("%.*s(%d)%s", (gint) (p - name), name, counter, p); else new_name = g_strdup_printf ("%s(%d)", name, counter); @@ -969,7 +969,7 @@ em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GP /* This kind of sucks, because for various reasons most callers need to run synchronously in the gui thread, however this could take a long, blocking time, to run */ -static int +static gint em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStream *stream) { CamelStreamFilter *filtered_stream; @@ -1014,7 +1014,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr /* This kind of sucks, because for various reasons most callers need to run synchronously in the gui thread, however this could take a long, blocking time, to run */ -static int +static gint em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream) { CamelException *ex = camel_exception_new(); @@ -1566,7 +1566,7 @@ em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri) void em_utils_adjustment_page(GtkAdjustment *adj, gboolean down) { - float page_size = adj->page_size - adj->step_increment; + gfloat page_size = adj->page_size - adj->step_increment; if (down) { if (adj->value < adj->upper - adj->page_size - page_size) @@ -1642,7 +1642,7 @@ em_utils_get_proxy_uri (const gchar *pUri) * Return value: The html version. **/ gchar * -em_utils_message_to_html(CamelMimeMessage *message, const gchar *credits, guint32 flags, ssize_t *len, EMFormat *source, const gchar *append) +em_utils_message_to_html(CamelMimeMessage *message, const gchar *credits, guint32 flags, gssize *len, EMFormat *source, const gchar *append) { EMFormatQuote *emfq; CamelStreamMem *mem; diff --git a/mail/em-utils.h b/mail/em-utils.h index 0b413edfce..63056b28f4 100644 --- a/mail/em-utils.h +++ b/mail/em-utils.h @@ -83,7 +83,7 @@ void em_utils_adjustment_page(GtkAdjustment *adj, gboolean down); gchar *em_utils_get_proxy_uri (const gchar *uri); /* FIXME: should this have an override charset? */ -gchar *em_utils_message_to_html(CamelMimeMessage *msg, const gchar *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const gchar *append); +gchar *em_utils_message_to_html(CamelMimeMessage *msg, const gchar *credits, guint32 flags, gssize *len, struct _EMFormat *source, const gchar *append); void em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder); void em_utils_empty_trash (GtkWidget *parent); diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index c75ef7d7c9..183a4a80aa 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -207,7 +207,7 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last) return NULL; } -static int +static gint validate(FilterRule *fr) { g_return_val_if_fail(fr != NULL, 0); @@ -229,7 +229,7 @@ validate(FilterRule *fr) return FILTER_RULE_CLASS(parent_class)->validate(fr); } -static int +static gint list_eq(GList *al, GList *bl) { gint truth = TRUE; @@ -245,7 +245,7 @@ list_eq(GList *al, GList *bl) return truth && al == NULL && bl == NULL; } -static int +static gint vfolder_eq(FilterRule *fr, FilterRule *cm) { return FILTER_RULE_CLASS(parent_class)->eq(fr, cm) @@ -292,7 +292,7 @@ set_with(EMVFolderRule *vr, const gchar *name) vr->with = 0; } -static int +static gint xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f) { xmlNodePtr set, work; diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index 6e65418441..1c28e2d82d 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -281,7 +281,7 @@ static MailMsgInfo elm_import_info = { (MailMsgFreeFunc) elm_import_free }; -static int +static gint mail_importer_elm_import(EImport *ei, EImportTarget *target) { struct _elm_import_msg *m; diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index e40a1df20c..a9e6b59038 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -237,7 +237,7 @@ import_mbox_exec (struct _import_mbox_msg *m) guint32 flags = 0; if (st.st_size > 0) - pc = (int)(100.0 * ((double)camel_mime_parser_tell(mp) / (double)st.st_size)); + pc = (gint)(100.0 * ((double)camel_mime_parser_tell(mp) / (double)st.st_size)); camel_operation_progress(NULL, pc); msg = camel_mime_message_new(); diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index 0c5b5fd92e..84c29b24c5 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -109,7 +109,7 @@ import_contact(EBook *book, gchar *line) GList *list; /*EContactName *name;*/ EContact *card; - size_t len; + gsize len; card = e_contact_new(); strings = g_strsplit(line, "\t", 5); @@ -168,7 +168,7 @@ import_contacts(void) gchar *name; GString *line; FILE *fp; - size_t offset; + gsize offset; printf("importing pine addressbook\n"); @@ -197,7 +197,7 @@ import_contacts(void) g_string_set_size(line, 256); offset = 0; while (fgets(line->str+offset, 256, fp)) { - size_t len; + gsize len; len = strlen(line->str+offset)+offset; if (line->str[len-1] == '\n') @@ -324,7 +324,7 @@ static MailMsgInfo pine_import_info = { (MailMsgFreeFunc) pine_import_free }; -static int +static gint mail_importer_pine_import(EImport *ei, EImportTarget *target) { struct _pine_import_msg *m; diff --git a/mail/mail-component.c b/mail/mail-component.c index e236682052..176a6cb875 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -427,7 +427,7 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev) /* Falls through */ case MC_QUIT_THREADS: /* should we keep cancelling? */ - if (mail_msg_active((unsigned int)-1)) + if (mail_msg_active((guint)-1)) return FALSE; mail_session_shutdown (); diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 0d8a3e6336..9125e94a14 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -729,7 +729,7 @@ get_folders(CamelFolderInfo *fi, GPtrArray *folders) } } -static int +static gint folder_cmp(gconstpointer ap, gconstpointer bp) { const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0]; diff --git a/mail/mail-mt.c b/mail/mail-mt.c index b4572281f4..4920ab9e80 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -384,7 +384,7 @@ gint mail_msg_active(guint msgid) gint active; MAIL_MT_LOCK(mail_msg_lock); - if (msgid == (unsigned int)-1) + if (msgid == (guint)-1) active = g_hash_table_size(mail_msg_active_table) > 0; else active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL; @@ -688,7 +688,7 @@ do_async_event(struct _proxy_msg *m) g_mutex_unlock(m->ea->lock); } -static int +static gint idle_async_event(gpointer mm) { do_async_event(mm); @@ -831,7 +831,7 @@ do_call(struct _call_msg *m) case MAIL_CALL_p_ppippp: p1 = va_arg(ap, gpointer ); p2 = va_arg(ap, gpointer ); - i1 = va_arg(ap, int); + i1 = va_arg(ap, gint); p3 = va_arg(ap, gpointer ); p4 = va_arg(ap, gpointer ); p5 = va_arg(ap, gpointer ); diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index aa1f1afec0..03775c74d1 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -97,7 +97,7 @@ typedef enum { SEND_SEND, /* sender */ SEND_UPDATE, /* imap-like 'just update folder info' */ SEND_INVALID -} send_info_t ; +} send_info_t; typedef enum { SEND_ACTIVE, @@ -259,7 +259,7 @@ dialog_response(GtkDialog *gd, gint button, struct _send_data *data) } } -static int +static gint operation_status_timeout(gpointer data) { struct _send_info *info = data; diff --git a/mail/mail-tools.c b/mail/mail-tools.c index bc8a3fd3ec..67407ae81f 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -115,7 +115,7 @@ mail_tool_get_local_movemail_path (const guchar *uri, CamelException *ex) safe_uri = (guchar *)g_strdup ((const gchar *)uri); for (c = safe_uri; *c; c++) - if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c)) + if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((gint) *c)) *c = '_'; shell_backend = E_SHELL_BACKEND (global_mail_shell_backend); diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index d2952cdfe5..c018b9eea9 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -171,7 +171,7 @@ static MailMsgInfo vfolder_setup_info = { }; /* sources_uri should be camel uri's */ -static int +static gint vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder) { struct _setup_msg *m; @@ -302,7 +302,7 @@ static MailMsgInfo vfolder_adduri_info = { /* uri should be a camel uri */ -static int +static gint vfolder_adduri(const gchar *uri, GList *folders, gint remove) { struct _adduri_msg *m; @@ -333,7 +333,7 @@ mv_find_folder(GList *l, CamelStore *store, const gchar *uri) } /* uri is a camel uri */ -static int +static gint uri_is_ignore(CamelStore *store, const gchar *uri) { EAccountList *accounts; @@ -396,7 +396,7 @@ uri_is_ignore(CamelStore *store, const gchar *uri) } /* so special we never use it */ -static int +static gint uri_is_spethal(CamelStore *store, const gchar *uri) { CamelURL *url; diff --git a/mail/message-list.c b/mail/message-list.c index 1291a1404c..d28e9a9d0e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -297,7 +297,7 @@ e_mail_address_free (EMailAddress *addr) /* Note: by the time this function is called, the strings have already been normalised which means we can assume all lowercase chars and we can just use strcmp for the final comparison. */ -static int +static gint e_mail_address_compare (gconstpointer address1, gconstpointer address2) { const EMailAddress *addr1 = address1; @@ -359,7 +359,7 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2) /* Note: by the time this function is called, the strings have already been normalised which means we can assume all lowercase chars and we can just use strcmp for the final comparison. */ -static int +static gint address_compare (gconstpointer address1, gconstpointer address2) { #ifdef SMART_ADDRESS_COMPARE @@ -479,12 +479,12 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint c subject += 3; /* jump over any spaces */ - while (*subject && isspace ((int) *subject)) + while (*subject && isspace ((gint) *subject)) subject++; } /* jump over any spaces */ - while (*subject && isspace ((int) *subject)) + while (*subject && isspace ((gint) *subject)) subject++; string = (const gchar *) subject; @@ -865,7 +865,7 @@ message_list_paste(MessageList *ml) /* * SimpleTableModel::col_count */ -static int +static gint ml_column_count (ETreeModel *etm, gpointer data) { return COL_LAST; @@ -1140,7 +1140,7 @@ ml_tree_icon_at (ETreeModel *etm, ETreePath path, gpointer model_data) } /* return true if there are any unread messages in the subtree */ -static int +static gint subtree_unread(MessageList *ml, ETreePath node) { CamelMessageInfo *info; @@ -1235,7 +1235,7 @@ sanitize_recipients (const gchar *string) return g_string_free (recipients, FALSE); } -static int +static gint get_all_labels (MessageList *message_list, CamelMessageInfo *msg_info, gchar **label_str, @@ -1384,7 +1384,7 @@ get_trimmed_subject (CamelMessageInfo *info) subject += 3; /* jump over any spaces */ - while (*subject && isspace ((int) *subject)) + while (*subject && isspace ((gint) *subject)) subject++; } @@ -1396,13 +1396,13 @@ get_trimmed_subject (CamelMessageInfo *info) found_mlist = TRUE; /* jump over any spaces */ - while (*subject && isspace ((int) *subject)) + while (*subject && isspace ((gint) *subject)) subject++; } } while (found_mlist); /* jump over any spaces */ - while (*subject && isspace ((int) *subject)) + while (*subject && isspace ((gint) *subject)) subject++; return subject; @@ -3017,7 +3017,7 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint /* compares a thread tree node with the etable tree node to see if they point to the same object */ -static int +static gint node_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp) { CamelMessageInfo *info; @@ -3032,7 +3032,7 @@ node_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp) #ifndef BROKEN_ETREE /* debug function - compare the two trees to see if they are the same */ -static int +static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp) { CamelMessageInfo *info; @@ -3157,7 +3157,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde gpointer olduid, oldrow; /* if this is a message row, check/update the row id map */ if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), &olduid, &oldrow)) { - if ((int)oldrow != (*row)) { + if ((gint)oldrow != (*row)) { g_hash_table_insert(ml->uid_rowmap, olduid, (gpointer)(*row)); } } else { @@ -3900,7 +3900,7 @@ message_list_ensure_message (MessageList *ml, const gchar *uid) } /* returns the number of messages displayable *after* expression hiding has taken place */ -unsigned int +guint message_list_length (MessageList *ml) { return ml->hide_unhidden; @@ -3928,7 +3928,7 @@ glib_crapback(gpointer key, gpointer data, gpointer x) } /* returns 0 or 1 depending if there are hidden messages */ -unsigned int +guint message_list_hidden(MessageList *ml) { guint hidden = 0; @@ -3991,7 +3991,7 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids) uid = e_mempool_strdup (ml->hidden_pool, uids->pdata[i]); g_hash_table_insert (ml->hidden, uid, uid); - for ( ; i < uids->len; i++) { + for (; i < uids->len; i++) { if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) { uid = e_mempool_strdup (ml->hidden_pool, uids->pdata[i]); g_hash_table_insert (ml->hidden, uid, uid); @@ -4657,7 +4657,7 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca } -double +gdouble message_list_get_scrollbar_position (MessageList *ml) { return gtk_range_get_value ((GtkRange *) ((GtkScrolledWindow *) ml)->vscrollbar); diff --git a/mail/message-list.h b/mail/message-list.h index 47d3708b5e..6c5dcf60cb 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -240,7 +240,7 @@ void message_list_ensure_message (MessageList *ml, const gchar *uid); void message_list_save_state (MessageList *ml); -double message_list_get_scrollbar_position (MessageList *ml); +gdouble message_list_get_scrollbar_position (MessageList *ml); void message_list_set_scrollbar_position (MessageList *ml, double pos); #define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l) diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index 994bbe3214..9959f99142 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -212,7 +212,7 @@ completed_toggled (GtkToggleButton *button, gpointer user_data) followup->completed_date = 0; } -static int +static gint get_week_start_day (void) { GConfClient *gconf; |