aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:09:00 +0800
commit777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1 (patch)
treedfab9ca8f30c7b1539f86dfe19b8bf761d6a899c /modules/addressbook
parent83675abbc2b3a3bc6421094a56651d021fc0cdcd (diff)
downloadgsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.gz
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.bz2
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.lz
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.xz
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.zst
gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/addressbook')
-rw-r--r--modules/addressbook/addressbook-config.c114
-rw-r--r--modules/addressbook/addressbook-config.h4
-rw-r--r--modules/addressbook/autocompletion-config.c20
-rw-r--r--modules/addressbook/e-book-shell-migrate.c16
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c12
-rw-r--r--modules/addressbook/eab-composer-util.c4
-rw-r--r--modules/addressbook/openldap-extract.h30
7 files changed, 124 insertions, 76 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index a41651459a..f075372540 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -215,7 +215,12 @@ ldap_get_ssl_tooltip (AddressbookLDAPSSLType ssl_type)
}
static gboolean
-source_to_uri_parts (ESource *source, gchar **host, gchar **rootdn, AddressbookLDAPScopeType *scope, gchar **search_filter, gint *port)
+source_to_uri_parts (ESource *source,
+ gchar **host,
+ gchar **rootdn,
+ AddressbookLDAPScopeType *scope,
+ gchar **search_filter,
+ gint *port)
{
gchar *uri;
LDAPURLDesc *lud;
@@ -256,7 +261,8 @@ source_group_is_remote (ESourceGroup *group)
/* ldap api foo */
static LDAP *
-addressbook_ldap_init (GtkWidget *window, ESource *source)
+addressbook_ldap_init (GtkWidget *window,
+ ESource *source)
{
LDAP *ldap;
gchar *host;
@@ -284,7 +290,8 @@ addressbook_ldap_init (GtkWidget *window, ESource *source)
}
static gint
-addressbook_ldap_auth (GtkWidget *window, LDAP *ldap)
+addressbook_ldap_auth (GtkWidget *window,
+ LDAP *ldap)
{
gint ldap_error;
@@ -297,8 +304,10 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap)
}
static gint
-addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
- const gchar **attrs, LDAPMessage **resp)
+addressbook_root_dse_query (AddressbookSourceDialog *dialog,
+ LDAP *ldap,
+ const gchar **attrs,
+ LDAPMessage **resp)
{
GtkAdjustment *adjustment;
GtkRange *range;
@@ -322,7 +331,9 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
}
static gboolean
-do_ldap_root_dse_query (AddressbookSourceDialog *sdialog, GtkListStore *model, ESource *source)
+do_ldap_root_dse_query (AddressbookSourceDialog *sdialog,
+ GtkListStore *model,
+ ESource *source)
{
LDAP *ldap;
const gchar *attrs[2];
@@ -369,7 +380,8 @@ do_ldap_root_dse_query (AddressbookSourceDialog *sdialog, GtkListStore *model, E
}
static void
-search_base_selection_model_changed (GtkTreeSelection *selection, GtkWidget *dialog)
+search_base_selection_model_changed (GtkTreeSelection *selection,
+ GtkWidget *dialog)
{
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
@@ -377,7 +389,8 @@ search_base_selection_model_changed (GtkTreeSelection *selection, GtkWidget *dia
}
static void
-query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
+query_for_supported_bases (GtkWidget *button,
+ AddressbookSourceDialog *sdialog)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -427,7 +440,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
#endif /* HAVE_LDAP */
-GtkWidget*
+GtkWidget *
addressbook_config_create_new_source (GtkWidget *parent)
{
return addressbook_config_edit_source (parent, NULL);
@@ -436,7 +449,8 @@ addressbook_config_create_new_source (GtkWidget *parent)
/* ********************************************************************** */
static void
-eabc_type_changed (GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
+eabc_type_changed (GtkComboBox *dropdown,
+ AddressbookSourceDialog *sdialog)
{
gint id = gtk_combo_box_get_active (dropdown);
GtkTreeModel *model;
@@ -454,7 +468,7 @@ eabc_type_changed (GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
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 */
+ * I guess plugins will have to use the do it in their factory callbacks */
if (!strncmp(e_source_group_peek_base_uri(sdialog->source_group), "groupwise:", 10)) {
GSList *l;
ESource *source;
@@ -520,7 +534,7 @@ eabc_general_type (EConfig *ec,
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);
@@ -535,7 +549,7 @@ eabc_general_type (EConfig *ec,
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);
+ 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);
@@ -548,7 +562,8 @@ eabc_general_type (EConfig *ec,
}
static void
-name_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+name_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *sdialog)
{
const gchar *text;
gchar *stripped_name;
@@ -583,7 +598,7 @@ eabc_general_name (EConfig *ec,
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);
+ 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));
/* Hardcoded: groupwise can't edit the name (or anything else) */
@@ -601,7 +616,8 @@ eabc_general_name (EConfig *ec,
/* TODO: This should be moved to plugins if B&A calendar setup is moved there */
static void
-use_in_cal_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
+use_in_cal_changed_cb (GtkWidget *widget,
+ AddressbookSourceDialog *sdialog)
{
e_source_set_property (sdialog->source, "use-in-contacts-calendar", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? "1" : "0");
}
@@ -640,7 +656,8 @@ eabc_general_use_in_cal (EConfig *ec,
}
static void
-offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
+offline_status_changed_cb (GtkWidget *widget,
+ AddressbookSourceDialog *sdialog)
{
e_source_set_property (sdialog->source, "offline_sync", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? "1" : "0");
}
@@ -684,7 +701,7 @@ form_ldap_search_filter (GtkWidget *w)
const gchar *search_filter = gtk_entry_get_text ((GtkEntry *) w);
/* this function can be used to format the search filter entered */
- if ((strlen (search_filter) !=0) && *search_filter != '(' && *(search_filter + (strlen (search_filter-1))) != ')')
+ if ((strlen (search_filter) !=0) && *search_filter != '(' && *(search_filter + (strlen (search_filter - 1))) != ')')
filter = g_strdup_printf ("(%s)", search_filter);
else
filter = g_strdup_printf ("%s", search_filter);
@@ -710,13 +727,15 @@ url_changed (AddressbookSourceDialog *sdialog)
}
static void
-host_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+host_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *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);
@@ -732,7 +751,8 @@ port_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *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));
@@ -798,7 +818,8 @@ eabc_general_host (EConfig *ec,
}
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);
@@ -821,7 +842,8 @@ 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));
@@ -882,19 +904,22 @@ eabc_general_auth (EConfig *ec,
}
static void
-rootdn_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+rootdn_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *sdialog)
{
url_changed (sdialog);
}
static void
-search_filter_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+search_filter_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *sdialog)
{
url_changed (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);
@@ -968,7 +993,8 @@ eabc_details_search (EConfig *ec,
}
static void
-timeout_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+timeout_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *sdialog)
{
GtkAdjustment *adjustment;
GtkRange *range;
@@ -982,7 +1008,8 @@ timeout_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static void
-limit_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
+limit_changed_cb (GtkWidget *w,
+ AddressbookSourceDialog *sdialog)
{
gchar limit[16];
@@ -991,7 +1018,8 @@ limit_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static void
-canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source)
+canbrowse_toggled_cb (GtkWidget *toggle_button,
+ ESource *source)
{
if (!source || !toggle_button)
return;
@@ -1027,14 +1055,14 @@ eabc_details_limit (EConfig *ec,
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");
@@ -1110,7 +1138,9 @@ eabc_commit (EConfig *ec,
}
static void
-eabc_free (EConfig *ec, GSList *items, gpointer data)
+eabc_free (EConfig *ec,
+ GSList *items,
+ gpointer data)
{
AddressbookSourceDialog *sdialog = data;
@@ -1129,7 +1159,9 @@ eabc_free (EConfig *ec, GSList *items, gpointer data)
}
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;
@@ -1187,7 +1219,8 @@ 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;
@@ -1197,8 +1230,9 @@ source_changed (ESource *source, AddressbookSourceDialog *sdialog)
}
#endif
-GtkWidget*
-addressbook_config_edit_source (GtkWidget *parent, ESource *source)
+GtkWidget *
+addressbook_config_edit_source (GtkWidget *parent,
+ ESource *source)
{
AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
EABConfig *ec;
@@ -1234,12 +1268,12 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
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++)
+ for (i = 0; eabc_new_items[i].path; i++)
items = g_slist_prepend (items, &eabc_new_items[i]);
g_object_unref (gconf);
}
@@ -1251,12 +1285,12 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
xml = e_source_to_standalone_xml (sdialog->source);
printf("but working standalone xml: %s\n", xml);
g_free (xml);
- g_signal_connect(sdialog->source, "changed", source_changed, sdialog);
+ g_signal_connect (sdialog->source, "changed", source_changed, sdialog);
#endif
sdialog->config = ec = eab_config_new(E_CONFIG_BOOK, "com.novell.evolution.addressbook.config.accountEditor");
- for (i=0;eabc_items[i].path;i++) {
+ 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]);
diff --git a/modules/addressbook/addressbook-config.h b/modules/addressbook/addressbook-config.h
index d9fefb7e82..e316392497 100644
--- a/modules/addressbook/addressbook-config.h
+++ b/modules/addressbook/addressbook-config.h
@@ -47,7 +47,7 @@ typedef enum {
ADDRESSBOOK_LDAP_SSL_NEVER /* No encryption */
} AddressbookLDAPSSLType;
-GtkWidget* addressbook_config_edit_source (GtkWidget *parent, ESource *source);
-GtkWidget* addressbook_config_create_new_source (GtkWidget *parent);
+GtkWidget * addressbook_config_edit_source (GtkWidget *parent, ESource *source);
+GtkWidget * addressbook_config_create_new_source (GtkWidget *parent);
#endif /* __ADDRESSBOOK_CONFIG_H__ */
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index d4124193a6..020ad1dc81 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -61,7 +61,7 @@ source_selection_changed_cb (ESourceSelector *source_selector)
}
/* then we loop over the selector's selection, setting the
- property on those sources */
+ * property on those sources */
selection = e_source_selector_get_selection (source_selector);
for (l = selection; l; l = l->next) {
ESource *source = E_SOURCE (l->data);
@@ -134,7 +134,12 @@ add_section (GtkWidget *container,
}
static GtkWidget *
-acc_get_toplevel_notebook (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gint position, gpointer data)
+acc_get_toplevel_notebook (EConfig *ec,
+ EConfigItem *item,
+ GtkWidget *parent,
+ GtkWidget *old,
+ gint position,
+ gpointer data)
{
if (old)
return old;
@@ -146,7 +151,12 @@ acc_get_toplevel_notebook (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
}
static GtkWidget *
-acc_get_general_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gint position, gpointer data)
+acc_get_general_page (EConfig *ec,
+ EConfigItem *item,
+ GtkWidget *parent,
+ GtkWidget *old,
+ gint position,
+ gpointer data)
{
EShellSettings *shell_settings;
ESourceList *source_list;
@@ -227,7 +237,9 @@ static EConfigItem acc_items[] = {
};
static void
-acc_free (EConfig *ec, GSList *items, gpointer data)
+acc_free (EConfig *ec,
+ GSList *items,
+ gpointer data)
{
g_slist_free (items);
}
diff --git a/modules/addressbook/e-book-shell-migrate.c b/modules/addressbook/e-book-shell-migrate.c
index a88219348a..9b3c52c52b 100644
--- a/modules/addressbook/e-book-shell-migrate.c
+++ b/modules/addressbook/e-book-shell-migrate.c
@@ -53,8 +53,8 @@
typedef struct {
/* this hash table maps old folder uris to new uids. It's
- build in migrate_contact_folder and it's used in
- migrate_completion_folders. */
+ * build in migrate_contact_folder and it's used in
+ * migrate_completion_folders. */
GHashTable *folder_uid_map;
ESourceList *source_list;
@@ -73,9 +73,9 @@ typedef struct {
static void
create_groups (MigrationContext *context,
- ESourceGroup **on_this_computer,
- ESourceGroup **on_ldap_servers,
- ESource **personal_source)
+ ESourceGroup **on_this_computer,
+ ESourceGroup **on_ldap_servers,
+ ESource **personal_source)
{
GSList *groups;
ESourceGroup *group;
@@ -115,7 +115,7 @@ create_groups (MigrationContext *context,
if (*on_this_computer) {
/* make sure "Personal" shows up as a source under
- this group */
+ * this group */
GSList *sources = e_source_group_peek_sources (*on_this_computer);
GSList *s;
for (s = sources; s; s = s->next) {
@@ -207,8 +207,8 @@ e_book_shell_backend_migrate (EShellBackend *shell_backend,
context = migration_context_new (data_dir);
/* we call this unconditionally now - create_groups either
- creates the groups/sources or it finds the necessary
- groups/sources. */
+ * creates the groups/sources or it finds the necessary
+ * groups/sources. */
create_groups (context, &on_this_computer, &on_ldap_servers, &personal_source);
if (on_this_computer)
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index 52d8243ead..a6aebe08a2 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -218,9 +218,9 @@ action_address_book_properties_cb (GtkAction *action,
#ifdef WITH_CONTACT_MAPS
static void
contact_editor_contact_modified_cb (EABEditor *editor,
- const GError *error,
- EContact *contact,
- gpointer user_data)
+ const GError *error,
+ EContact *contact,
+ gpointer user_data)
{
EContactMapWindow *window = user_data;
EContactMap *map;
@@ -241,8 +241,8 @@ contact_editor_contact_modified_cb (EABEditor *editor,
static void
map_window_show_contact_editor_cb (EContactMapWindow *window,
- const gchar *contact_uid,
- gpointer user_data)
+ const gchar *contact_uid,
+ gpointer user_data)
{
EShell *shell = e_shell_get_default ();
EBookShellView *book_shell_view = user_data;
@@ -291,7 +291,7 @@ map_window_show_contact_editor_cb (EContactMapWindow *window,
/* We need this function to he defined all the time. */
static void
action_address_book_map_cb (GtkAction *action,
- EBookShellView *book_shell_view)
+ EBookShellView *book_shell_view)
{
#ifdef WITH_CONTACT_MAPS
EContactMapWindow *map_window;
diff --git a/modules/addressbook/eab-composer-util.c b/modules/addressbook/eab-composer-util.c
index 215dacea05..9f17dd34d5 100644
--- a/modules/addressbook/eab-composer-util.c
+++ b/modules/addressbook/eab-composer-util.c
@@ -95,7 +95,9 @@ eab_send_as_to (EShell *shell,
}
static const gchar *
-get_email (EContact *contact, EContactField field_id, gchar **to_free)
+get_email (EContact *contact,
+ EContactField field_id,
+ gchar **to_free)
{
gchar *name = NULL, *mail = NULL;
const gchar *value = e_contact_get_const (contact, field_id);
diff --git a/modules/addressbook/openldap-extract.h b/modules/addressbook/openldap-extract.h
index eb8457fe0e..d838e8b49b 100644
--- a/modules/addressbook/openldap-extract.h
+++ b/modules/addressbook/openldap-extract.h
@@ -193,12 +193,12 @@ get_token (const gchar **sp,
(*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);
- res[q-p] = '\0';
+ strncpy (res,p,q - p);
+ res[q - p] = '\0';
*token_val = res;
}
(*sp)++;
@@ -217,12 +217,12 @@ get_token (const gchar **sp,
**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);
- res[q-p] = '\0';
+ strncpy (res,p,q - p);
+ res[q - p] = '\0';
*token_val = res;
}
break;
@@ -287,7 +287,7 @@ 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);
@@ -326,9 +326,9 @@ parse_qdescrs (const gchar **sp, gint *code)
if (kind == TK_RIGHTPAREN)
break;
if (kind == TK_QDESCR) {
- if (pos == size-2) {
+ 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);
@@ -417,9 +417,9 @@ parse_oids (const gchar **sp, gint *code, const gint allow_quoted)
if (kind == TK_BAREWORD ||
(allow_quoted &&
kind == TK_QDSTRING)) {
- if (pos == size-2) {
+ 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);
@@ -551,8 +551,8 @@ ldap_str2objectclass (LDAP_CONST gchar *s,
} else if (flags &
LDAP_SCHEMA_ALLOW_OID_MACRO) {
/* Non-numerical OID, ignore */
- gint len = ss-savepos;
- oc->oc_oid = LDAP_MALLOC (len+1);
+ gint len = ss - savepos;
+ oc->oc_oid = LDAP_MALLOC (len + 1);
strncpy (oc->oc_oid, savepos, len);
oc->oc_oid[len] = 0;
}
@@ -1124,7 +1124,7 @@ ldap_url_parse_ext (LDAP_CONST gchar *url_in,
}
if (enclosed) {
- p = &url[strlen (url)-1];
+ p = &url[strlen (url) - 1];
if (*p != '>') {
LDAP_FREE (url);
@@ -1391,7 +1391,7 @@ ldap_url_parse_ext (LDAP_CONST gchar *url_in,
return LDAP_URL_ERR_BADEXTS;
}
- for (i=0; ludp->lud_exts[i] != NULL; i++) {
+ for (i = 0; ludp->lud_exts[i] != NULL; i++) {
ldap_pvt_hex_unescape (ludp->lud_exts[i]);
if (*ludp->lud_exts[i] == '!') {