diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/addressbook/addressbook-config.c | 276 | ||||
-rw-r--r-- | modules/addressbook/e-book-shell-content.h | 3 | ||||
-rw-r--r-- | modules/addressbook/e-book-shell-sidebar.h | 3 | ||||
-rw-r--r-- | modules/addressbook/openldap-extract.h | 530 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-migrate.c | 11 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.h | 3 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-migrate.c | 10 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-sidebar.h | 3 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.h | 3 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.h | 3 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.h | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-content.h | 3 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.h | 3 | ||||
-rw-r--r-- | modules/mail/em-composer-prefs.c | 4 | ||||
-rw-r--r-- | modules/mail/em-mailer-prefs.c | 28 | ||||
-rw-r--r-- | modules/mail/em-network-prefs.c | 36 | ||||
-rw-r--r-- | modules/plugin-mono/e-plugin-mono.c | 2 | ||||
-rw-r--r-- | modules/plugin-python/e-plugin-python.c | 2 | ||||
-rw-r--r-- | modules/windows-sens/evolution-windows-sens.c | 46 |
20 files changed, 494 insertions, 481 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 7d398f855d..b275590cf5 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -372,7 +372,7 @@ search_base_selection_model_changed (GtkTreeSelection *selection, GtkWidget *dia { gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, - gtk_tree_selection_get_selected(selection, NULL, NULL)); + gtk_tree_selection_get_selected (selection, NULL, NULL)); } static void @@ -416,8 +416,8 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) gchar *dn; gtk_tree_model_get (model, &iter, 0, &dn, -1); - gtk_entry_set_text((GtkEntry *)sdialog->rootdn, dn); - g_free(dn); + gtk_entry_set_text ((GtkEntry *)sdialog->rootdn, dn); + g_free (dn); } } @@ -429,28 +429,28 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) GtkWidget* addressbook_config_create_new_source (GtkWidget *parent) { - return addressbook_config_edit_source(parent, NULL); + return addressbook_config_edit_source (parent, NULL); } /* ********************************************************************** */ static void -eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) +eabc_type_changed (GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) { - gint id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active (dropdown); GtkTreeModel *model; GtkTreeIter iter; - model = gtk_combo_box_get_model(dropdown); - if (id == -1 || !gtk_tree_model_iter_nth_child(model, &iter, NULL, id)) + model = gtk_combo_box_get_model (dropdown); + if (id == -1 || !gtk_tree_model_iter_nth_child (model, &iter, NULL, id)) return; /* TODO: when we change the group type, we lose all of the pre-filled dialog info */ - gtk_tree_model_get(model, &iter, 1, &sdialog->source_group, -1); + gtk_tree_model_get (model, &iter, 1, &sdialog->source_group, -1); /* HACK: doesn't work if you don't do this */ - e_source_set_absolute_uri(sdialog->source, NULL); - e_source_set_group(sdialog->source, sdialog->source_group); + e_source_set_absolute_uri (sdialog->source, NULL); + e_source_set_group (sdialog->source, sdialog->source_group); /* BIG HACK: We load the defaults for each type here. I guess plugins will have to use the do it in their factory callbacks */ @@ -459,7 +459,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) ESource *source; gchar *tmp; - l = e_source_group_peek_sources(sdialog->source_group); + l = e_source_group_peek_sources (sdialog->source_group); if (l && l->data ) { source = l->data; e_source_set_property(sdialog->source, "auth", e_source_get_property(source, "auth")); @@ -488,11 +488,11 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source)); } - e_config_target_changed((EConfig *)sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD); + e_config_target_changed ((EConfig *)sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD); } static GtkWidget * -eabc_general_type(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_general_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkComboBox *dropdown; @@ -506,49 +506,49 @@ eabc_general_type(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * if (old) return old; - w = gtk_hbox_new(FALSE, 6); + w = gtk_hbox_new (FALSE, 6); label = gtk_label_new_with_mnemonic(_("_Type:")); - gtk_box_pack_start((GtkBox *)w, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *)w, label, FALSE, FALSE, 0); - dropdown = (GtkComboBox *)gtk_combo_box_new(); - cell = gtk_cell_renderer_text_new(); - store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); + dropdown = (GtkComboBox *)gtk_combo_box_new (); + cell = gtk_cell_renderer_text_new (); + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); i = 0; - for (l=sdialog->menu_source_groups;l;l=g_slist_next(l)) { + for (l=sdialog->menu_source_groups;l;l=g_slist_next (l)) { ESourceGroup *group = l->data; - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, 0, e_source_group_peek_name(group), 1, group, -1); - if (e_source_peek_group(sdialog->source) == group) + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, e_source_group_peek_name (group), 1, group, -1); + if (e_source_peek_group (sdialog->source) == group) row = i; i++; } - gtk_cell_layout_pack_start((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); gtk_cell_layout_set_attributes((GtkCellLayout *)dropdown, cell, "text", 0, NULL); - gtk_combo_box_set_model(dropdown, (GtkTreeModel *)store); - gtk_combo_box_set_active(dropdown, -1); - gtk_combo_box_set_active(dropdown, row); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_active (dropdown, -1); + gtk_combo_box_set_active (dropdown, row); g_signal_connect(dropdown, "changed", G_CALLBACK(eabc_type_changed), sdialog); - gtk_widget_show((GtkWidget *)dropdown); - gtk_box_pack_start((GtkBox *)w, (GtkWidget *)dropdown, TRUE, TRUE, 0); - gtk_label_set_mnemonic_widget((GtkLabel *)label, (GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *)dropdown); + gtk_box_pack_start ((GtkBox *)w, (GtkWidget *)dropdown, TRUE, TRUE, 0); + gtk_label_set_mnemonic_widget ((GtkLabel *)label, (GtkWidget *)dropdown); - gtk_box_pack_start((GtkBox *)parent, (GtkWidget *)w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *)parent, (GtkWidget *)w, FALSE, FALSE, 0); - gtk_widget_show_all(w); + gtk_widget_show_all (w); return (GtkWidget *)w; } static void -name_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +name_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { e_source_set_name (sdialog->source, gtk_entry_get_text (GTK_ENTRY (sdialog->display_name))); } static GtkWidget * -eabc_general_name(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_general_name (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; const gchar *uri; @@ -561,22 +561,22 @@ eabc_general_name(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "ldap-config.ui"); - w = e_builder_get_widget(builder, item->label); - gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); + w = e_builder_get_widget (builder, item->label); + gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); sdialog->display_name = e_builder_get_widget (builder, "account-editor-display-name-entry"); g_signal_connect(sdialog->display_name, "changed", G_CALLBACK(name_changed_cb), sdialog); - gtk_entry_set_text((GtkEntry *)sdialog->display_name, e_source_peek_name(sdialog->source)); + gtk_entry_set_text ((GtkEntry *)sdialog->display_name, e_source_peek_name (sdialog->source)); /* Hardcoded: groupwise can't edit the name (or anything else) */ if (sdialog->original_source) { uri = e_source_group_peek_base_uri (sdialog->source_group); if (uri && strncmp(uri, "groupwise:", 10) == 0) { - gtk_widget_set_sensitive (GTK_WIDGET(sdialog->display_name), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (sdialog->display_name), FALSE); } } - g_object_unref(builder); + g_object_unref (builder); return w; } @@ -623,7 +623,7 @@ offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_general_offline(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_general_offline (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *offline_setting; @@ -665,7 +665,7 @@ form_ldap_search_filter (GtkWidget *w) } static void -url_changed(AddressbookSourceDialog *sdialog) +url_changed (AddressbookSourceDialog *sdialog) { gchar *str, *search_filter; @@ -682,15 +682,15 @@ url_changed(AddressbookSourceDialog *sdialog) } static void -host_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +host_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - url_changed(sdialog); + url_changed (sdialog); } static void -port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +port_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - const gchar *port = gtk_entry_get_text((GtkEntry *)w); + const gchar *port = gtk_entry_get_text ((GtkEntry *)w); if (!strcmp (port, LDAPS_PORT_STRING)) { sdialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS; @@ -700,11 +700,11 @@ port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) gtk_widget_set_sensitive (sdialog->ssl_combobox, TRUE); } - url_changed(sdialog); + url_changed (sdialog); } static void -ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +ssl_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { sdialog->ssl = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); e_source_set_property (sdialog->source, "ssl", ldap_unparse_ssl (sdialog->ssl)); @@ -713,7 +713,7 @@ ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_general_host (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; const gchar *tmp; @@ -722,19 +722,19 @@ eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * LDAPURLDesc *lud; GtkBuilder *builder; - if (!source_group_is_remote(sdialog->source_group)) + if (!source_group_is_remote (sdialog->source_group)) return NULL; builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "ldap-config.ui"); - w = e_builder_get_widget(builder, item->label); - gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); + w = e_builder_get_widget (builder, item->label); + gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); - uri = e_source_get_uri(sdialog->source); - if (ldap_url_parse(uri, &lud) != LDAP_SUCCESS) + uri = e_source_get_uri (sdialog->source); + if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS) lud = NULL; - g_free(uri); + g_free (uri); sdialog->host = e_builder_get_widget (builder, "server-name-entry"); gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : ""); @@ -760,15 +760,15 @@ eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * gtk_widget_set_sensitive (sdialog->ssl_combobox, strcmp (port, LDAPS_PORT_STRING) != 0); g_signal_connect (sdialog->ssl_combobox, "changed", G_CALLBACK (ssl_combobox_changed_cb), sdialog); - g_object_unref(builder); + g_object_unref (builder); return w; } static void -auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +auth_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - const gchar *principal = gtk_entry_get_text((GtkEntry *)w); + const gchar *principal = gtk_entry_get_text ((GtkEntry *)w); /* seems messy ... but the api is */ switch (sdialog->auth) { @@ -789,37 +789,37 @@ auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) } static void -auth_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +auth_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { sdialog->auth = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); e_source_set_property (sdialog->source, "auth", ldap_unparse_auth (sdialog->auth)); /* make sure the right property is set for the auth - ugh, funny api */ - auth_entry_changed_cb(sdialog->auth_principal, sdialog); + auth_entry_changed_cb (sdialog->auth_principal, sdialog); } static GtkWidget * -eabc_general_auth(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_general_auth (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *w; const gchar *tmp; GtkBuilder *builder; - if (!source_group_is_remote(sdialog->source_group)) + if (!source_group_is_remote (sdialog->source_group)) return NULL; builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "ldap-config.ui"); - w = e_builder_get_widget(builder, item->label); - gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); + w = e_builder_get_widget (builder, item->label); + gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); sdialog->auth_combobox = e_builder_get_widget (builder, "auth-combobox"); gtk_widget_set_has_tooltip (sdialog->auth_combobox, TRUE); gtk_widget_set_tooltip_text (sdialog->auth_combobox, _("This is the method Evolution will use to authenticate you. Note that setting this to \"Email Address\" requires anonymous access to your LDAP server.")); tmp = e_source_get_property(sdialog->source, "auth"); - sdialog->auth = tmp ? ldap_parse_auth(tmp) : ADDRESSBOOK_LDAP_AUTH_NONE; + sdialog->auth = tmp ? ldap_parse_auth (tmp) : ADDRESSBOOK_LDAP_AUTH_NONE; gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->auth_combobox), sdialog->auth); g_signal_connect (sdialog->auth_combobox, "changed", G_CALLBACK(auth_combobox_changed_cb), sdialog); @@ -839,15 +839,15 @@ eabc_general_auth(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * gtk_entry_set_text((GtkEntry *)sdialog->auth_principal, tmp?tmp:""); g_signal_connect (sdialog->auth_principal, "changed", G_CALLBACK (auth_entry_changed_cb), sdialog); - g_object_unref(builder); + g_object_unref (builder); return w; } static void -rootdn_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +rootdn_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - url_changed(sdialog); + url_changed (sdialog); } static void @@ -857,14 +857,14 @@ search_filter_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) } static void -scope_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +scope_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { sdialog->scope = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); - url_changed(sdialog); + url_changed (sdialog); } static GtkWidget * -eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_details_search (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *w; @@ -872,19 +872,19 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget gchar *uri; GtkBuilder *builder; - if (!source_group_is_remote(sdialog->source_group)) + if (!source_group_is_remote (sdialog->source_group)) return NULL; builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "ldap-config.ui"); - w = e_builder_get_widget(builder, item->label); - gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); + w = e_builder_get_widget (builder, item->label); + gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); - uri = e_source_get_uri(sdialog->source); - if (ldap_url_parse(uri, &lud) != LDAP_SUCCESS) + uri = e_source_get_uri (sdialog->source); + if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS) lud = NULL; - g_free(uri); + g_free (uri); sdialog->rootdn = e_builder_get_widget (builder, "rootdn-entry"); gtk_entry_set_text((GtkEntry *)sdialog->rootdn, lud && lud->lud_dn ? lud->lud_dn : ""); @@ -915,18 +915,18 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget g_signal_connect (sdialog->search_filter, "changed", G_CALLBACK (search_filter_changed_cb), sdialog); g_signal_connect (e_builder_get_widget(builder, "rootdn-button"), "clicked", - G_CALLBACK(query_for_supported_bases), sdialog); + G_CALLBACK (query_for_supported_bases), sdialog); if (lud) ldap_free_urldesc (lud); - g_object_unref(builder); + g_object_unref (builder); return w; } static void -timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +timeout_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { GtkAdjustment *adjustment; GtkRange *range; @@ -936,11 +936,11 @@ timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) adjustment = gtk_range_get_adjustment (range); timeout = g_strdup_printf("%f", gtk_adjustment_get_value (adjustment)); e_source_set_property(sdialog->source, "timeout", timeout); - g_free(timeout); + g_free (timeout); } static void -limit_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) +limit_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { gchar limit[16]; @@ -958,7 +958,7 @@ canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source) } static GtkWidget * -eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +eabc_details_limit (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkAdjustment *adjustment; @@ -967,34 +967,34 @@ eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget const gchar *tmp; GtkBuilder *builder; - if (!source_group_is_remote(sdialog->source_group)) + if (!source_group_is_remote (sdialog->source_group)) return NULL; builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "ldap-config.ui"); - w = e_builder_get_widget(builder, item->label); - gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0); + w = e_builder_get_widget (builder, item->label); + gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); sdialog->timeout_scale = e_builder_get_widget (builder, "timeout-scale"); range = GTK_RANGE (sdialog->timeout_scale); adjustment = gtk_range_get_adjustment (range); tmp = e_source_get_property(sdialog->source, "timeout"); - gtk_adjustment_set_value (adjustment, tmp?g_strtod(tmp, NULL):3.0); + gtk_adjustment_set_value (adjustment, tmp?g_strtod (tmp, NULL):3.0); g_signal_connect ( adjustment, "value_changed", G_CALLBACK (timeout_changed_cb), sdialog); sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton"); tmp = e_source_get_property(sdialog->source, "limit"); - gtk_spin_button_set_value((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod(tmp, NULL):100.0); + gtk_spin_button_set_value ((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod (tmp, NULL):100.0); g_signal_connect (sdialog->limit_spinbutton, "value_changed", G_CALLBACK (limit_changed_cb), sdialog); sdialog->canbrowsecheck = e_builder_get_widget (builder, "canbrowsecheck"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sdialog->canbrowsecheck), e_source_get_property (sdialog->source, "can-browse") && strcmp (e_source_get_property (sdialog->source, "can-browse"), "1") == 0); g_signal_connect (sdialog->canbrowsecheck, "toggled", G_CALLBACK (canbrowse_toggled_cb), sdialog->source); - g_object_unref(builder); + g_object_unref (builder); return w; } @@ -1029,7 +1029,7 @@ static EConfigItem eabc_new_items[] = { }; static void -eabc_commit(EConfig *ec, GSList *items, gpointer data) +eabc_commit (EConfig *ec, GSList *items, gpointer data) { AddressbookSourceDialog *sdialog = data; xmlNodePtr xml; @@ -1041,48 +1041,48 @@ eabc_commit(EConfig *ec, GSList *items, gpointer data) /* these api's kinda suck */ xml = xmlNewNode(NULL, (const guchar *)"dummy"); - e_source_dump_to_xml_node(sdialog->source, xml); - e_source_update_from_xml_node(sdialog->original_source, xml->children, NULL); - xmlFreeNode(xml); + e_source_dump_to_xml_node (sdialog->source, xml); + e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL); + xmlFreeNode (xml); #if d(!)0 - txt = e_source_to_standalone_xml(sdialog->original_source); + txt = e_source_to_standalone_xml (sdialog->original_source); printf("source is now:\n%s\n", txt); - g_free(txt); + g_free (txt); #endif } else { d(printf("committing new source\n")); - e_source_group_add_source(sdialog->source_group, sdialog->source, -1); - e_source_list_sync(sdialog->source_list, NULL); + e_source_group_add_source (sdialog->source_group, sdialog->source, -1); + e_source_list_sync (sdialog->source_list, NULL); } #if d(!)0 - txt = e_source_to_standalone_xml(sdialog->source); + txt = e_source_to_standalone_xml (sdialog->source); printf("running source is now:\n%s\n", txt); - g_free(txt); + g_free (txt); #endif } static void -eabc_free(EConfig *ec, GSList *items, gpointer data) +eabc_free (EConfig *ec, GSList *items, gpointer data) { AddressbookSourceDialog *sdialog = data; - g_slist_free(items); + g_slist_free (items); - g_object_unref(sdialog->source); + g_object_unref (sdialog->source); if (sdialog->original_source) - g_object_unref(sdialog->original_source); + g_object_unref (sdialog->original_source); if (sdialog->source_list) - g_object_unref(sdialog->source_list); - g_slist_free(sdialog->menu_source_groups); + g_object_unref (sdialog->source_list); + g_slist_free (sdialog->menu_source_groups); - g_object_unref(sdialog->builder); + g_object_unref (sdialog->builder); - g_free(sdialog); + g_free (sdialog); } static gboolean -eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data) +eabc_check_complete (EConfig *ec, const gchar *pageid, gpointer data) { AddressbookSourceDialog *sdialog = data; gint valid = TRUE; @@ -1091,29 +1091,29 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data) d(printf("check complete, pageid = '%s'\n", pageid?pageid:"<all>")); /* have name, and unique */ - tmp = e_source_peek_name(sdialog->source); + tmp = e_source_peek_name (sdialog->source); valid = tmp && tmp[0] != 0 - && ((source = e_source_group_peek_source_by_name(sdialog->source_group, tmp)) == NULL + && ((source = e_source_group_peek_source_by_name (sdialog->source_group, tmp)) == NULL || source == sdialog->original_source); #ifdef HAVE_LDAP - if (valid && source_group_is_remote(sdialog->source_group)) { - gchar *uri = e_source_get_uri(sdialog->source); + if (valid && source_group_is_remote (sdialog->source_group)) { + gchar *uri = e_source_get_uri (sdialog->source); LDAPURLDesc *lud; /* check host and port set */ - if (ldap_url_parse(uri, &lud) == LDAP_SUCCESS) { + if (ldap_url_parse (uri, &lud) == LDAP_SUCCESS) { valid = lud->lud_host != NULL && lud->lud_host[0] != 0 && lud->lud_port != 0; ldap_free_urldesc (lud); } else valid = FALSE; - g_free(uri); + g_free (uri); /* check auth name provided if auth set */ if (valid && (tmp = e_source_get_property(sdialog->source, "auth"))) { - switch (ldap_parse_auth(tmp)) { + switch (ldap_parse_auth (tmp)) { case ADDRESSBOOK_LDAP_AUTH_SIMPLE_EMAIL: tmp = e_source_get_property(sdialog->source, "email_addr"); break; @@ -1130,7 +1130,7 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data) /* check timeout isn't too short (why don't we just force it?) */ if (valid) { tmp = e_source_get_property(sdialog->source, "timeout"); - valid = tmp && g_strtod(tmp, NULL) > 0.0; + valid = tmp && g_strtod (tmp, NULL) > 0.0; } } #endif @@ -1140,13 +1140,13 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data) /* debug only: */ #if d(!)0 static void -source_changed(ESource *source, AddressbookSourceDialog *sdialog) +source_changed (ESource *source, AddressbookSourceDialog *sdialog) { gchar *xml; - xml = e_source_to_standalone_xml(source); + xml = e_source_to_standalone_xml (source); printf("source changed:\n%s\n", xml); - g_free(xml); + g_free (xml); } #endif @@ -1165,19 +1165,19 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) if (source) { sdialog->original_source = source; - g_object_ref(source); + g_object_ref (source); sdialog->source_group = e_source_peek_group (source); - xml = e_source_to_standalone_xml(source); - sdialog->source = e_source_new_from_standalone_xml(xml); - g_free(xml); + xml = e_source_to_standalone_xml (source); + sdialog->source = e_source_new_from_standalone_xml (xml); + g_free (xml); } else { GConfClient *gconf; GSList *l; sdialog->source = e_source_new("", ""); - gconf = gconf_client_get_default(); + gconf = gconf_client_get_default (); sdialog->source_list = e_source_list_new_for_gconf(gconf, "/apps/evolution/addressbook/sources"); - l = e_source_list_peek_groups(sdialog->source_list); + l = e_source_list_peek_groups (sdialog->source_list); if (!l) { g_warning ("Address Book source groups are missing! Check your GConf setup."); g_object_unref (gconf); @@ -1185,25 +1185,25 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) return NULL; } - sdialog->menu_source_groups = g_slist_copy(l); + sdialog->menu_source_groups = g_slist_copy (l); #ifndef HAVE_LDAP - for (;l;l = g_slist_next(l)) + for (;l;l = g_slist_next (l)) if (!strncmp("ldap:", e_source_group_peek_base_uri(l->data), 5)) sdialog->menu_source_groups = g_slist_remove (sdialog->menu_source_groups, l->data); #endif sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data; for (i=0;eabc_new_items[i].path;i++) - items = g_slist_prepend(items, &eabc_new_items[i]); - g_object_unref(gconf); + items = g_slist_prepend (items, &eabc_new_items[i]); + g_object_unref (gconf); } /* HACK: doesn't work if you don't do this */ - e_source_set_group(sdialog->source, sdialog->source_group); + e_source_set_group (sdialog->source, sdialog->source_group); #if d(!)0 - xml = e_source_to_standalone_xml(sdialog->source); + xml = e_source_to_standalone_xml (sdialog->source); printf("but working standalone xml: %s\n", xml); - g_free(xml); + g_free (xml); g_signal_connect(sdialog->source, "changed", source_changed, sdialog); #endif @@ -1211,15 +1211,15 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) for (i=0;eabc_items[i].path;i++) { if (eabc_items[i].label) - eabc_items[i].label = gettext(eabc_items[i].label); - items = g_slist_prepend(items, &eabc_items[i]); + eabc_items[i].label = gettext (eabc_items[i].label); + items = g_slist_prepend (items, &eabc_items[i]); } - e_config_add_items((EConfig *)ec, items, eabc_commit, NULL, eabc_free, sdialog); - e_config_add_page_check((EConfig *)ec, NULL, eabc_check_complete, sdialog); + e_config_add_items ((EConfig *)ec, items, eabc_commit, NULL, eabc_free, sdialog); + e_config_add_page_check ((EConfig *)ec, NULL, eabc_check_complete, sdialog); - target = eab_config_target_new_source(ec, sdialog->source); - e_config_set_target((EConfig *)ec, (EConfigTarget *)target); + target = eab_config_target_new_source (ec, sdialog->source); + e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); if (source) sdialog->window = e_config_create_window((EConfig *)ec, NULL, _("Address Book Properties")); @@ -1228,7 +1228,7 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) /* forces initial validation */ if (!sdialog->original_source) - e_config_target_changed((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); return sdialog->window; } diff --git a/modules/addressbook/e-book-shell-content.h b/modules/addressbook/e-book-shell-content.h index 595e366736..0876ec968c 100644 --- a/modules/addressbook/e-book-shell-content.h +++ b/modules/addressbook/e-book-shell-content.h @@ -79,7 +79,8 @@ struct _EBookShellContentClass { GType e_book_shell_content_get_type (void); void e_book_shell_content_register_type (GTypeModule *type_module); -GtkWidget * e_book_shell_content_new(EShellView *shell_view); +GtkWidget * e_book_shell_content_new + (EShellView *shell_view); void e_book_shell_content_insert_view (EBookShellContent *book_shell_content, EAddressbookView *addressbook_view); diff --git a/modules/addressbook/e-book-shell-sidebar.h b/modules/addressbook/e-book-shell-sidebar.h index a3eb76c77f..560609f53d 100644 --- a/modules/addressbook/e-book-shell-sidebar.h +++ b/modules/addressbook/e-book-shell-sidebar.h @@ -70,7 +70,8 @@ struct _EBookShellSidebarClass { GType e_book_shell_sidebar_get_type (void); void e_book_shell_sidebar_register_type (GTypeModule *type_module); -GtkWidget * e_book_shell_sidebar_new(EShellView *shell_view); +GtkWidget * e_book_shell_sidebar_new + (EShellView *shell_view); ESourceSelector * e_book_shell_sidebar_get_selector (EBookShellSidebar *book_shell_sidebar); diff --git a/modules/addressbook/openldap-extract.h b/modules/addressbook/openldap-extract.h index 67d5741ce9..7da5800d16 100644 --- a/modules/addressbook/openldap-extract.h +++ b/modules/addressbook/openldap-extract.h @@ -110,12 +110,12 @@ typedef struct ldap_objectclass { } LDAPObjectClass; static void -vfree(gpointer *vec) +vfree (gpointer *vec) { gint i; for (i = 0; vec[i] != NULL; i++) - free(vec[i]); + free (vec[i]); } /* from schema.c */ @@ -159,7 +159,7 @@ struct token { }; static gint -get_token( const gchar ** sp, gchar ** token_val ) +get_token ( const gchar ** sp, gchar ** token_val ) { gint kind; const gchar * p; @@ -192,11 +192,11 @@ get_token( const gchar ** sp, gchar ** token_val ) (*sp)++; if (**sp == '\'') { q = *sp; - res = LDAP_MALLOC(q-p+1); + res = LDAP_MALLOC (q-p+1); if (!res) { kind = TK_OUTOFMEM; } else { - strncpy(res,p,q-p); + strncpy (res,p,q-p); res[q-p] = '\0'; *token_val = res; } @@ -208,7 +208,7 @@ get_token( const gchar ** sp, gchar ** token_val ) default: kind = TK_BAREWORD; p = *sp; - while ( !LDAP_SPACE(**sp) && + while ( !LDAP_SPACE (**sp) && **sp != '(' && **sp != ')' && **sp != '$' && @@ -216,11 +216,11 @@ get_token( const gchar ** sp, gchar ** token_val ) **sp != '\0' ) (*sp)++; q = *sp; - res = LDAP_MALLOC(q-p+1); + res = LDAP_MALLOC (q-p+1); if (!res) { kind = TK_OUTOFMEM; } else { - strncpy(res,p,q-p); + strncpy (res,p,q-p); res[q-p] = '\0'; *token_val = res; } @@ -234,15 +234,15 @@ get_token( const gchar ** sp, gchar ** token_val ) /* Gobble optional whitespace */ static void -parse_whsp(const gchar **sp) +parse_whsp (const gchar **sp) { - while (LDAP_SPACE(**sp)) + while (LDAP_SPACE (**sp)) (*sp)++; } /* Parse a sequence of dot-separated decimal strings */ static gchar * -ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags) +ldap_int_parse_numericoid (const gchar **sp, gint *code, const gint flags) { gchar * res = NULL; const gchar * start = *sp; @@ -257,7 +257,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags) } /* Each iteration of this loop gets one decimal string */ while (**sp) { - if (!LDAP_DIGIT(**sp)) { + if (!LDAP_DIGIT (**sp)) { /* * Initial gchar is not a digit or gchar after dot is * not a digit @@ -266,7 +266,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags) return NULL; } (*sp)++; - while (LDAP_DIGIT(**sp)) + while (LDAP_DIGIT (**sp)) (*sp)++; if (**sp != '.') break; @@ -286,20 +286,20 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags) if (flags & LDAP_SCHEMA_SKIP) { res = (gchar *)start; } else { - res = LDAP_MALLOC(len+1); + res = LDAP_MALLOC (len+1); if (!res) { *code = LDAP_SCHERR_OUTOFMEM; - return(NULL); + return (NULL); } - strncpy(res,start,len); + strncpy (res,start,len); res[len] = '\0'; } - return(res); + return (res); } /* Parse a qdescr or a list of them enclosed in () */ static gchar ** -parse_qdescrs(const gchar **sp, gint *code) +parse_qdescrs (const gchar **sp, gint *code) { gchar ** res; gchar ** res1; @@ -308,58 +308,58 @@ parse_qdescrs(const gchar **sp, gint *code) gint size; gint pos; - parse_whsp(sp); - kind = get_token(sp,&sval); + parse_whsp (sp); + kind = get_token (sp,&sval); if (kind == TK_LEFTPAREN) { /* Let's presume there will be at least 2 entries */ size = 3; - res = LDAP_CALLOC(3,sizeof(gchar *)); + res = LDAP_CALLOC (3,sizeof (gchar *)); if (!res) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; } pos = 0; while (1) { - parse_whsp(sp); - kind = get_token(sp,&sval); + parse_whsp (sp); + kind = get_token (sp,&sval); if (kind == TK_RIGHTPAREN) break; if (kind == TK_QDESCR) { if (pos == size-2) { size++; - res1 = LDAP_REALLOC(res,size*sizeof(gchar *)); + res1 = LDAP_REALLOC (res,size*sizeof (gchar *)); if (!res1) { - LDAP_VFREE(res); - LDAP_FREE(sval); + LDAP_VFREE (res); + LDAP_FREE (sval); *code = LDAP_SCHERR_OUTOFMEM; - return(NULL); + return (NULL); } res = res1; } res[pos++] = sval; res[pos] = NULL; - parse_whsp(sp); + parse_whsp (sp); } else { - LDAP_VFREE(res); - LDAP_FREE(sval); + LDAP_VFREE (res); + LDAP_FREE (sval); *code = LDAP_SCHERR_UNEXPTOKEN; - return(NULL); + return (NULL); } } - parse_whsp(sp); - return(res); + parse_whsp (sp); + return (res); } else if (kind == TK_QDESCR) { - res = LDAP_CALLOC(2,sizeof(gchar *)); + res = LDAP_CALLOC (2,sizeof (gchar *)); if (!res) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; } res[0] = sval; res[1] = NULL; - parse_whsp(sp); + parse_whsp (sp); return res; } else { - LDAP_FREE(sval); + LDAP_FREE (sval); *code = LDAP_SCHERR_BADNAME; return NULL; } @@ -367,7 +367,7 @@ parse_qdescrs(const gchar **sp, gint *code) /* Parse a woid or a $-separated list of them enclosed in () */ static gchar ** -parse_oids(const gchar **sp, gint *code, const gint allow_quoted) +parse_oids (const gchar **sp, gint *code, const gint allow_quoted) { gchar ** res; gchar ** res1; @@ -382,48 +382,48 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted) * we are very liberal in what we accept as an OID. Maybe * refine later. */ - parse_whsp(sp); - kind = get_token(sp,&sval); + parse_whsp (sp); + kind = get_token (sp,&sval); if (kind == TK_LEFTPAREN) { /* Let's presume there will be at least 2 entries */ size = 3; - res = LDAP_CALLOC(3,sizeof(gchar *)); + res = LDAP_CALLOC (3,sizeof (gchar *)); if (!res) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; } pos = 0; - parse_whsp(sp); - kind = get_token(sp,&sval); + parse_whsp (sp); + kind = get_token (sp,&sval); if ( kind == TK_BAREWORD || ( allow_quoted && kind == TK_QDSTRING ) ) { res[pos++] = sval; res[pos] = NULL; } else { *code = LDAP_SCHERR_UNEXPTOKEN; - LDAP_FREE(sval); - LDAP_VFREE(res); + LDAP_FREE (sval); + LDAP_VFREE (res); return NULL; } - parse_whsp(sp); + parse_whsp (sp); while (1) { - kind = get_token(sp,&sval); + kind = get_token (sp,&sval); if (kind == TK_RIGHTPAREN) break; if (kind == TK_DOLLAR) { - parse_whsp(sp); - kind = get_token(sp,&sval); + parse_whsp (sp); + kind = get_token (sp,&sval); if ( kind == TK_BAREWORD || ( allow_quoted && kind == TK_QDSTRING ) ) { if (pos == size-2) { size++; - res1 = LDAP_REALLOC(res,size*sizeof(gchar *)); + res1 = LDAP_REALLOC (res,size*sizeof (gchar *)); if (!res1) { - LDAP_FREE(sval); - LDAP_VFREE(res); + LDAP_FREE (sval); + LDAP_VFREE (res); *code = LDAP_SCHERR_OUTOFMEM; - return(NULL); + return (NULL); } res = res1; } @@ -431,53 +431,53 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted) res[pos] = NULL; } else { *code = LDAP_SCHERR_UNEXPTOKEN; - LDAP_FREE(sval); - LDAP_VFREE(res); + LDAP_FREE (sval); + LDAP_VFREE (res); return NULL; } - parse_whsp(sp); + parse_whsp (sp); } else { *code = LDAP_SCHERR_UNEXPTOKEN; - LDAP_FREE(sval); - LDAP_VFREE(res); + LDAP_FREE (sval); + LDAP_VFREE (res); return NULL; } } - parse_whsp(sp); - return(res); + parse_whsp (sp); + return (res); } else if ( kind == TK_BAREWORD || ( allow_quoted && kind == TK_QDSTRING ) ) { - res = LDAP_CALLOC(2,sizeof(gchar *)); + res = LDAP_CALLOC (2,sizeof (gchar *)); if (!res) { - LDAP_FREE(sval); + LDAP_FREE (sval); *code = LDAP_SCHERR_OUTOFMEM; return NULL; } res[0] = sval; res[1] = NULL; - parse_whsp(sp); + parse_whsp (sp); return res; } else { - LDAP_FREE(sval); + LDAP_FREE (sval); *code = LDAP_SCHERR_BADNAME; return NULL; } } static void -ldap_objectclass_free(LDAPObjectClass * oc) +ldap_objectclass_free (LDAPObjectClass * oc) { - LDAP_FREE(oc->oc_oid); - if (oc->oc_names) LDAP_VFREE(oc->oc_names); - if (oc->oc_desc) LDAP_FREE(oc->oc_desc); - if (oc->oc_sup_oids) LDAP_VFREE(oc->oc_sup_oids); - if (oc->oc_at_oids_must) LDAP_VFREE(oc->oc_at_oids_must); - if (oc->oc_at_oids_may) LDAP_VFREE(oc->oc_at_oids_may); - LDAP_FREE(oc); + LDAP_FREE (oc->oc_oid); + if (oc->oc_names) LDAP_VFREE (oc->oc_names); + if (oc->oc_desc) LDAP_FREE (oc->oc_desc); + if (oc->oc_sup_oids) LDAP_VFREE (oc->oc_sup_oids); + if (oc->oc_at_oids_must) LDAP_VFREE (oc->oc_at_oids_must); + if (oc->oc_at_oids_may) LDAP_VFREE (oc->oc_at_oids_may); + LDAP_FREE (oc); } static LDAPObjectClass * -ldap_str2objectclass( LDAP_CONST gchar * s, +ldap_str2objectclass ( LDAP_CONST gchar * s, gint * code, LDAP_CONST gchar ** errp, LDAP_CONST unsigned flags ) @@ -503,7 +503,7 @@ ldap_str2objectclass( LDAP_CONST gchar * s, } *errp = s; - oc = LDAP_CALLOC(1,sizeof(LDAPObjectClass)); + oc = LDAP_CALLOC (1,sizeof (LDAPObjectClass)); if (!oc) { *code = LDAP_SCHERR_OUTOFMEM; @@ -511,11 +511,11 @@ ldap_str2objectclass( LDAP_CONST gchar * s, } oc->oc_kind = LDAP_SCHEMA_STRUCTURAL; - kind = get_token(&ss,&sval); + kind = get_token (&ss,&sval); if (kind != TK_LEFTPAREN) { *code = LDAP_SCHERR_NOLEFTPAREN; - LDAP_FREE(sval); - ldap_objectclass_free(oc); + LDAP_FREE (sval); + ldap_objectclass_free (oc); return NULL; } @@ -526,14 +526,14 @@ ldap_str2objectclass( LDAP_CONST gchar * s, * in the wrong format or even no OID at all. We do our best to * extract info from those servers. */ - parse_whsp(&ss); + parse_whsp (&ss); savepos = ss; - oc->oc_oid = ldap_int_parse_numericoid(&ss,code,0); + oc->oc_oid = ldap_int_parse_numericoid (&ss,code,0); if (!oc->oc_oid) { if ((flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos)) { /* Backtracking */ ss = savepos; - kind = get_token(&ss,&sval); + kind = get_token (&ss,&sval); if (kind == TK_BAREWORD) { if ( !strcasecmp(sval, "NAME") || !strcasecmp(sval, "DESC") || @@ -551,196 +551,196 @@ ldap_str2objectclass( LDAP_CONST gchar * s, LDAP_SCHEMA_ALLOW_OID_MACRO ) { /* Non-numerical OID, ignore */ gint len = ss-savepos; - oc->oc_oid = LDAP_MALLOC(len+1); - strncpy(oc->oc_oid, savepos, len); + oc->oc_oid = LDAP_MALLOC (len+1); + strncpy (oc->oc_oid, savepos, len); oc->oc_oid[len] = 0; } } - LDAP_FREE(sval); + LDAP_FREE (sval); } else { *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } } - parse_whsp(&ss); + parse_whsp (&ss); /* * Beyond this point we will be liberal an accept the items * in any order. */ while (1) { - kind = get_token(&ss,&sval); + kind = get_token (&ss,&sval); switch (kind) { case TK_EOS: *code = LDAP_SCHERR_NORIGHTPAREN; *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; case TK_RIGHTPAREN: return oc; case TK_BAREWORD: if (!strcasecmp(sval,"NAME")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_name) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_name = 1; - oc->oc_names = parse_qdescrs(&ss,code); + oc->oc_names = parse_qdescrs (&ss,code); if (!oc->oc_names) { if (*code != LDAP_SCHERR_OUTOFMEM) *code = LDAP_SCHERR_BADNAME; *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } } else if (!strcasecmp(sval,"DESC")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_desc) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_desc = 1; - parse_whsp(&ss); - kind = get_token(&ss,&sval); + parse_whsp (&ss); + kind = get_token (&ss,&sval); if (kind != TK_QDSTRING) { *code = LDAP_SCHERR_UNEXPTOKEN; *errp = ss; - LDAP_FREE(sval); - ldap_objectclass_free(oc); + LDAP_FREE (sval); + ldap_objectclass_free (oc); return NULL; } oc->oc_desc = sval; - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"OBSOLETE")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_obsolete) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_obsolete = 1; oc->oc_obsolete = LDAP_SCHEMA_YES; - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"SUP")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_sup) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_sup = 1; - oc->oc_sup_oids = parse_oids(&ss, + oc->oc_sup_oids = parse_oids (&ss, code, flags); if (!oc->oc_sup_oids) { *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } } else if (!strcasecmp(sval,"ABSTRACT")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_kind) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_kind = 1; oc->oc_kind = LDAP_SCHEMA_ABSTRACT; - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"STRUCTURAL")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_kind) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_kind = 1; oc->oc_kind = LDAP_SCHEMA_STRUCTURAL; - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"AUXILIARY")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_kind) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_kind = 1; oc->oc_kind = LDAP_SCHEMA_AUXILIARY; - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"MUST")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_must) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_must = 1; - oc->oc_at_oids_must = parse_oids(&ss,code,0); + oc->oc_at_oids_must = parse_oids (&ss,code,0); if (!oc->oc_at_oids_must) { *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } - parse_whsp(&ss); + parse_whsp (&ss); } else if (!strcasecmp(sval,"MAY")) { - LDAP_FREE(sval); + LDAP_FREE (sval); if (seen_may) { *code = LDAP_SCHERR_DUPOPT; *errp = ss; - ldap_objectclass_free(oc); - return(NULL); + ldap_objectclass_free (oc); + return (NULL); } seen_may = 1; - oc->oc_at_oids_may = parse_oids(&ss,code,0); + oc->oc_at_oids_may = parse_oids (&ss,code,0); if (!oc->oc_at_oids_may) { *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } - parse_whsp(&ss); + parse_whsp (&ss); } else if (sval[0] == 'X' && sval[1] == '-') { /* Should be parse_qdstrings */ - ext_vals = parse_qdescrs(&ss, code); + ext_vals = parse_qdescrs (&ss, code); if (!ext_vals) { *errp = ss; - ldap_objectclass_free(oc); + ldap_objectclass_free (oc); return NULL; } #if 0 - if ( add_extension(&oc->oc_extensions, + if ( add_extension (&oc->oc_extensions, sval, ext_vals) ) { *code = LDAP_SCHERR_OUTOFMEM; *errp = ss; - LDAP_FREE(sval); - ldap_objectclass_free(oc); + LDAP_FREE (sval); + ldap_objectclass_free (oc); return NULL; } #endif } else { *code = LDAP_SCHERR_UNEXPTOKEN; *errp = ss; - LDAP_FREE(sval); - ldap_objectclass_free(oc); + LDAP_FREE (sval); + ldap_objectclass_free (oc); return NULL; } break; default: *code = LDAP_SCHERR_UNEXPTOKEN; *errp = ss; - LDAP_FREE(sval); - ldap_objectclass_free(oc); + LDAP_FREE (sval); + ldap_objectclass_free (oc); return NULL; } } @@ -752,10 +752,10 @@ ldap_str2objectclass( LDAP_CONST gchar * s, #define LDAP_UTF8_INCR(p) ((p)=LDAP_UTF8_NEXT((p))) #define ldap_x_utf8_to_ucs4(str) g_utf8_get_char(str) -static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) +static gchar *ldap_utf8_strchr ( const gchar *str, const gchar *chr ) { - for (; *str != '\0'; LDAP_UTF8_INCR(str) ) { - if (ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr )) { + for (; *str != '\0'; LDAP_UTF8_INCR (str) ) { + if (ldap_x_utf8_to_ucs4 ( str ) == ldap_x_utf8_to_ucs4 ( chr )) { return (gchar *) str; } } @@ -763,14 +763,14 @@ static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) return NULL; } -static gsize 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; - for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) { - for (cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset)) { - if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) { + for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) { + for (cset = set; *cset != '\0'; LDAP_UTF8_INCR (cset)) { + if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) { return cstr - str; } } @@ -779,18 +779,18 @@ static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set ) return cstr - str; } -static gsize 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; - for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) { - for (cset = set; ; LDAP_UTF8_INCR(cset)) { + for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) { + for (cset = set; ; LDAP_UTF8_INCR (cset)) { if (*cset == '\0') { return cstr - str; } - if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) { + if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) { break; } } @@ -799,7 +799,7 @@ static gsize ldap_utf8_strspn( const gchar *str, const gchar *set ) return cstr - str; } -static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last) +static gchar *ldap_utf8_strtok (gchar *str, const gchar *sep, gchar **last) { gchar *begin; gchar *end; @@ -808,17 +808,17 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last) begin = str ? str : *last; - begin += ldap_utf8_strspn( begin, sep ); + begin += ldap_utf8_strspn ( begin, sep ); if (*begin == '\0') { *last = NULL; return NULL; } - end = &begin[ ldap_utf8_strcspn( begin, sep ) ]; + end = &begin[ ldap_utf8_strcspn ( begin, sep ) ]; if (*end != '\0') { - gchar *next = LDAP_UTF8_NEXT( end ); + gchar *next = LDAP_UTF8_NEXT ( end ); *end = '\0'; end = next; } @@ -868,7 +868,7 @@ typedef struct ldap_url_desc { /* from url.c */ static const gchar * -skip_url_prefix( +skip_url_prefix ( const gchar *url, gint *enclosedp, const gchar **scheme ) @@ -880,7 +880,7 @@ skip_url_prefix( const gchar *p; if (url == NULL) { - return( NULL ); + return ( NULL ); } p = url; @@ -894,48 +894,48 @@ skip_url_prefix( } /* skip leading "URL:" (if any) */ - if (strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) { + if (strncasecmp ( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) { p += LDAP_URL_URLCOLON_LEN; } /* check for "ldap://" prefix */ - if (strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) { + if (strncasecmp ( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) { /* skip over "ldap://" prefix and return success */ p += LDAP_URL_PREFIX_LEN; *scheme = "ldap"; - return( p ); + return ( p ); } /* check for "ldaps://" prefix */ - if (strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) { + if (strncasecmp ( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) { /* skip over "ldaps://" prefix and return success */ p += LDAPS_URL_PREFIX_LEN; *scheme = "ldaps"; - return( p ); + return ( p ); } /* check for "ldapi://" prefix */ - if (strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) { + if (strncasecmp ( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) { /* skip over "ldapi://" prefix and return success */ p += LDAPI_URL_PREFIX_LEN; *scheme = "ldapi"; - return( p ); + return ( p ); } #ifdef LDAP_CONNECTIONLESS /* check for "cldap://" prefix */ - if (strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) { + if (strncasecmp ( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) { /* skip over "cldap://" prefix and return success */ p += LDAPC_URL_PREFIX_LEN; *scheme = "cldap"; - return( p ); + return ( p ); } #endif - return( NULL ); + return ( NULL ); } -static gint str2scope( const gchar *p ) +static gint str2scope ( const gchar *p ) { if (strcasecmp( p, "one" ) == 0) { return LDAP_SCOPE_ONELEVEL; @@ -953,53 +953,53 @@ static gint str2scope( const gchar *p ) return LDAP_SCOPE_SUBTREE; } - return( -1 ); + return ( -1 ); } static void -ldap_free_urldesc( LDAPURLDesc *ludp ) +ldap_free_urldesc ( LDAPURLDesc *ludp ) { if (ludp == NULL) { return; } if (ludp->lud_scheme != NULL) { - LDAP_FREE( ludp->lud_scheme ); + LDAP_FREE ( ludp->lud_scheme ); } if (ludp->lud_host != NULL) { - LDAP_FREE( ludp->lud_host ); + LDAP_FREE ( ludp->lud_host ); } if (ludp->lud_dn != NULL) { - LDAP_FREE( ludp->lud_dn ); + LDAP_FREE ( ludp->lud_dn ); } if (ludp->lud_filter != NULL) { - LDAP_FREE( ludp->lud_filter); + LDAP_FREE ( ludp->lud_filter); } if (ludp->lud_attrs != NULL) { - LDAP_VFREE( ludp->lud_attrs ); + LDAP_VFREE ( ludp->lud_attrs ); } if (ludp->lud_exts != NULL) { - LDAP_VFREE( ludp->lud_exts ); + LDAP_VFREE ( ludp->lud_exts ); } - LDAP_FREE( ludp ); + LDAP_FREE ( ludp ); } static gint -ldap_int_unhex( gint c ) +ldap_int_unhex ( gint c ) { - return( c >= '0' && c <= '9' ? c - '0' + return ( c >= '0' && c <= '9' ? c - '0' : c >= 'A' && c <= 'F' ? c - 'A' + 10 : c - 'a' + 10 ); } static void -ldap_pvt_hex_unescape( gchar *s ) +ldap_pvt_hex_unescape ( gchar *s ) { /* * Remove URL hex escapes from s... done in place. The basic concept for @@ -1026,7 +1026,7 @@ ldap_pvt_hex_unescape( gchar *s ) } static gchar ** -ldap_str2charray( const gchar *str_in, const gchar *brkstr ) +ldap_str2charray ( const gchar *str_in, const gchar *brkstr ) { gchar **res; gchar *str, *s; @@ -1034,39 +1034,39 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) gint i; /* protect the input string from strtok */ - str = LDAP_STRDUP( str_in ); + str = LDAP_STRDUP ( str_in ); if (str == NULL) { return NULL; } i = 1; for (s = str; *s; s++) { - if (ldap_utf8_strchr( brkstr, s ) != NULL) { + if (ldap_utf8_strchr ( brkstr, s ) != NULL) { i++; } } - res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) ); + res = (gchar **) LDAP_MALLOC ( (i + 1) * sizeof (gchar *) ); if (res == NULL) { - LDAP_FREE( str ); + LDAP_FREE ( str ); return NULL; } i = 0; - for (s = ldap_utf8_strtok( str, brkstr, &lasts); + for (s = ldap_utf8_strtok ( str, brkstr, &lasts); s != NULL; - s = ldap_utf8_strtok( NULL, brkstr, &lasts ) ) + s = ldap_utf8_strtok ( NULL, brkstr, &lasts ) ) { - res[i] = LDAP_STRDUP( s ); + res[i] = LDAP_STRDUP ( s ); if (res[i] == NULL) { for (--i; i >= 0; i--) { - LDAP_FREE( res[i] ); + LDAP_FREE ( res[i] ); } - LDAP_FREE( res ); - LDAP_FREE( str ); + LDAP_FREE ( res ); + LDAP_FREE ( str ); return NULL; } @@ -1075,12 +1075,12 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) res[i] = NULL; - LDAP_FREE( str ); - return( res ); + LDAP_FREE ( str ); + return ( res ); } static gint -ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) +ldap_url_parse_ext ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { /* * Pick apart the pieces of an LDAP URL. @@ -1099,25 +1099,25 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) *ludpp = NULL; /* pessimistic */ - url_tmp = skip_url_prefix( url_in, &enclosed, &scheme ); + url_tmp = skip_url_prefix ( url_in, &enclosed, &scheme ); if (url_tmp == NULL) { return LDAP_URL_ERR_BADSCHEME; } - assert( scheme ); + assert ( scheme ); /* make working copy of the remainder of the URL */ - url = LDAP_STRDUP( url_tmp ); + url = LDAP_STRDUP ( url_tmp ); if (url == NULL) { return LDAP_URL_ERR_MEM; } if (enclosed) { - p = &url[strlen(url)-1]; + p = &url[strlen (url)-1]; if (*p != '>') { - LDAP_FREE( url ); + LDAP_FREE ( url ); return LDAP_URL_ERR_BADENCLOSURE; } @@ -1125,10 +1125,10 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } /* allocate return struct */ - ludp = (LDAPURLDesc *)LDAP_CALLOC( 1, sizeof( LDAPURLDesc )); + ludp = (LDAPURLDesc *)LDAP_CALLOC ( 1, sizeof ( LDAPURLDesc )); if (ludp == NULL) { - LDAP_FREE( url ); + LDAP_FREE ( url ); return LDAP_URL_ERR_MEM; } @@ -1142,16 +1142,16 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) ludp->lud_filter = NULL; ludp->lud_exts = NULL; - ludp->lud_scheme = LDAP_STRDUP( scheme ); + ludp->lud_scheme = LDAP_STRDUP ( scheme ); if (ludp->lud_scheme == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_MEM; } /* scan forward for '/' that marks end of hostport and begin. of dn */ - p = strchr( url, '/' ); + p = strchr ( url, '/' ); if (p != NULL) { /* terminate hostport; point to start of dn */ @@ -1160,46 +1160,46 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) /* IPv6 syntax with [ip address]:port */ if (*url == '[') { - r = strchr( url, ']' ); + r = strchr ( url, ']' ); if (r == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADURL; } *r++ = '\0'; - q = strchr( r, ':' ); + q = strchr ( r, ':' ); } else { - q = strchr( url, ':' ); + q = strchr ( url, ':' ); } if (q != NULL) { gchar *next; *q++ = '\0'; - ldap_pvt_hex_unescape( q ); + ldap_pvt_hex_unescape ( q ); if (*q == '\0') { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADURL; } - ludp->lud_port = strtol( q, &next, 10 ); + ludp->lud_port = strtol ( q, &next, 10 ); if (next == NULL || next[0] != '\0') { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADURL; } } - ldap_pvt_hex_unescape( url ); + ldap_pvt_hex_unescape ( url ); /* If [ip address]:port syntax, url is [ip and we skip the [ */ - ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) ); + ludp->lud_host = LDAP_STRDUP ( url + ( *url == '[' ) ); if (ludp->lud_host == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_MEM; } @@ -1212,35 +1212,35 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) * but we need to account for it. Fortunately it can't be confused with * anything real. */ - if ( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) { + if ( (p == NULL) && (q != NULL) && ((q = strchr ( q, '?')) != NULL)) { q++; /* ? immediately followed by question */ if ( *q == '?') { q++; if (*q != '\0') { /* parse dn part */ - ldap_pvt_hex_unescape( q ); - ludp->lud_dn = LDAP_STRDUP( q ); + ldap_pvt_hex_unescape ( q ); + ludp->lud_dn = LDAP_STRDUP ( q ); } else { ludp->lud_dn = LDAP_STRDUP( "" ); } if (ludp->lud_dn == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_MEM; } } } if (p == NULL) { - LDAP_FREE( url ); + LDAP_FREE ( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; } /* scan forward for '?' that may marks end of dn */ - q = strchr( p, '?' ); + q = strchr ( p, '?' ); if (q != NULL) { /* terminate dn part */ @@ -1249,28 +1249,28 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if (*p != '\0') { /* parse dn part */ - ldap_pvt_hex_unescape( p ); - ludp->lud_dn = LDAP_STRDUP( p ); + ldap_pvt_hex_unescape ( p ); + ludp->lud_dn = LDAP_STRDUP ( p ); } else { ludp->lud_dn = LDAP_STRDUP( "" ); } if (ludp->lud_dn == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_MEM; } if (q == NULL) { /* no more */ - LDAP_FREE( url ); + LDAP_FREE ( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; } /* scan forward for '?' that may marks end of attributes */ p = q; - q = strchr( p, '?' ); + q = strchr ( p, '?' ); if (q != NULL) { /* terminate attributes part */ @@ -1279,26 +1279,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if (*p != '\0') { /* parse attributes */ - ldap_pvt_hex_unescape( p ); + ldap_pvt_hex_unescape ( p ); ludp->lud_attrs = ldap_str2charray( p, "," ); if (ludp->lud_attrs == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADATTRS; } } if (q == NULL) { /* no more */ - LDAP_FREE( url ); + LDAP_FREE ( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; } /* scan forward for '?' that may marks end of scope */ p = q; - q = strchr( p, '?' ); + q = strchr ( p, '?' ); if (q != NULL) { /* terminate the scope part */ @@ -1307,26 +1307,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if (*p != '\0') { /* parse the scope */ - ldap_pvt_hex_unescape( p ); - ludp->lud_scope = str2scope( p ); + ldap_pvt_hex_unescape ( p ); + ludp->lud_scope = str2scope ( p ); if (ludp->lud_scope == -1) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADSCOPE; } } if (q == NULL) { /* no more */ - LDAP_FREE( url ); + LDAP_FREE ( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; } /* scan forward for '?' that may marks end of filter */ p = q; - q = strchr( p, '?' ); + q = strchr ( p, '?' ); if (q != NULL) { /* terminate the filter part */ @@ -1335,40 +1335,40 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if (*p != '\0') { /* parse the filter */ - ldap_pvt_hex_unescape( p ); + ldap_pvt_hex_unescape ( p ); if (!*p) { /* missing filter */ - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADFILTER; } - LDAP_FREE( ludp->lud_filter ); - ludp->lud_filter = LDAP_STRDUP( p ); + LDAP_FREE ( ludp->lud_filter ); + ludp->lud_filter = LDAP_STRDUP ( p ); if (ludp->lud_filter == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_MEM; } } if (q == NULL) { /* no more */ - LDAP_FREE( url ); + LDAP_FREE ( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; } /* scan forward for '?' that may marks end of extensions */ p = q; - q = strchr( p, '?' ); + q = strchr ( p, '?' ); if (q != NULL) { /* extra '?' */ - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADURL; } @@ -1376,13 +1376,13 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) ludp->lud_exts = ldap_str2charray( p, "," ); if (ludp->lud_exts == NULL) { - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADEXTS; } for (i=0; ludp->lud_exts[i] != NULL; i++) { - ldap_pvt_hex_unescape( ludp->lud_exts[i] ); + ldap_pvt_hex_unescape ( ludp->lud_exts[i] ); if (*ludp->lud_exts[i] == '!') { /* count the number of critical extensions */ @@ -1392,21 +1392,21 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if (i == 0) { /* must have 1 or more */ - LDAP_FREE( url ); - ldap_free_urldesc( ludp ); + LDAP_FREE ( url ); + ldap_free_urldesc ( ludp ); return LDAP_URL_ERR_BADEXTS; } /* no more */ *ludpp = ludp; - LDAP_FREE( url ); + LDAP_FREE ( url ); return LDAP_URL_SUCCESS; } static gint -ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) +ldap_url_parse ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { - gint rc = ldap_url_parse_ext( url_in, ludpp ); + gint rc = ldap_url_parse_ext ( url_in, ludpp ); if (rc != LDAP_URL_SUCCESS) { return rc; @@ -1417,7 +1417,7 @@ ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } if ((*ludpp)->lud_host != NULL && *(*ludpp)->lud_host == '\0') { - LDAP_FREE( (*ludpp)->lud_host ); + LDAP_FREE ( (*ludpp)->lud_host ); (*ludpp)->lud_host = NULL; } diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c index c7511f69f8..c1a7221597 100644 --- a/modules/calendar/e-cal-shell-migrate.c +++ b/modules/calendar/e-cal-shell-migrate.c @@ -110,11 +110,16 @@ create_calendar_sources (EShellBackend *shell_backend, if (!strcmp (base_uri, e_source_group_peek_base_uri (group))) e_source_group_set_base_uri (group, base_uri_proto); - if (!*on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group))) + if (!*on_this_computer && !strcmp (base_uri_proto, + e_source_group_peek_base_uri (group))) *on_this_computer = g_object_ref (group); - else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI, e_source_group_peek_base_uri (group))) + + else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI, + e_source_group_peek_base_uri (group))) *on_the_web = g_object_ref (group); - else if (!*contacts && !strcmp (CONTACTS_BASE_URI, e_source_group_peek_base_uri (group))) + + else if (!*contacts && !strcmp (CONTACTS_BASE_URI, + e_source_group_peek_base_uri (group))) *contacts = g_object_ref (group); } } diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index a819d88473..8ddf8acf6a 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -669,10 +669,10 @@ cal_shell_sidebar_constructed (GObject *object) GtkWidget *button; container = gtk_vbox_new (FALSE, 6); - gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); button = gtk_button_new_with_mnemonic (_("_New Calendar...")); - gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (container), button, FALSE, FALSE, 0); g_signal_connect ( button, "clicked", G_CALLBACK (new_calendar_clicked), shell_sidebar); diff --git a/modules/calendar/e-memo-shell-content.h b/modules/calendar/e-memo-shell-content.h index 4567a94aa9..3ab68db440 100644 --- a/modules/calendar/e-memo-shell-content.h +++ b/modules/calendar/e-memo-shell-content.h @@ -75,7 +75,8 @@ struct _EMemoShellContentClass { GType e_memo_shell_content_get_type (void); void e_memo_shell_content_register_type (GTypeModule *type_module); -GtkWidget * e_memo_shell_content_new(EShellView *shell_view); +GtkWidget * e_memo_shell_content_new + (EShellView *shell_view); ECalModel * e_memo_shell_content_get_memo_model (EMemoShellContent *memo_shell_conent); EMemoTable * e_memo_shell_content_get_memo_table diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c index 771a889845..d85824767f 100644 --- a/modules/calendar/e-memo-shell-migrate.c +++ b/modules/calendar/e-memo-shell-migrate.c @@ -196,7 +196,7 @@ add_gw_esource (ESourceList *source_list, const gchar *group_name, const gchar ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, &error); if (error != NULL) { g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message); - g_error_free(error); + g_error_free (error); } ids = g_slist_append (ids, g_strdup (e_source_peek_uid (source))); gconf_client_set_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, ids, NULL); @@ -240,10 +240,10 @@ e_memo_shell_backend_migrate (EShellBackend *shell_backend, EIterator *it; GConfClient *gconf_client = gconf_client_get_default (); al = e_account_list_new (gconf_client); - for (it = e_list_get_iterator((EList *)al); - e_iterator_is_valid(it); - e_iterator_next(it)) { - a = (EAccount *) e_iterator_get(it); + for (it = e_list_get_iterator ((EList *)al); + e_iterator_is_valid (it); + e_iterator_next (it)) { + a = (EAccount *) e_iterator_get (it); if (!a->enabled || !is_groupwise_account (a)) continue; url = camel_url_new (a->source->url, NULL); diff --git a/modules/calendar/e-memo-shell-sidebar.h b/modules/calendar/e-memo-shell-sidebar.h index 0d32c7b429..91e0ccc618 100644 --- a/modules/calendar/e-memo-shell-sidebar.h +++ b/modules/calendar/e-memo-shell-sidebar.h @@ -81,7 +81,8 @@ struct _EMemoShellSidebarClass { GType e_memo_shell_sidebar_get_type (void); void e_memo_shell_sidebar_register_type (GTypeModule *type_module); -GtkWidget * e_memo_shell_sidebar_new(EShellView *shell_view); +GtkWidget * e_memo_shell_sidebar_new + (EShellView *shell_view); GList * e_memo_shell_sidebar_get_clients (EMemoShellSidebar *memo_shell_sidebar); ECal * e_memo_shell_sidebar_get_default_client diff --git a/modules/calendar/e-task-shell-content.h b/modules/calendar/e-task-shell-content.h index d4e67d1b95..eb327afdb7 100644 --- a/modules/calendar/e-task-shell-content.h +++ b/modules/calendar/e-task-shell-content.h @@ -79,7 +79,8 @@ struct _ETaskShellContentClass { GType e_task_shell_content_get_type (void); void e_task_shell_content_register_type (GTypeModule *type_module); -GtkWidget * e_task_shell_content_new(EShellView *shell_view); +GtkWidget * e_task_shell_content_new + (EShellView *shell_view); ECalModel * e_task_shell_content_get_task_model (ETaskShellContent *task_shell_content); ETaskTable * e_task_shell_content_get_task_table diff --git a/modules/calendar/e-task-shell-sidebar.h b/modules/calendar/e-task-shell-sidebar.h index 152c7ca32f..17e50f8239 100644 --- a/modules/calendar/e-task-shell-sidebar.h +++ b/modules/calendar/e-task-shell-sidebar.h @@ -81,7 +81,8 @@ struct _ETaskShellSidebarClass { GType e_task_shell_sidebar_get_type (void); void e_task_shell_sidebar_register_type (GTypeModule *type_module); -GtkWidget * e_task_shell_sidebar_new(EShellView *shell_view); +GtkWidget * e_task_shell_sidebar_new + (EShellView *shell_view); GList * e_task_shell_sidebar_get_clients (ETaskShellSidebar *task_shell_sidebar); ECal * e_task_shell_sidebar_get_default_client diff --git a/modules/mail/e-mail-shell-backend.h b/modules/mail/e-mail-shell-backend.h index 031efab150..e545fa2566 100644 --- a/modules/mail/e-mail-shell-backend.h +++ b/modules/mail/e-mail-shell-backend.h @@ -66,7 +66,7 @@ void e_mail_shell_backend_register_type (GTypeModule *type_module); /* XXX Find a better place for this function. */ -GSList * e_mail_labels_get_filter_options(void); +GSList * e_mail_labels_get_filter_options (void); G_END_DECLS diff --git a/modules/mail/e-mail-shell-content.h b/modules/mail/e-mail-shell-content.h index 6e2c721d59..58f7ee9fd2 100644 --- a/modules/mail/e-mail-shell-content.h +++ b/modules/mail/e-mail-shell-content.h @@ -65,7 +65,8 @@ struct _EMailShellContentClass { GType e_mail_shell_content_get_type (void); void e_mail_shell_content_register_type (GTypeModule *type_module); -GtkWidget * e_mail_shell_content_new(EShellView *shell_view); +GtkWidget * e_mail_shell_content_new + (EShellView *shell_view); EMailView * e_mail_shell_content_get_mail_view (EMailShellContent *mail_shell_content); EShellSearchbar * diff --git a/modules/mail/e-mail-shell-sidebar.h b/modules/mail/e-mail-shell-sidebar.h index b27bd80be0..ca3a43654d 100644 --- a/modules/mail/e-mail-shell-sidebar.h +++ b/modules/mail/e-mail-shell-sidebar.h @@ -63,7 +63,8 @@ struct _EMailShellSidebarClass { GType e_mail_shell_sidebar_get_type (void); void e_mail_shell_sidebar_register_type (GTypeModule *type_module); -GtkWidget * e_mail_shell_sidebar_new(EShellView *shell_view); +GtkWidget * e_mail_shell_sidebar_new + (EShellView *shell_view); EMFolderTree * e_mail_shell_sidebar_get_folder_tree (EMailShellSidebar *mail_shell_sidebar); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 7db5238a62..584936cb67 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -398,8 +398,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.composerPrefs"); l = NULL; for (i = 0; i < G_N_ELEMENTS (emcp_items); i++) - l = g_slist_prepend(l, &emcp_items[i]); - e_config_add_items((EConfig *)ec, l, NULL, NULL, emcp_free, prefs); + l = g_slist_prepend (l, &emcp_items[i]); + e_config_add_items ((EConfig *)ec, l, NULL, NULL, emcp_free, prefs); /* General tab */ diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index 751c395223..ecc794ebf6 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -651,11 +651,11 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs) } static GtkWidget * -emmp_widget_glade(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +emmp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { EMMailerPrefs *prefs = data; - return e_builder_get_widget(prefs->builder, item->label); + return e_builder_get_widget (prefs->builder, item->label); } /* plugin meta-data */ @@ -679,18 +679,18 @@ static EMConfigItem emmp_items[] = { }; static void -emmp_free(EConfig *ec, GSList *items, gpointer data) +emmp_free (EConfig *ec, GSList *items, gpointer data) { /* the prefs data is freed automagically */ - g_slist_free(items); + g_slist_free (items); } static void junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) { - gchar *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo)); - const GList *plugins = mail_session_get_junk_plugins(); + gchar *def_plugin = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo)); + const GList *plugins = mail_session_get_junk_plugins (); gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL); while (plugins) { @@ -731,7 +731,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs) GtkCellRenderer *cell; gint index = 0; gboolean def_set = FALSE; - const GList *plugins = mail_session_get_junk_plugins(); + const GList *plugins = mail_session_get_junk_plugins (); gchar *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL); store = gtk_list_store_new (1, G_TYPE_STRING); @@ -765,7 +765,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs) gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, iface->plugin_name, -1); - if (!def_set && pdefault && iface->plugin_name && !strcmp(pdefault, iface->plugin_name)) { + if (!def_set && pdefault && iface->plugin_name && !strcmp (pdefault, iface->plugin_name)) { gboolean status; def_set = TRUE; @@ -797,7 +797,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs) g_signal_connect ( combo_box, "changed", - G_CALLBACK(junk_plugin_changed), prefs); + G_CALLBACK (junk_plugin_changed), prefs); g_free (pdefault); } @@ -841,8 +841,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.prefs"); l = NULL; for (i = 0; i < G_N_ELEMENTS (emmp_items); i++) - l = g_slist_prepend(l, &emmp_items[i]); - e_config_add_items((EConfig *)ec, l, NULL, NULL, emmp_free, prefs); + l = g_slist_prepend (l, &emmp_items[i]); + e_config_add_items ((EConfig *)ec, l, NULL, NULL, emmp_free, prefs); /* General tab */ @@ -1206,9 +1206,9 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, NULL); /* get our toplevel widget */ - target = em_config_target_new_prefs(ec, prefs->gconf); - e_config_set_target((EConfig *)ec, (EConfigTarget *)target); - toplevel = e_config_create_widget((EConfig *)ec); + target = em_config_target_new_prefs (ec, prefs->gconf); + e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); + toplevel = e_config_create_widget ((EConfig *)ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); } diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c index 247ab242e4..1840d5a731 100644 --- a/modules/mail/em-network-prefs.c +++ b/modules/mail/em-network-prefs.c @@ -108,11 +108,11 @@ toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const gchar } static GtkWidget * -emnp_widget_glade(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) +emnp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { EMNetworkPrefs *prefs = data; - return e_builder_get_widget(prefs->builder, item->label); + return e_builder_get_widget (prefs->builder, item->label); } static void @@ -224,11 +224,11 @@ static EMConfigItem emnp_items[] = { }; static void -emnp_free(EConfig *ec, GSList *items, gpointer data) +emnp_free (EConfig *ec, GSList *items, gpointer data) { /* the prefs data is freed automagically */ - g_slist_free(items); + g_slist_free (items); } static void @@ -277,8 +277,8 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.networkPrefs"); l = NULL; for (i = 0; i < G_N_ELEMENTS (emnp_items); i++) - l = g_slist_prepend(l, &emnp_items[i]); - e_config_add_items((EConfig *)ec, l, NULL, NULL, emnp_free, prefs); + l = g_slist_prepend (l, &emnp_items[i]); + e_config_add_items ((EConfig *)ec, l, NULL, NULL, emnp_free, prefs); /* Proxy tab */ @@ -343,32 +343,32 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) prefs->lbl_socks_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksHost")); prefs->lbl_socks_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksPort")); g_signal_connect (prefs->socks_host, "changed", - G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY); + G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY); g_signal_connect (prefs->socks_port, "value_changed", - G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY); + G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY); #endif /* Manual proxy options */ g_signal_connect (prefs->http_host, "changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_HTTP_HOST_KEY); g_signal_connect (prefs->https_host, "changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_HTTPS_HOST_KEY); g_signal_connect (prefs->ignore_hosts, "changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_IGNORE_HOSTS_KEY); g_signal_connect (prefs->http_port, "value_changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_HTTP_PORT_KEY); g_signal_connect (prefs->https_port, "value_changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_HTTPS_PORT_KEY); g_signal_connect (prefs->auth_user, "changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_AUTH_USER_KEY); g_signal_connect (prefs->auth_pwd, "changed", - G_CALLBACK(widget_entry_changed_cb), + G_CALLBACK (widget_entry_changed_cb), (gpointer) GCONF_E_AUTH_PWD_KEY); gtk_toggle_button_set_active (prefs->manual_proxy, val == NETWORK_PROXY_MANUAL); @@ -432,9 +432,9 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) } /* get our toplevel widget */ - target = em_config_target_new_prefs(ec, prefs->gconf); - e_config_set_target((EConfig *)ec, (EConfigTarget *)target); - toplevel = e_config_create_widget((EConfig *)ec); + target = em_config_target_new_prefs (ec, prefs->gconf); + e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); + toplevel = e_config_create_widget ((EConfig *)ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); } diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c index 68a6233b43..e47c9ac29c 100644 --- a/modules/plugin-mono/e-plugin-mono.c +++ b/modules/plugin-mono/e-plugin-mono.c @@ -191,7 +191,7 @@ plugin_mono_invoke (EPlugin *plugin, g_hash_table_insert (priv->methods, g_strdup (name), m); } - params = g_malloc0(sizeof (*params)*1); + params = g_malloc0 (sizeof (*params)*1); params[0] = &data; res = mono_runtime_invoke (m, priv->plugin, params, &x); /* do i need to free params?? */ diff --git a/modules/plugin-python/e-plugin-python.c b/modules/plugin-python/e-plugin-python.c index 6971a35543..8837432db2 100644 --- a/modules/plugin-python/e-plugin-python.c +++ b/modules/plugin-python/e-plugin-python.c @@ -162,7 +162,7 @@ plugin_python_invoke (EPlugin *plugin, } if (pValue) { - Py_DECREF(pValue); + Py_DECREF (pValue); /* Fixme */ return NULL; } else diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c index 0f7a69fc08..469087ba3e 100644 --- a/modules/windows-sens/evolution-windows-sens.c +++ b/modules/windows-sens/evolution-windows-sens.c @@ -198,19 +198,19 @@ struct ISensNetwork { #include <e-util/e-extension.h> /* 4E14FB9F-2E22-11D1-9964-00C04FBBB345 */ -DEFINE_GUID(IID_IEventSystem, 0x4E14FB9F, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); +DEFINE_GUID (IID_IEventSystem, 0x4E14FB9F, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); /* 4A6B0E15-2E38-11D1-9965-00C04FBBB345 */ -DEFINE_GUID(IID_IEventSubscription, 0x4A6B0E15, 0x2E38, 0x11D1, 0x99, 0x65, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); +DEFINE_GUID (IID_IEventSubscription, 0x4A6B0E15, 0x2E38, 0x11D1, 0x99, 0x65, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); /* d597bab1-5b9f-11d1-8dd2-00aa004abd5e */ -DEFINE_GUID(IID_ISensNetwork, 0xd597bab1, 0x5b9f, 0x11d1, 0x8d, 0xd2, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e); +DEFINE_GUID (IID_ISensNetwork, 0xd597bab1, 0x5b9f, 0x11d1, 0x8d, 0xd2, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e); /* 4E14FBA2-2E22-11D1-9964-00C04FBBB345 */ -DEFINE_GUID(CLSID_CEventSystem, 0x4E14FBA2, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); +DEFINE_GUID (CLSID_CEventSystem, 0x4E14FBA2, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45); /* 7542e960-79c7-11d1-88f9-0080c7d771bf */ -DEFINE_GUID(CLSID_CEventSubscription, 0x7542e960, 0x79c7, 0x11d1, 0x88, 0xf9, 0x00, 0x80, 0xc7, 0xd7, 0x71, 0xbf); +DEFINE_GUID (CLSID_CEventSubscription, 0x7542e960, 0x79c7, 0x11d1, 0x88, 0xf9, 0x00, 0x80, 0xc7, 0xd7, 0x71, 0xbf); /* Standard GObject macros */ #define E_TYPE_WINDOWS_SENS \ @@ -257,7 +257,7 @@ typedef struct ESensNetworkListener { EWindowsSENS *ews_ptr; } ESensNetworkListener; -static void e_sens_network_listener_init(ESensNetworkListener**,EWindowsSENS*); +static void e_sens_network_listener_init (ESensNetworkListener**,EWindowsSENS*); /* Functions to implement ISensNetwork interface */ @@ -298,7 +298,7 @@ e_sens_network_listener_queryinterface (ISensNetwork *This, { if (IsEqualIID (iid, &IID_IUnknown) || IsEqualIID (iid, &IID_IDispatch) || IsEqualIID (iid, &IID_ISensNetwork)) { *ppv = This; - ((LPUNKNOWN)*ppv)->lpVtbl->AddRef((LPUNKNOWN)*ppv); + ((LPUNKNOWN)*ppv)->lpVtbl->AddRef ((LPUNKNOWN)*ppv); return S_OK; } *ppv = NULL; @@ -309,14 +309,14 @@ static ULONG WINAPI e_sens_network_listener_addref (ISensNetwork *This) { ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; - return InterlockedIncrement(&(esnl_ptr->ref)); + return InterlockedIncrement (&(esnl_ptr->ref)); } static ULONG WINAPI e_sens_network_listener_release (ISensNetwork *This) { ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; - ULONG tmp = InterlockedDecrement(&(esnl_ptr->ref)); + ULONG tmp = InterlockedDecrement (&(esnl_ptr->ref)); return tmp; } @@ -371,7 +371,7 @@ e_sens_network_listener_connectionmade (ISensNetwork *This, ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr); /* Wait a second so that the connection stabilizes */ - g_usleep(G_USEC_PER_SEC); + g_usleep (G_USEC_PER_SEC); e_shell_set_network_available (shell, TRUE); } return S_OK; @@ -410,7 +410,7 @@ e_sens_network_listener_destinationreachable (ISensNetwork *This, ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr); /* Wait a second so that the connection stabilizes */ - g_usleep(G_USEC_PER_SEC); + g_usleep (G_USEC_PER_SEC); e_shell_set_network_available (shell, TRUE); } return S_OK; @@ -426,10 +426,10 @@ e_sens_network_listener_destinationreachablenoqocinfo (ISensNetwork *This, } static void -e_sens_network_listener_init(ESensNetworkListener **esnl_ptr, +e_sens_network_listener_init (ESensNetworkListener **esnl_ptr, EWindowsSENS *ews) { - (*esnl_ptr) = g_new0(ESensNetworkListener,1); + (*esnl_ptr) = g_new0 (ESensNetworkListener,1); (*esnl_ptr)->lpVtbl = &ESensNetworkListenerVtbl; (*esnl_ptr)->ews_ptr = ews; (*esnl_ptr)->ref = 1; @@ -450,9 +450,9 @@ static const gchar * add_curly_braces_to_uuid (const gchar * string_uuid) if (!string_uuid) return NULL; lstrcpy(curly_braced_uuid_string,"{"); - i = strlen(curly_braced_uuid_string); - lstrcat(curly_braced_uuid_string+i,string_uuid); - i = strlen(curly_braced_uuid_string); + i = strlen (curly_braced_uuid_string); + lstrcat (curly_braced_uuid_string+i,string_uuid); + i = strlen (curly_braced_uuid_string); lstrcat(curly_braced_uuid_string+i,"}"); return curly_braced_uuid_string; } @@ -482,9 +482,9 @@ windows_sens_constructed (GObject *object) guchar * subids[] = { 0, 0, 0, 0, 0 }; EWindowsSENS *extension = (E_WINDOWS_SENS (object)); - e_sens_network_listener_init(&pESensNetworkListener, extension); + e_sens_network_listener_init (&pESensNetworkListener, extension); - CoInitialize(0); + CoInitialize (0); res=CoCreateInstance (&CLSID_CEventSystem, 0,CLSCTX_SERVER,&IID_IEventSystem,(LPVOID*)&pEventSystem); @@ -492,14 +492,14 @@ windows_sens_constructed (GObject *object) unsigned i; - for (i=0; i<G_N_ELEMENTS(methods); i++) { + for (i=0; i<G_N_ELEMENTS (methods); i++) { res=CoCreateInstance (&CLSID_CEventSubscription, 0, CLSCTX_SERVER, &IID_IEventSubscription, (LPVOID*)&pEventSubscription); if (res == S_OK && pEventSubscription) { UUID tmp_uuid; - UuidCreate(&tmp_uuid); - UuidToString(&tmp_uuid, &subids[i]); + UuidCreate (&tmp_uuid); + UuidToString (&tmp_uuid, &subids[i]); res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((gchar *)subids[i]))); if (res) { RpcStringFree (&subids[i]); @@ -534,7 +534,7 @@ windows_sens_constructed (GObject *object) } } if (pEventSubscription) - pEventSubscription->lpVtbl->Release(pEventSubscription); + pEventSubscription->lpVtbl->Release (pEventSubscription); } /* Do not try to get initial state when we are sure we will not get system events. @@ -556,7 +556,7 @@ windows_sens_constructed (GObject *object) alive=pIsNetworkAlive (&Network); } - FreeLibrary(hDLL); + FreeLibrary (hDLL); e_shell_set_network_available (shell, alive); } |