diff options
Diffstat (limited to 'addressbook')
20 files changed, 75 insertions, 75 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 2b7aad0812..ed17e40a0e 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -167,7 +167,7 @@ struct _EAddrConduitCfg { * in UTF-8 format. A conversion must take place before calling * this function (see e_pilot_utf8_to_pchar() in e-pilot-util.c) */ -static int +static gint e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *category) { gint i, j; @@ -965,7 +965,7 @@ is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local) if (empty) continue; - for ( ; priority_label[l] != -1; l++) + for (; priority_label[l] != -1; l++) if (phonelabel == priority_label[l]) break; @@ -1268,7 +1268,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui phone++; } } - for ( ; phone <= entryPhone5; phone++) + for (; phone <= entryPhone5; phone++) local->addr->phoneLabel[phone - entryPhone1] = phone - entryPhone1; local->addr->showPhone = 0; } else { diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index ec715b7cb9..521551e66b 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -332,7 +332,7 @@ impl_handleURI (PortableServer_Servant servant, EUri *euri = e_uri_new (uri); const gchar *p; gchar *header, *content; - size_t len, clen; + gsize len, clen; p = euri->query; if (p) { diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 46ab002ecb..5c925ce3de 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -306,7 +306,7 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap) return ldap_error; } -static int +static gint addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap, const gchar **attrs, LDAPMessage **resp) { diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 8ba997cd3e..c4272742cc 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -142,7 +142,7 @@ dialog_set_progress (MigrationContext *context, 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 (GTK_PROGRESS_BAR (context->progress), percent); gtk_progress_bar_set_text (GTK_PROGRESS_BAR (context->progress), text); @@ -186,7 +186,7 @@ get_source_name (ESourceGroup *group, const gchar *path) gboolean conflict; GString *s = g_string_new (""); - for (i = 0; p[i]; i ++) ; + for (i = 0; p[i]; i ++); num_elements = i; i--; @@ -586,7 +586,7 @@ get_string_child (xmlNode *node, return retval; } -static int +static gint get_integer_child (xmlNode *node, const gchar *name, gint defval) @@ -779,7 +779,7 @@ migrate_completion_folders (MigrationContext *context) if the physical_uri is anything else, we strip off the args - (anything after ;) before searching + (anything after;) before searching for the uri. */ if (!strncmp (physical_uri, "file://", 7)) { @@ -1018,9 +1018,9 @@ migrate_pilot_data (const gchar *old_path, const gchar *new_path) ((ext = strrchr (dent, '.')) && !strcmp (ext, ".db")))) { /* src and dest file formats are identical for both map and changelog files */ guchar inbuf[4096]; - size_t nread, nwritten; + gsize nread, nwritten; gint fd0, fd1; - ssize_t n; + gssize n; filename = g_build_filename (old_path, dent, NULL); if ((fd0 = g_open (filename, O_RDONLY | O_BINARY, 0)) == -1) { diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 3ce0a855b9..e70225ba31 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -452,7 +452,7 @@ static gboolean folder_can_delete (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; - ESource *source ; + ESource *source; const gchar *source_uri; source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h index 630e12e4f6..996bf370a8 100644 --- a/addressbook/gui/component/openldap-extract.h +++ b/addressbook/gui/component/openldap-extract.h @@ -147,7 +147,7 @@ struct token { gchar *sval; }; -static int +static gint get_token( const gchar ** sp, gchar ** token_val ) { gint kind; @@ -743,7 +743,7 @@ ldap_str2objectclass( LDAP_CONST gchar * s, static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) { - for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) { + for(; *str != '\0'; LDAP_UTF8_INCR(str) ) { if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) { return (gchar *) str; } @@ -752,7 +752,7 @@ static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) return NULL; } -static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set ) +static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set ) { const gchar *cstr; const gchar *cset; @@ -768,7 +768,7 @@ static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set ) return cstr - str; } -static size_t ldap_utf8_strspn( const gchar *str, const gchar *set ) +static gsize ldap_utf8_strspn( const gchar *str, const gchar *set ) { const gchar *cstr; const gchar *cset; @@ -843,15 +843,15 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last) typedef struct ldap_url_desc { struct ldap_url_desc *lud_next; - char *lud_scheme; - char *lud_host; - int lud_port; - char *lud_dn; - char **lud_attrs; - int lud_scope; - char *lud_filter; - char **lud_exts; - int lud_crit_exts; + gchar *lud_scheme; + gchar *lud_host; + gint lud_port; + gchar *lud_dn; + gchar **lud_attrs; + gint lud_scope; + gchar *lud_filter; + gchar **lud_exts; + gint lud_crit_exts; } LDAPURLDesc; /* from url.c */ @@ -979,7 +979,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp ) LDAP_FREE( ludp ); } -static int +static gint ldap_int_unhex( gint c ) { return( c >= '0' && c <= '9' ? c - '0' @@ -994,7 +994,7 @@ ldap_pvt_hex_unescape( gchar *s ) * Remove URL hex escapes from s... done in place. The basic concept for * this routine is borrowed from the WWW library HTUnEscape() routine. */ - char *p; + gchar *p; for ( p = s; *s != '\0'; ++s ) { if ( *s == '%' ) { @@ -1017,10 +1017,10 @@ ldap_pvt_hex_unescape( gchar *s ) static gchar ** ldap_str2charray( const gchar *str_in, const gchar *brkstr ) { - char **res; - char *str, *s; - char *lasts; - int i; + gchar **res; + gchar *str, *s; + gchar *lasts; + gint i; /* protect the input string from strtok */ str = LDAP_STRDUP( str_in ); @@ -1051,7 +1051,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) res[i] = LDAP_STRDUP( s ); if(res[i] == NULL) { - for( --i ; i >= 0 ; i-- ) { + for( --i; i >= 0; i-- ) { LDAP_FREE( res[i] ); } LDAP_FREE( res ); @@ -1068,7 +1068,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) return( res ); } -static int +static gint ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { /* @@ -1076,8 +1076,8 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) */ LDAPURLDesc *ludp; - char *p, *q, *r; - int i, enclosed; + gchar *p, *q, *r; + gint i, enclosed; const gchar *scheme = NULL; const gchar *url_tmp; gchar *url; @@ -1162,7 +1162,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } if ( q != NULL ) { - char *next; + gchar *next; *q++ = '\0'; ldap_pvt_hex_unescape( q ); @@ -1392,7 +1392,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) return LDAP_URL_SUCCESS; } -static int +static gint ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { gint rc = ldap_url_parse_ext( url_in, ludpp ); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 0ba954320f..e2468ee6dd 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -444,7 +444,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style) return string; } -static int +static gint file_as_get_style (EContactEditor *editor) { GtkEntry *file_as = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (glade_xml_get_widget(editor->gui, "combo-file-as")))); @@ -1482,7 +1482,7 @@ fill_in_im (EContactEditor *editor) /* Clear */ - for (record_n = 1 ; record_n <= IM_SLOTS; record_n++) { + for (record_n = 1; record_n <= IM_SLOTS; record_n++) { fill_in_im_record (editor, record_n, -1, NULL, -1); } diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 983de5dab6..6e6224835c 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -183,7 +183,7 @@ dropdown_changed (GtkWidget *dropdown, dropdown_data *data) return; } -static int +static gint mergeit (EContactMergingLookup *lookup) { GtkWidget *scrolled_window, *label, *hbox, *dropdown; @@ -218,7 +218,7 @@ mergeit (EContactMergingLookup *lookup) num_of_email = g_list_length (email_attr_list); /*we match all the string fields of the already existing contact and the new contact.*/ - for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) { + for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { dropdown_data *data = NULL; string = (gchar *)e_contact_get_const (lookup->contact, field); string1 = (gchar *)e_contact_get_const (lookup->match, field); @@ -369,7 +369,7 @@ check_if_same (EContact *contact, EContact *match) gint num_of_email; gchar *str = NULL, *string = NULL, *string1 = NULL; - for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) { + for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL); num_of_email = g_list_length (email_attr_list); diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 2176fc3915..7389cdc8c6 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -188,7 +188,7 @@ create_contact(EBookView *book_view, model->data = g_renew(EContact *, model->data, model->allocated_count); } - for ( ; contacts; contacts = contacts->next) { + for (; contacts; contacts = contacts->next) { model->data[model->data_count++] = contacts->data; g_object_ref (contacts->data); } @@ -235,7 +235,7 @@ modify_contact(EBookView *book_view, const GList *contacts, EABModel *model) { - for ( ; contacts; contacts = contacts->next) { + for (; contacts; contacts = contacts->next) { gint i; for ( i = 0; i < model->data_count; i++) { if ( !strcmp(e_contact_get_const(model->data[i], E_CONTACT_UID), diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 6258ed28ca..56f64e158b 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -98,7 +98,7 @@ unlink_model(EAddressbookReflowAdapter *adapter) } -static int +static gint text_height (PangoLayout *layout, const gchar *text) { gint height; @@ -124,7 +124,7 @@ addressbook_set_width (EReflowModel *erm, gint width) } /* This function returns the number of items in our EReflowModel. */ -static int +static gint addressbook_count (EReflowModel *erm) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); @@ -134,7 +134,7 @@ addressbook_count (EReflowModel *erm) } /* This function returns the height of the minicontact in question */ -static int +static gint addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); @@ -180,7 +180,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) return height; } -static int +static gint addressbook_compare (EReflowModel *erm, gint n1, gint n2) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); @@ -222,7 +222,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2) } } -static int +static gint adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter *adapter) { gint ret_val = 0; diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 59e670e772..f285d76493 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -87,14 +87,14 @@ addressbook_dispose(GObject *object) } /* This function returns the number of columns in our ETableModel. */ -static int +static gint addressbook_col_count (ETableModel *etc) { return COLS; } /* This function returns the number of rows in our ETableModel. */ -static int +static gint addressbook_row_count (ETableModel *etc) { EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index ed726db613..53cd6aadec 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1447,7 +1447,7 @@ query_changed (ESearchBar *esb, EABView *view) } } -static int +static gint compare_subitems (gconstpointer a, gconstpointer b) { const ESearchBarItem *subitem_a = a; @@ -1946,7 +1946,7 @@ void eab_view_save_as (EABView *view, gboolean all) { GList *list = NULL; - EBook *book ; + EBook *book; g_object_get(view->model, "book", &book, diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 8cb68bb504..9461dca3ae 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -123,7 +123,7 @@ clear_drag_data (EMinicardView *view) view->drag_list = NULL; } -static int +static gint e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, EMinicardView *view) { GdkDragContext *context; @@ -477,7 +477,7 @@ do_remove (gint i, gpointer user_data) } #if 0 -static int +static gint compare_to_utf_str (EMinicard *card, const gchar *utf_str) { g_return_val_if_fail(card != NULL, 0); diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 30f326402a..1a021bea04 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -903,7 +903,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g g_list_free (emails); } -static int +static gint get_left_width (EMinicard *e_minicard, gboolean is_list) { gchar *name; diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 1e39b10cf0..40e75523cc 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -188,11 +188,11 @@ eab_uri_popup_free(EPopup *ep, GSList *list, gpointer data) } } -static int +static gint eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const gchar *uri) { EABPopup *emp; - EABPopupTargetURI *t ; + EABPopupTargetURI *t; GtkMenu *menu; GSList *menus = NULL; gint i; @@ -801,8 +801,8 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac max_dimension = calced_height; if (max_dimension > MAX_COMPACT_IMAGE_DIMENSION) { - calced_width *= ((float)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); - calced_height *= ((float)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); + calced_width *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); + calced_height *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); } } @@ -923,7 +923,7 @@ eab_contact_display_render (EABContactDisplay *display, EContact *contact, } } -static int +static gint eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *display) { gchar *uri; diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index e56b816af2..78b99cf6a4 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -355,7 +355,7 @@ eab_popup_control_query (EABPopupControl *pop) g_object_ref (pop); - eab_popup_control_no_matches (pop) ; + eab_popup_control_no_matches (pop); g_object_unref (pop); diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index ae9b916e54..8ff48bede6 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -122,15 +122,15 @@ gal_view_minicard_class_init (GObjectClass *object_class) GalViewClass *gal_view_class = GAL_VIEW_CLASS(object_class); gal_view_minicard_parent_class = g_type_class_ref (PARENT_TYPE); - gal_view_class->edit = NULL ; - gal_view_class->load = gal_view_minicard_load ; - gal_view_class->save = gal_view_minicard_save ; - gal_view_class->get_title = gal_view_minicard_get_title ; - gal_view_class->set_title = gal_view_minicard_set_title ; + gal_view_class->edit = NULL; + gal_view_class->load = gal_view_minicard_load; + gal_view_class->save = gal_view_minicard_save; + gal_view_class->get_title = gal_view_minicard_get_title; + gal_view_class->set_title = gal_view_minicard_set_title; gal_view_class->get_type_code = gal_view_minicard_get_type_code; - gal_view_class->clone = gal_view_minicard_clone ; + gal_view_class->clone = gal_view_minicard_clone; - object_class->dispose = gal_view_minicard_dispose ; + object_class->dispose = gal_view_minicard_dispose; } static void diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 0456f81b19..9cce21d548 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -570,12 +570,12 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { line = g_string_new(""); while (1) { - c = fgetc (f) ; + c = fgetc (f); if (c == EOF) return NULL; if (c == '\n') { g_string_append_c (line, c); - break ; + break; } if (c == '"') { g_string_append_c (line, c); @@ -594,12 +594,12 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { g_string_free (line, TRUE); line = g_string_new(""); while (1) { - c = fgetc (f) ; + c = fgetc (f); if (c == EOF) return NULL; if (c == '\n') { g_string_append_c (line, c); - break ; + break; } if (c == '"') { g_string_append_c (line, c); diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 6c6710a479..cc55b97769 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -298,7 +298,7 @@ e_contact_start_new_column (EContactPrintContext *ctxt) } } -static int +static gint contact_compare (EContact *contact1, EContact *contact2) { const gchar *field1, *field2; diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index ec8fccb5ba..b3450a29cf 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -104,7 +104,7 @@ eab_name_and_email_query (EBook *book, while (*t && *t != '@') ++t; if (*t == '@' && escaped_name) { - email_query = g_strdup_printf ("(beginswith \"email\" \"%.*s@\")", (int)(t-escaped_email), escaped_email); + email_query = g_strdup_printf ("(beginswith \"email\" \"%.*s@\")", (gint)(t-escaped_email), escaped_email); } else { email_query = g_strdup_printf ("(beginswith \"email\" \"%s\")", escaped_email); |