aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 23:13:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-29 00:13:23 +0800
commitfad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch)
treeae78be371695c3dc18847b87d3f014f985aa3a40 /addressbook/gui/component
parent6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff)
downloadgsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.bz2
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.lz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.xz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook-component.c42
-rw-r--r--addressbook/gui/component/addressbook-component.h2
-rw-r--r--addressbook/gui/component/addressbook-config.c106
-rw-r--r--addressbook/gui/component/addressbook-migrate.c132
-rw-r--r--addressbook/gui/component/addressbook-migrate.h2
-rw-r--r--addressbook/gui/component/addressbook-view.c104
-rw-r--r--addressbook/gui/component/addressbook-view.h4
-rw-r--r--addressbook/gui/component/addressbook.c12
-rw-r--r--addressbook/gui/component/autocompletion-config.c4
-rw-r--r--addressbook/gui/component/component-factory.c4
-rw-r--r--addressbook/gui/component/openldap-extract.h190
11 files changed, 301 insertions, 301 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 2c1d5caa9b..ec715b7cb9 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -61,7 +61,7 @@ static BonoboObjectClass *parent_class = NULL;
struct _AddressbookComponentPrivate {
GConfClient *gconf_client;
- char *base_directory;
+ gchar *base_directory;
GList *views;
};
@@ -71,7 +71,7 @@ ensure_sources (AddressbookComponent *component)
ESourceList *source_list;
ESourceGroup *on_this_computer;
ESource *personal_source;
- char *base_uri, *base_uri_proto, base_uri_proto_seventh;
+ gchar *base_uri, *base_uri_proto, base_uri_proto_seventh;
const gchar *base_dir;
personal_source = NULL;
@@ -204,28 +204,28 @@ impl__get_userCreatableItems (PortableServer_Servant servant,
CORBA_sequence_set_release (list, FALSE);
- list->_buffer[0].id = (char *) "contact";
+ list->_buffer[0].id = (gchar *) "contact";
list->_buffer[0].description = _("New Contact");
- list->_buffer[0].menuDescription = (char *) C_("New", "_Contact");
+ list->_buffer[0].menuDescription = (gchar *) C_("New", "_Contact");
list->_buffer[0].tooltip = _("Create a new contact");
list->_buffer[0].menuShortcut = 'c';
- list->_buffer[0].iconName = (char *) "contact-new";
+ list->_buffer[0].iconName = (gchar *) "contact-new";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
- list->_buffer[1].id = (char *) "contact_list";
+ list->_buffer[1].id = (gchar *) "contact_list";
list->_buffer[1].description = _("New Contact List");
- list->_buffer[1].menuDescription = (char *) C_("New", "Contact _List");
+ list->_buffer[1].menuDescription = (gchar *) C_("New", "Contact _List");
list->_buffer[1].tooltip = _("Create a new contact list");
list->_buffer[1].menuShortcut = 'l';
- list->_buffer[1].iconName = (char *) "stock_contact-list";
+ list->_buffer[1].iconName = (gchar *) "stock_contact-list";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
- list->_buffer[2].id = (char *) "address_book";
+ list->_buffer[2].id = (gchar *) "address_book";
list->_buffer[2].description = _("New Address Book");
- list->_buffer[2].menuDescription = (char *) C_("New", "Address _Book");
+ list->_buffer[2].menuDescription = (gchar *) C_("New", "Address _Book");
list->_buffer[2].tooltip = _("Create a new address book");
list->_buffer[2].menuShortcut = '\0';
- list->_buffer[2].iconName = (char *) "address-book-new";
+ list->_buffer[2].iconName = (gchar *) "address-book-new";
list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
@@ -235,7 +235,7 @@ static void
book_loaded_cb (EBook *book, EBookStatus status, gpointer data)
{
EContact *contact;
- char *item_type_name = data;
+ gchar *item_type_name = data;
if (status != E_BOOK_ERROR_OK) {
/* XXX we really need a dialog here, but we don't have
@@ -267,7 +267,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
EBook *book;
GConfClient *gconf_client;
ESourceList *source_list;
- char *uid;
+ gchar *uid;
if (!item_type_name ||
(strcmp (item_type_name, "address_book") &&
@@ -310,7 +310,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
static void
impl_handleURI (PortableServer_Servant servant,
- const char* uri,
+ const gchar * uri,
CORBA_Environment *ev)
{
AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant));
@@ -318,8 +318,8 @@ impl_handleURI (PortableServer_Servant servant,
AddressbookView *view = NULL;
GList *l;
- char *src_uid = NULL;
- char *contact_uid = NULL;
+ gchar *src_uid = NULL;
+ gchar *contact_uid = NULL;
priv = addressbook_component->priv;
l = g_list_last (priv->views);
@@ -330,8 +330,8 @@ impl_handleURI (PortableServer_Servant servant,
if (!strncmp (uri, "contacts:", 9)) {
EUri *euri = e_uri_new (uri);
- const char *p;
- char *header, *content;
+ const gchar *p;
+ gchar *header, *content;
size_t len, clen;
p = euri->query;
@@ -343,7 +343,7 @@ impl_handleURI (PortableServer_Servant servant,
if (p[len] != '=')
break;
- header = (char *) p;
+ header = (gchar *) p;
header[len] = '\0';
p += len + 1;
@@ -462,7 +462,7 @@ static void
addressbook_component_init (AddressbookComponent *component)
{
AddressbookComponentPrivate *priv;
- static int first = TRUE;
+ static gint first = TRUE;
priv = g_new0 (AddressbookComponentPrivate, 1);
@@ -518,7 +518,7 @@ addressbook_component_peek_gconf_client (AddressbookComponent *component)
return component->priv->gconf_client;
}
-const char *
+const gchar *
addressbook_component_peek_base_directory (AddressbookComponent *component)
{
g_return_val_if_fail (ADDRESSBOOK_IS_COMPONENT (component), NULL);
diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h
index 222ace82d7..4208994117 100644
--- a/addressbook/gui/component/addressbook-component.h
+++ b/addressbook/gui/component/addressbook-component.h
@@ -59,6 +59,6 @@ GType addressbook_component_get_type (void);
AddressbookComponent *addressbook_component_peek (void);
GConfClient *addressbook_component_peek_gconf_client (AddressbookComponent *component);
-const char *addressbook_component_peek_base_directory (AddressbookComponent *component);
+const gchar *addressbook_component_peek_base_directory (AddressbookComponent *component);
#endif /* _ADDRESSBOOK_COMPONENT_H_ */
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index ebb2d18b5d..46ab002ecb 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -75,8 +75,8 @@
#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory:" BASE_VERSION
#define LDAP_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl:" BASE_VERSION
-GtkWidget* supported_bases_create_table (char *name, char *string1, char *string2,
- int num1, int num2);
+GtkWidget* supported_bases_create_table (gchar *name, gchar *string1, gchar *string2,
+ gint num1, gint num2);
/* default objectclasses */
#define TOP "top"
@@ -152,7 +152,7 @@ ldap_unparse_auth (AddressbookLDAPAuthType auth_type)
}
static AddressbookLDAPAuthType
-ldap_parse_auth (const char *auth)
+ldap_parse_auth (const gchar *auth)
{
if (!auth)
return ADDRESSBOOK_LDAP_AUTH_NONE;
@@ -196,7 +196,7 @@ ldap_unparse_ssl (AddressbookLDAPSSLType ssl_type)
}
static AddressbookLDAPSSLType
-ldap_parse_ssl (const char *ssl)
+ldap_parse_ssl (const gchar *ssl)
{
if (!ssl)
return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; /* XXX good default? */
@@ -209,7 +209,7 @@ ldap_parse_ssl (const char *ssl)
return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE;
}
-static const char *
+static const gchar *
ldap_get_ssl_tooltip (AddressbookLDAPSSLType ssl_type)
{
switch (ssl_type) {
@@ -271,8 +271,8 @@ addressbook_ldap_init (GtkWidget *window, ESource *source)
LDAP *ldap;
gchar *host;
gint port;
- int ldap_error;
- int protocol_version = LDAP_VERSION3;
+ gint ldap_error;
+ gint protocol_version = LDAP_VERSION3;
if (!source_to_uri_parts (source, &host, NULL, NULL, NULL, &port))
return NULL;
@@ -310,7 +310,7 @@ static int
addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
const gchar **attrs, LDAPMessage **resp)
{
- int ldap_error;
+ gint ldap_error;
struct timeval timeout;
timeout.tv_sec = (gint) gtk_adjustment_get_value (GTK_RANGE(dialog->timeout_scale)->adjustment);
@@ -328,7 +328,7 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
/* searching page */
GtkWidget*
-supported_bases_create_table (char *name, char *string1, char *string2, int num1, int num2)
+supported_bases_create_table (gchar *name, gchar *string1, gchar *string2, gint num1, gint num2)
{
GtkWidget *table, *scrolled;
GtkTreeSelection *selection;
@@ -359,10 +359,10 @@ do_ldap_root_dse_query (AddressbookSourceDialog *sdialog, GtkListStore *model, E
{
LDAP *ldap;
const gchar *attrs[2];
- int ldap_error;
- char **values;
+ gint ldap_error;
+ gchar **values;
LDAPMessage *resp;
- int i;
+ gint i;
ldap = addressbook_ldap_init (sdialog->window, source);
if (!ldap)
@@ -419,7 +419,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
GtkWidget *supported_bases_table;
GladeXML *gui;
GtkTreeIter iter;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
GLADE_FILE_NAME,
@@ -450,7 +450,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK
&& gtk_tree_selection_get_selected (selection, &model, &iter)) {
- char *dn;
+ gchar *dn;
gtk_tree_model_get (model, &iter, 0, &dn, -1);
gtk_entry_set_text((GtkEntry *)sdialog->rootdn, dn);
@@ -474,7 +474,7 @@ addressbook_config_create_new_source (GtkWidget *parent)
static void
eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
@@ -494,7 +494,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
if (!strncmp(e_source_group_peek_base_uri(sdialog->source_group), "groupwise:", 10)) {
GSList *l;
ESource *source;
- char *tmp;
+ gchar *tmp;
l = e_source_group_peek_sources(sdialog->source_group);
if (l && l->data ) {
@@ -510,7 +510,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
g_free (tmp);
#ifdef HAVE_LDAP
} else if (!strncmp(e_source_group_peek_base_uri(sdialog->source_group), "ldap:", 5)) {
- char *tmp;
+ gchar *tmp;
tmp = g_strdup_printf ("%s:%s/%s?" /* trigraph prevention */ "?%s",
"", LDAP_PORT_STRING,
@@ -529,7 +529,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkComboBox *dropdown;
@@ -538,7 +538,7 @@ eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
GtkTreeIter iter;
GSList *l;
GtkWidget *w, *label;
- int i, row = 0;
+ gint i, row = 0;
if (old)
return old;
@@ -595,13 +595,13 @@ offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
- const char *uri;
+ const gchar *uri;
GtkWidget *w;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
if (old)
return old;
@@ -634,11 +634,11 @@ eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
static GtkWidget *
-eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *offline_setting;
- const char *offline_sync;
+ const gchar *offline_sync;
gboolean is_local_book;
is_local_book = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:");
@@ -701,7 +701,7 @@ host_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
static void
port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- const char *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;
@@ -725,15 +725,15 @@ ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
static GtkWidget *
-eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
- const char *tmp;
+ const gchar *tmp;
GtkWidget *w;
- char *uri, port[16];
+ gchar *uri, port[16];
LDAPURLDesc *lud;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
if (!source_group_is_remote(sdialog->source_group))
return NULL;
@@ -783,7 +783,7 @@ eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
static void
auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- const char *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) {
@@ -814,13 +814,13 @@ auth_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *w;
- const char *tmp;
+ const gchar *tmp;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
if (!source_group_is_remote(sdialog->source_group))
return NULL;
@@ -883,14 +883,14 @@ scope_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *w;
LDAPURLDesc *lud;
- char *uri;
+ gchar *uri;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
if (!source_group_is_remote(sdialog->source_group))
return NULL;
@@ -951,7 +951,7 @@ eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, s
static void
timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- char *timeout;
+ gchar *timeout;
timeout = g_strdup_printf("%f", gtk_adjustment_get_value(((GtkRange *)sdialog->timeout_scale)->adjustment));
e_source_set_property(sdialog->source, "timeout", timeout);
@@ -961,7 +961,7 @@ timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
static void
limit_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- char limit[16];
+ gchar limit[16];
sprintf(limit, "%d", gtk_spin_button_get_value_as_int((GtkSpinButton *)sdialog->limit_spinbutton));
e_source_set_property(sdialog->source, "limit", limit);
@@ -977,13 +977,13 @@ canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source)
}
static GtkWidget *
-eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *w;
- const char *tmp;
+ const gchar *tmp;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
if (!source_group_is_remote(sdialog->source_group))
return NULL;
@@ -1045,18 +1045,18 @@ static EConfigItem eabc_new_items[] = {
};
static void
-eabc_commit(EConfig *ec, GSList *items, void *data)
+eabc_commit(EConfig *ec, GSList *items, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
xmlNodePtr xml;
#if d(!)0
- char *txt;
+ gchar *txt;
#endif
if (sdialog->original_source) {
d(printf("committing addressbook changes\n"));
/* these api's kinda suck */
- xml = xmlNewNode(NULL, (const unsigned char *)"dummy");
+ 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);
@@ -1079,7 +1079,7 @@ eabc_commit(EConfig *ec, GSList *items, void *data)
}
static void
-eabc_free(EConfig *ec, GSList *items, void *data)
+eabc_free(EConfig *ec, GSList *items, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
@@ -1098,11 +1098,11 @@ eabc_free(EConfig *ec, GSList *items, void *data)
}
static gboolean
-eabc_check_complete(EConfig *ec, const char *pageid, void *data)
+eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
- int valid = TRUE;
- const char *tmp;
+ gint valid = TRUE;
+ const gchar *tmp;
ESource *source;
d(printf("check complete, pageid = '%s'\n", pageid?pageid:"<all>"));
@@ -1114,7 +1114,7 @@ eabc_check_complete(EConfig *ec, const char *pageid, void *data)
#ifdef HAVE_LDAP
if (valid && source_group_is_remote(sdialog->source_group)) {
- char *uri = e_source_get_uri(sdialog->source);
+ gchar *uri = e_source_get_uri(sdialog->source);
LDAPURLDesc *lud;
/* check host and port set */
@@ -1158,7 +1158,7 @@ eabc_check_complete(EConfig *ec, const char *pageid, void *data)
static void
source_changed(ESource *source, AddressbookSourceDialog *sdialog)
{
- char *xml;
+ gchar *xml;
xml = e_source_to_standalone_xml(source);
printf("source changed:\n%s\n", xml);
@@ -1171,11 +1171,11 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
{
AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
EABConfig *ec;
- int i;
+ gint i;
GSList *items = NULL;
EABConfigTargetSource *target;
- char *xml;
- char *gladefile;
+ gchar *xml;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
GLADE_FILE_NAME,
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index ca691761c9..8017e8979f 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -106,7 +106,7 @@ dialog_close (MigrationContext *context)
}
static void
-dialog_set_label (MigrationContext *context, const char *str)
+dialog_set_label (MigrationContext *context, const gchar *str)
{
gtk_label_set_text (GTK_LABEL (context->label), str);
@@ -119,9 +119,9 @@ dialog_set_label (MigrationContext *context, const char *str)
}
static void
-dialog_set_folder_name (MigrationContext *context, const char *folder_name)
+dialog_set_folder_name (MigrationContext *context, const gchar *folder_name)
{
- char *text;
+ gchar *text;
text = g_strdup_printf (_("Migrating '%s':"), folder_name);
gtk_label_set_text (GTK_LABEL (context->folder_label), text);
@@ -140,7 +140,7 @@ dialog_set_folder_name (MigrationContext *context, const char *folder_name)
static void
dialog_set_progress (MigrationContext *context, double percent)
{
- char text[5];
+ gchar text[5];
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
@@ -156,7 +156,7 @@ dialog_set_progress (MigrationContext *context, double percent)
}
static gboolean
-check_for_conflict (ESourceGroup *group, char *name)
+check_for_conflict (ESourceGroup *group, gchar *name)
{
GSList *sources;
GSList *s;
@@ -173,16 +173,16 @@ check_for_conflict (ESourceGroup *group, char *name)
return FALSE;
}
-static char *
-get_source_name (ESourceGroup *group, const char *path)
+static gchar *
+get_source_name (ESourceGroup *group, const gchar *path)
{
#ifndef G_OS_WIN32
- char **p = g_strsplit (path, "/", 0);
+ gchar **p = g_strsplit (path, "/", 0);
#else
- char **p = g_strsplit_set (path, "\\/", 0);
+ gchar **p = g_strsplit_set (path, "\\/", 0);
#endif
- int i, j, starting_index;
- int num_elements;
+ gint i, j, starting_index;
+ gint num_elements;
gboolean conflict;
GString *s = g_string_new ("");
@@ -227,8 +227,8 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
{
EBookQuery *query = e_book_query_any_field_contains ("");
GList *l, *contacts;
- int num_added = 0;
- int num_contacts;
+ gint num_added = 0;
+ gint num_contacts;
/* both books are loaded, start the actual migration */
e_book_get_contacts (old_book, query, &contacts, NULL);
@@ -341,7 +341,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
"OTHER");
if (v && v->data) {
- if (!strncmp ((char*)v->data, "<?xml", 5)) {
+ if (!strncmp ((gchar *)v->data, "<?xml", 5)) {
/* k, this is the nasty part. we glomb all the
value strings back together again (if there is
more than one), then work our magic */
@@ -381,9 +381,9 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
}
static void
-migrate_contact_folder_to_source (MigrationContext *context, char *old_path, ESource *new_source)
+migrate_contact_folder_to_source (MigrationContext *context, gchar *old_path, ESource *new_source)
{
- char *old_uri = g_filename_to_uri (old_path, NULL, NULL);
+ gchar *old_uri = g_filename_to_uri (old_path, NULL, NULL);
GError *e = NULL;
EBook *old_book = NULL, *new_book = NULL;
@@ -423,7 +423,7 @@ migrate_contact_folder_to_source (MigrationContext *context, char *old_path, ESo
}
static void
-migrate_contact_folder (MigrationContext *context, char *old_path, ESourceGroup *dest_group, char *source_name)
+migrate_contact_folder (MigrationContext *context, gchar *old_path, ESourceGroup *dest_group, gchar *source_name)
{
ESource *new_source;
@@ -449,7 +449,7 @@ create_groups (MigrationContext *context,
{
GSList *groups;
ESourceGroup *group;
- char *base_uri, *base_uri_proto;
+ gchar *base_uri, *base_uri_proto;
const gchar *base_dir;
*on_this_computer = NULL;
@@ -528,9 +528,9 @@ create_groups (MigrationContext *context,
static gboolean
migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer, ESource *personal_source)
{
- char *old_path = NULL;
+ gchar *old_path = NULL;
GSList *dirs, *l;
- char *local_contact_folder = NULL;
+ gchar *local_contact_folder = NULL;
old_path = g_strdup_printf ("%s/evolution/local", g_get_home_dir ());
@@ -542,15 +542,15 @@ migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer
NULL);
for (l = dirs; l; l = l->next) {
- char *source_name;
+ gchar *source_name;
/* we handle the system folder differently */
- if (personal_source && !strcmp ((char*)l->data, local_contact_folder)) {
+ if (personal_source && !strcmp ((gchar *)l->data, local_contact_folder)) {
g_hash_table_insert (context->folder_uid_map, g_strdup (l->data), g_strdup (e_source_peek_uid (personal_source)));
migrate_contact_folder_to_source (context, local_contact_folder, personal_source);
continue;
}
- source_name = get_source_name (on_this_computer, (char*)l->data);
+ source_name = get_source_name (on_this_computer, (gchar *)l->data);
migrate_contact_folder (context, l->data, on_this_computer, source_name);
g_free (source_name);
}
@@ -563,13 +563,13 @@ migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer
return TRUE;
}
-static char *
+static gchar *
get_string_child (xmlNode *node,
- const char *name)
+ const gchar *name)
{
xmlNode *p;
xmlChar *xml_string;
- char *retval;
+ gchar *retval;
p = e_xml_get_child_by_name (node, (xmlChar *) name);
if (p == NULL)
@@ -580,7 +580,7 @@ get_string_child (xmlNode *node,
return g_strdup("");
xml_string = xmlNodeListGetString (node->doc, p, 1);
- retval = g_strdup ((char *) xml_string);
+ retval = g_strdup ((gchar *) xml_string);
xmlFree (xml_string);
return retval;
@@ -588,12 +588,12 @@ get_string_child (xmlNode *node,
static int
get_integer_child (xmlNode *node,
- const char *name,
- int defval)
+ const gchar *name,
+ gint defval)
{
xmlNode *p;
xmlChar *xml_string;
- int retval;
+ gint retval;
p = e_xml_get_child_by_name (node, (xmlChar *) name);
if (p == NULL)
@@ -604,7 +604,7 @@ get_integer_child (xmlNode *node,
return defval;
xml_string = xmlNodeListGetString (node->doc, p, 1);
- retval = atoi ((char *)xml_string);
+ retval = atoi ((gchar *)xml_string);
xmlFree (xml_string);
return retval;
@@ -613,7 +613,7 @@ get_integer_child (xmlNode *node,
static gboolean
migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
{
- char *sources_xml = g_strdup_printf ("%s/evolution/addressbook-sources.xml",
+ gchar *sources_xml = g_strdup_printf ("%s/evolution/addressbook-sources.xml",
g_get_home_dir ());
printf ("trying to migrate from %s\n", sources_xml);
@@ -622,14 +622,14 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
xmlDoc *doc = xmlParseFile (sources_xml);
xmlNode *root;
xmlNode *child;
- int num_contactservers;
- int servernum;
+ gint num_contactservers;
+ gint servernum;
if (!doc)
return FALSE;
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp ((const char *)root->name, "addressbooks") != 0) {
+ if (root == NULL || strcmp ((const gchar *)root->name, "addressbooks") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
@@ -637,7 +637,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
/* count the number of servers, so we can give progress */
num_contactservers = 0;
for (child = root->children; child; child = child->next) {
- if (!strcmp ((const char *)child->name, "contactserver")) {
+ if (!strcmp ((const gchar *)child->name, "contactserver")) {
num_contactservers++;
}
}
@@ -647,11 +647,11 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
servernum = 0;
for (child = root->children; child; child = child->next) {
- if (!strcmp ((const char *)child->name, "contactserver")) {
- char *port, *host, *rootdn, *scope, *authmethod, *ssl;
- char *emailaddr, *binddn, *limitstr;
- int limit;
- char *name, *description;
+ if (!strcmp ((const gchar *)child->name, "contactserver")) {
+ gchar *port, *host, *rootdn, *scope, *authmethod, *ssl;
+ gchar *emailaddr, *binddn, *limitstr;
+ gint limit;
+ gchar *name, *description;
GString *uri = g_string_new ("");
ESource *source;
@@ -711,7 +711,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
}
static ESource*
-get_source_by_name (ESourceList *source_list, const char *name)
+get_source_by_name (ESourceList *source_list, const gchar *name)
{
GSList *groups;
GSList *g;
@@ -731,7 +731,7 @@ get_source_by_name (ESourceList *source_list, const char *name)
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- const char *source_name = e_source_peek_name (source);
+ const gchar *source_name = e_source_peek_name (source);
if (!strcmp (name, source_name))
return source;
@@ -744,7 +744,7 @@ get_source_by_name (ESourceList *source_list, const char *name)
static gboolean
migrate_completion_folders (MigrationContext *context)
{
- char *uris_xml = gconf_client_get_string (addressbook_component_peek_gconf_client (context->component),
+ gchar *uris_xml = gconf_client_get_string (addressbook_component_peek_gconf_client (context->component),
"/apps/evolution/addressbook/completion/uris",
NULL);
@@ -761,14 +761,14 @@ migrate_completion_folders (MigrationContext *context)
dialog_set_folder_name (context, _("Autocompletion Settings"));
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp ((const char *)root->name, "EvolutionFolderList") != 0) {
+ if (root == NULL || strcmp ((const gchar *)root->name, "EvolutionFolderList") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
for (child = root->children; child; child = child->next) {
- if (!strcmp ((const char *)child->name, "folder")) {
- char *physical_uri = e_xml_get_string_prop_by_name (child, (const unsigned char *)"physical-uri");
+ if (!strcmp ((const gchar *)child->name, "folder")) {
+ gchar *physical_uri = e_xml_get_string_prop_by_name (child, (const guchar *)"physical-uri");
ESource *source = NULL;
/* if the physical uri is file://...
@@ -783,8 +783,8 @@ migrate_completion_folders (MigrationContext *context)
for the uri. */
if (!strncmp (physical_uri, "file://", 7)) {
- char *filename = g_filename_from_uri (physical_uri, NULL, NULL);
- char *uid = NULL;
+ gchar *filename = g_filename_from_uri (physical_uri, NULL, NULL);
+ gchar *uid = NULL;
if (filename)
uid = g_hash_table_lookup (context->folder_uid_map,
@@ -794,7 +794,7 @@ migrate_completion_folders (MigrationContext *context)
source = e_source_list_peek_source_by_uid (context->source_list, uid);
}
else {
- char *name = e_xml_get_string_prop_by_name (child, (const unsigned char *)"display-name");
+ gchar *name = e_xml_get_string_prop_by_name (child, (const guchar *)"display-name");
source = get_source_by_name (context->source_list, name);
@@ -833,14 +833,14 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup
EBook *book;
EBookQuery *query;
GList *l, *contacts;
- int num_contacts, num_converted;
+ gint num_contacts, num_converted;
dialog_set_folder_name (context, e_source_peek_name (source));
book = e_book_new (source, NULL);
if (!book
|| !e_book_open (book, TRUE, NULL)) {
- char *uri = e_source_get_uri (source);
+ gchar *uri = e_source_get_uri (source);
g_warning ("failed to migrate contact lists for source %s", uri);
g_free (uri);
continue;
@@ -864,8 +864,8 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup
GList *v = e_vcard_attribute_get_values (a);
if (v && v->data) {
- if (!strncmp ((char*)v->data, "<?xml", 5)) {
- EDestination *dest = e_destination_import ((char*)v->data);
+ if (!strncmp ((gchar *)v->data, "<?xml", 5)) {
+ EDestination *dest = e_destination_import ((gchar *)v->data);
e_destination_export_to_vcard_attribute (dest, a);
@@ -908,14 +908,14 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup
EBook *book;
EBookQuery *query;
GList *l, *contacts;
- int num_contacts, num_converted;
+ gint num_contacts, num_converted;
dialog_set_folder_name (context, e_source_peek_name (source));
book = e_book_new (source, NULL);
if (!book
|| !e_book_open (book, TRUE, NULL)) {
- char *uri = e_source_get_uri (source);
+ gchar *uri = e_source_get_uri (source);
g_warning ("failed to migrate company phone numbers for source %s", uri);
g_free (uri);
continue;
@@ -932,7 +932,7 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup
GError *e = NULL;
GList *attrs, *attr;
gboolean converted = FALSE;
- int num_work_voice = 0;
+ gint num_work_voice = 0;
attrs = e_vcard_get_attributes (E_VCARD (contact));
for (attr = attrs; attr;) {
@@ -1001,11 +1001,11 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup
}
static void
-migrate_pilot_data (const char *old_path, const char *new_path)
+migrate_pilot_data (const gchar *old_path, const gchar *new_path)
{
- const char *dent;
- const char *ext;
- char *filename;
+ const gchar *dent;
+ const gchar *ext;
+ gchar *filename;
GDir *dir;
if (!(dir = g_dir_open (old_path, 0, NULL)))
@@ -1017,9 +1017,9 @@ migrate_pilot_data (const char *old_path, const char *new_path)
(!strncmp (dent, "pilot-sync-evolution-addressbook-", 33) &&
((ext = strrchr (dent, '.')) && !strcmp (ext, ".db")))) {
/* src and dest file formats are identical for both map and changelog files */
- unsigned char inbuf[4096];
+ guchar inbuf[4096];
size_t nread, nwritten;
- int fd0, fd1;
+ gint fd0, fd1;
ssize_t n;
filename = g_build_filename (old_path, dent, NULL);
@@ -1103,8 +1103,8 @@ migration_context_free (MigrationContext *context)
g_free (context);
}
-int
-addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, GError **err)
+gint
+addressbook_migrate (AddressbookComponent *component, gint major, gint minor, gint revision, GError **err)
{
ESourceGroup *on_this_computer;
ESourceGroup *on_ldap_servers;
@@ -1165,7 +1165,7 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int
}
if (minor < 5 || (minor == 5 && revision <= 10)) {
- char *old_path, *new_path;
+ gchar *old_path, *new_path;
dialog_set_label (context, _("Evolution's Palm Sync changelog and map files have changed.\n\n"
"Please be patient while Evolution migrates your Pilot Sync data..."));
diff --git a/addressbook/gui/component/addressbook-migrate.h b/addressbook/gui/component/addressbook-migrate.h
index 5727b3d0ab..c10f29cfdd 100644
--- a/addressbook/gui/component/addressbook-migrate.h
+++ b/addressbook/gui/component/addressbook-migrate.h
@@ -28,6 +28,6 @@
struct _GError;
-int addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, struct _GError **err);
+gint addressbook_migrate (AddressbookComponent *component, gint major, gint minor, gint revision, struct _GError **err);
#endif /* _ADDRESSBOOK_MIGRATE_H_ */
diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c
index e6b99c6405..379660c993 100644
--- a/addressbook/gui/component/addressbook-view.c
+++ b/addressbook/gui/component/addressbook-view.c
@@ -83,7 +83,7 @@ struct _AddressbookViewPrivate {
EBook *book;
guint activity_id;
ESourceList *source_list;
- char *passwd;
+ gchar *passwd;
EUserCreatableItemsHandler *creatable_items_handler;
EABMenu *menu;
@@ -101,7 +101,7 @@ static GtkTargetEntry drag_types[] = {
};
static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
-static void set_status_message (EABView *eav, const char *message, AddressbookView *view);
+static void set_status_message (EABView *eav, const gchar *message, AddressbookView *view);
static void search_result (EABView *eav, EBookViewStatus status, AddressbookView *view);
static void activate_source (AddressbookView *view, ESource *source);
@@ -115,7 +115,7 @@ static ESource *get_primary_source (AddressbookView *view);
typedef struct {
GtkWidget *editor;
- char *uid;
+ gchar *uid;
AddressbookView *view;
} EditorUidClosure;
@@ -139,7 +139,7 @@ get_current_view (AddressbookView *view)
}
static void
-save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+save_all_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -149,7 +149,7 @@ save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+save_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -158,7 +158,7 @@ save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+view_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -167,7 +167,7 @@ view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+delete_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -176,7 +176,7 @@ delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-print_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+print_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -185,7 +185,7 @@ print_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+print_preview_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -194,7 +194,7 @@ print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+stop_loading_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -203,7 +203,7 @@ stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+cut_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -212,7 +212,7 @@ cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+copy_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -221,7 +221,7 @@ copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+paste_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -230,7 +230,7 @@ paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+select_all_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -239,7 +239,7 @@ select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *pat
}
static void
-send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+send_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -248,7 +248,7 @@ send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+send_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -257,7 +257,7 @@ send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+copy_all_contacts_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -267,7 +267,7 @@ copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa
}
static void
-copy_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+copy_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -276,7 +276,7 @@ copy_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+move_all_contacts_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -285,7 +285,7 @@ move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa
}
static void
-move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+move_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
@@ -294,7 +294,7 @@ move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-forget_passwords_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+forget_passwords_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
e_passwords_forget_passwords();
}
@@ -307,7 +307,7 @@ new_addressbook_folder (AddressbookView *view)
}
static void
-new_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+new_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
new_addressbook_folder (view);
@@ -356,7 +356,7 @@ delete_addressbook_folder (AddressbookView *view)
}
static void
-delete_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+delete_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
if (view)
@@ -369,7 +369,7 @@ edit_addressbook_folder (AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
ESource *selected_source;
- const char *uid;
+ const gchar *uid;
EditorUidClosure *closure;
selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
@@ -380,7 +380,7 @@ edit_addressbook_folder (AddressbookView *view)
closure = g_hash_table_lookup (priv->uid_to_editor, uid);
if (!closure) {
- char *uid_copy = g_strdup (uid);
+ gchar *uid_copy = g_strdup (uid);
closure = g_new (EditorUidClosure, 1);
closure->editor = addressbook_config_edit_source (gtk_widget_get_toplevel(priv->notebook), selected_source);
@@ -400,7 +400,7 @@ edit_addressbook_folder (AddressbookView *view)
}
static void
-edit_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+edit_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
if (view)
@@ -413,8 +413,8 @@ rename_addressbook_folder (AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
ESource *source;
- const char *old_name;
- char *prompt, *new_name;
+ const gchar *old_name;
+ gchar *prompt, *new_name;
gboolean done = FALSE;
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
@@ -441,7 +441,7 @@ rename_addressbook_folder (AddressbookView *view)
}
static void
-rename_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path)
+rename_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path)
{
AddressbookView *view = (AddressbookView *) user_data;
if (view)
@@ -453,7 +453,7 @@ folder_can_delete (AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
ESource *source ;
- const char *source_uri;
+ const gchar *source_uri;
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
if(source) {
@@ -468,7 +468,7 @@ folder_can_delete (AddressbookView *view)
}
static void
-set_status_message (EABView *eav, const char *message, AddressbookView *view)
+set_status_message (EABView *eav, const gchar *message, AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
EActivityHandler *activity_handler = priv->activity_handler;
@@ -479,7 +479,7 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view)
priv->activity_id = 0;
}
} else if (priv->activity_id == 0) {
- char *clientid = g_strdup_printf ("%p", (gpointer) view);
+ gchar *clientid = g_strdup_printf ("%p", (gpointer) view);
priv->activity_id = e_activity_handler_operation_started (
activity_handler, clientid, message, TRUE);
@@ -492,7 +492,7 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view)
}
static void
-set_folder_bar_message (EABView *eav, const char *message, AddressbookView *view)
+set_folder_bar_message (EABView *eav, const gchar *message, AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
EABView *current_view = get_current_view (view);
@@ -501,7 +501,7 @@ set_folder_bar_message (EABView *eav, const char *message, AddressbookView *view
ESource *source = eav->source;
if (source) {
- const char *name = e_source_peek_name (source);
+ const gchar *name = e_source_peek_name (source);
e_info_label_set_info((EInfoLabel*)priv->info_widget, name, message);
}
@@ -628,7 +628,7 @@ control_activate (BonoboControl *control,
AddressbookViewPrivate *priv = view->priv;
Bonobo_UIContainer remote_ui_container;
EABView *v = get_current_view (view);
- char *xmlfile;
+ gchar *xmlfile;
remote_ui_container = bonobo_control_get_remote_ui_container (control, NULL);
bonobo_ui_component_set_container (uic, remote_ui_container, NULL);
@@ -684,7 +684,7 @@ control_activate_cb (BonoboControl *control,
}
static void
-gather_uids_foreach (char *key,
+gather_uids_foreach (gchar *key,
gpointer value,
GList **list)
{
@@ -701,7 +701,7 @@ source_list_changed_cb (ESourceList *source_list, AddressbookView *view)
uids = NULL;
g_hash_table_foreach (priv->uid_to_view, (GHFunc)gather_uids_foreach, &uids);
for (l = uids; l; l = l->next) {
- char *uid = l->data;
+ gchar *uid = l->data;
if (e_source_list_peek_source_by_uid (source_list, uid)) {
/* the source still exists, do nothing */
}
@@ -721,7 +721,7 @@ source_list_changed_cb (ESourceList *source_list, AddressbookView *view)
uids = NULL;
g_hash_table_foreach (priv->uid_to_editor, (GHFunc)gather_uids_foreach, &uids);
for (l = uids; l; l = l->next) {
- char *uid = l->data;
+ gchar *uid = l->data;
if (e_source_list_peek_source_by_uid (source_list, uid)) {
/* the source still exists, do nothing */
}
@@ -801,7 +801,7 @@ get_primary_source (AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
ESource *source;
- char *uid;
+ gchar *uid;
uid = gconf_client_get_string (priv->gconf_client,
"/apps/evolution/addressbook/display/primary_addressbook",
@@ -867,7 +867,7 @@ book_removed (EBook *book, EBookStatus status, gpointer data)
}
static void
-delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
+delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data)
{
AddressbookView *view = data;
AddressbookViewPrivate *priv = view->priv;
@@ -903,13 +903,13 @@ delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-new_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
+new_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data)
{
addressbook_config_create_new_source (gtk_widget_get_toplevel(ep->target->widget));
}
static void
-rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, void *data)
+rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, gpointer data)
{
AddressbookView *view = data;
ESourceSelector *selector;
@@ -919,7 +919,7 @@ rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
+save_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data)
{
AddressbookView *view = data;
EABView *v = get_current_view (view);
@@ -928,7 +928,7 @@ save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-edit_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
+edit_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data)
{
AddressbookView *view = data;
if (view)
@@ -958,7 +958,7 @@ static EPopupItem abv_source_popups[] = {
};
static void
-abv_source_popup_free(EPopup *ep, GSList *list, void *data)
+abv_source_popup_free(EPopup *ep, GSList *list, gpointer data)
{
g_slist_free(list);
}
@@ -969,7 +969,7 @@ popup_event_callback(ESourceSelector *selector, ESource *source, GdkEventButton
EABPopup *ep;
EABPopupTargetSource *t;
GSList *menus = NULL;
- int i;
+ gint i;
GtkMenu *menu;
/** @HookPoint-EABPopup:Addressbook Source Selector Context Menu
@@ -1035,7 +1035,7 @@ removed_contact_cb (EBook *book, EBookStatus status, gpointer closure)
}
static void
-merged_contact_cb (EBook *book, EBookStatus status, const char *id, gpointer closure)
+merged_contact_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
{
MergeContext *merge_context = closure;
@@ -1088,7 +1088,7 @@ selector_tree_data_dropped (ESourceSelector *selector,
}
e_book_open (target_book, FALSE, NULL);
- eab_book_and_contact_list_from_string ((char *)data->data, &source_book, &contactlist);
+ eab_book_and_contact_list_from_string ((gchar *)data->data, &source_book, &contactlist);
v = get_current_view (view);
g_object_get (v->model, "book",&source_book, NULL);
@@ -1252,7 +1252,7 @@ addressbook_view_init (AddressbookView *view)
}
static void
-destroy_editor (char *key,
+destroy_editor (gchar *key,
gpointer value,
gpointer nada)
{
@@ -1342,7 +1342,7 @@ activate_source (AddressbookView *view,
ESource *source)
{
AddressbookViewPrivate *priv = view->priv;
- const char *uid;
+ const gchar *uid;
GtkWidget *uid_view;
EBook *book;
BookOpenData *data;
@@ -1496,8 +1496,8 @@ addressbook_view_peek_folder_view (AddressbookView *view)
void
addressbook_view_edit_contact (AddressbookView* view,
- const char* source_uid,
- const char* contact_uid)
+ const gchar * source_uid,
+ const gchar * contact_uid)
{
AddressbookViewPrivate *priv = view->priv;
diff --git a/addressbook/gui/component/addressbook-view.h b/addressbook/gui/component/addressbook-view.h
index 08bbbb3e99..bdb37e021a 100644
--- a/addressbook/gui/component/addressbook-view.h
+++ b/addressbook/gui/component/addressbook-view.h
@@ -59,7 +59,7 @@ GtkWidget *addressbook_view_peek_statusbar (AddressbookView *view
BonoboControl *addressbook_view_peek_folder_view (AddressbookView *view);
void addressbook_view_edit_contact (AddressbookView* view,
- const char* source_id,
- const char* contact_id);
+ const gchar * source_id,
+ const gchar * contact_id);
#endif /* _ADDRESSBOOK_VIEW_H_ */
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index f36012ab94..45790e15c0 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -57,10 +57,10 @@ free_load_source_data (LoadSourceData *data)
/*this function removes of anything present after semicolon
in uri*/
-static gchar*
+static gchar *
remove_parameters_from_uri (const gchar *uri)
{
- char *euri_str;
+ gchar *euri_str;
EUri *euri;
euri = e_uri_new (uri);
@@ -167,8 +167,8 @@ static void
addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *source,
EBookCallback cb, gpointer closure)
{
- const char *password = NULL;
- char *pass_dup = NULL;
+ const gchar *password = NULL;
+ gchar *pass_dup = NULL;
const gchar *auth;
const gchar *user;
gchar *uri = remove_parameters_from_uri(e_book_get_uri (book));
@@ -197,8 +197,8 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
user = "";
if (!password) {
- char *prompt;
- char *password_prompt;
+ gchar *prompt;
+ gchar *password_prompt;
gboolean remember;
const gchar *failed_auth;
guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE;
diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c
index f45f2228e1..9773f5bd5b 100644
--- a/addressbook/gui/component/autocompletion-config.c
+++ b/addressbook/gui/component/autocompletion-config.c
@@ -80,7 +80,7 @@ source_selection_changed (ESourceSelector *selector,
}
static void
-config_control_destroy_notify (void *data,
+config_control_destroy_notify (gpointer data,
GObject *where_the_config_control_was)
{
AutocompletionConfig *ac = (AutocompletionConfig *) data;
@@ -101,7 +101,7 @@ initialize_selection (AutocompletionConfig *ac)
GSList *sources;
for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
ESource *source = E_SOURCE (sources->data);
- const char *completion = e_source_get_property (source, "completion");
+ const gchar *completion = e_source_get_property (source, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true"))
e_source_selector_select_source (E_SOURCE_SELECTOR (ac->control_widget),
source);
diff --git a/addressbook/gui/component/component-factory.c b/addressbook/gui/component/component-factory.c
index 4d02cc3e6b..eddabd7b48 100644
--- a/addressbook/gui/component/component-factory.c
+++ b/addressbook/gui/component/component-factory.c
@@ -49,8 +49,8 @@
static BonoboObject *
factory (BonoboGenericFactory *factory,
- const char *component_id,
- void *closure)
+ const gchar *component_id,
+ gpointer closure)
{
d(printf ("asked to activate component_id `%s'\n", component_id));
diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h
index 010589da1e..083fc0d162 100644
--- a/addressbook/gui/component/openldap-extract.h
+++ b/addressbook/gui/component/openldap-extract.h
@@ -48,7 +48,7 @@
#define LDAP_CALLOC(n,s) calloc((n),(s))
#define LDAP_REALLOC(p,s) realloc((p),(s))
#define LDAP_FREE(p) free((p))
-#define LDAP_VFREE(p) vfree((void **)(p))
+#define LDAP_VFREE(p) vfree((gpointer *)(p))
#define LDAP_STRDUP(s) strdup((s))
#define LDAP_RANGE(n,x,y) (((x) <= (n)) && ((n) <= (y)))
@@ -87,21 +87,21 @@
#define LDAP_SCHEMA_SKIP 0x80U /* Don't malloc any result */
typedef struct ldap_objectclass {
- char *oc_oid; /* REQUIRED */
- char **oc_names; /* OPTIONAL */
- char *oc_desc; /* OPTIONAL */
- int oc_obsolete; /* 0=no, 1=yes */
- char **oc_sup_oids; /* OPTIONAL */
- int oc_kind; /* 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY */
- char **oc_at_oids_must; /* OPTIONAL */
- char **oc_at_oids_may; /* OPTIONAL */
+ gchar *oc_oid; /* REQUIRED */
+ gchar **oc_names; /* OPTIONAL */
+ gchar *oc_desc; /* OPTIONAL */
+ gint oc_obsolete; /* 0=no, 1=yes */
+ gchar **oc_sup_oids; /* OPTIONAL */
+ gint oc_kind; /* 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY */
+ gchar **oc_at_oids_must; /* OPTIONAL */
+ gchar **oc_at_oids_may; /* OPTIONAL */
} LDAPObjectClass;
static void
-vfree(void **vec)
+vfree(gpointer *vec)
{
- int i;
+ gint i;
for (i = 0; vec[i] != NULL; i++)
free(vec[i]);
@@ -143,17 +143,17 @@ vfree(void **vec)
#define TK_QDESCR TK_QDSTRING
struct token {
- int type;
- char *sval;
+ gint type;
+ gchar *sval;
};
static int
-get_token( const char ** sp, char ** token_val )
+get_token( const gchar ** sp, gchar ** token_val )
{
- int kind;
- const char * p;
- const char * q;
- char * res;
+ gint kind;
+ const gchar * p;
+ const gchar * q;
+ gchar * res;
*token_val = NULL;
switch (**sp) {
@@ -223,20 +223,20 @@ get_token( const char ** sp, char ** token_val )
/* Gobble optional whitespace */
static void
-parse_whsp(const char **sp)
+parse_whsp(const gchar **sp)
{
while (LDAP_SPACE(**sp))
(*sp)++;
}
/* Parse a sequence of dot-separated decimal strings */
-static char *
-ldap_int_parse_numericoid(const char **sp, int *code, const int flags)
+static gchar *
+ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
{
- char * res = NULL;
- const char * start = *sp;
- int len;
- int quoted = 0;
+ gchar * res = NULL;
+ const gchar * start = *sp;
+ gint len;
+ gint quoted = 0;
/* Netscape puts the SYNTAX value in quotes (incorrectly) */
if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && **sp == '\'' ) {
@@ -248,7 +248,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags)
while (**sp) {
if ( !LDAP_DIGIT(**sp) ) {
/*
- * Initial char is not a digit or char after dot is
+ * Initial gchar is not a digit or gchar after dot is
* not a digit
*/
*code = LDAP_SCHERR_NODIGIT;
@@ -262,7 +262,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags)
/* Otherwise, gobble the dot and loop again */
(*sp)++;
}
- /* Now *sp points at the char past the numericoid. Perfect. */
+ /* Now *sp points at the gchar past the numericoid. Perfect. */
len = *sp - start;
if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && quoted ) {
if ( **sp == '\'' ) {
@@ -273,7 +273,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags)
}
}
if (flags & LDAP_SCHEMA_SKIP) {
- res = (char *)start;
+ res = (gchar *)start;
} else {
res = LDAP_MALLOC(len+1);
if (!res) {
@@ -287,22 +287,22 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags)
}
/* Parse a qdescr or a list of them enclosed in () */
-static char **
-parse_qdescrs(const char **sp, int *code)
+static gchar **
+parse_qdescrs(const gchar **sp, gint *code)
{
- char ** res;
- char ** res1;
- int kind;
- char * sval;
- int size;
- int pos;
+ gchar ** res;
+ gchar ** res1;
+ gint kind;
+ gchar * sval;
+ gint size;
+ gint pos;
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(char *));
+ res = LDAP_CALLOC(3,sizeof(gchar *));
if ( !res ) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
@@ -316,7 +316,7 @@ parse_qdescrs(const char **sp, int *code)
if ( kind == TK_QDESCR ) {
if ( pos == size-2 ) {
size++;
- res1 = LDAP_REALLOC(res,size*sizeof(char *));
+ res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
if ( !res1 ) {
LDAP_VFREE(res);
LDAP_FREE(sval);
@@ -338,7 +338,7 @@ parse_qdescrs(const char **sp, int *code)
parse_whsp(sp);
return(res);
} else if ( kind == TK_QDESCR ) {
- res = LDAP_CALLOC(2,sizeof(char *));
+ res = LDAP_CALLOC(2,sizeof(gchar *));
if ( !res ) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
@@ -355,15 +355,15 @@ parse_qdescrs(const char **sp, int *code)
}
/* Parse a woid or a $-separated list of them enclosed in () */
-static char **
-parse_oids(const char **sp, int *code, const int allow_quoted)
+static gchar **
+parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
{
- char ** res;
- char ** res1;
- int kind;
- char * sval;
- int size;
- int pos;
+ gchar ** res;
+ gchar ** res1;
+ gint kind;
+ gchar * sval;
+ gint size;
+ gint pos;
/*
* Strictly speaking, doing this here accepts whsp before the
@@ -376,7 +376,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
if ( kind == TK_LEFTPAREN ) {
/* Let's presume there will be at least 2 entries */
size = 3;
- res = LDAP_CALLOC(3,sizeof(char *));
+ res = LDAP_CALLOC(3,sizeof(gchar *));
if ( !res ) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
@@ -407,7 +407,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
kind == TK_QDSTRING ) ) {
if ( pos == size-2 ) {
size++;
- res1 = LDAP_REALLOC(res,size*sizeof(char *));
+ res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
if ( !res1 ) {
LDAP_FREE(sval);
LDAP_VFREE(res);
@@ -436,7 +436,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
return(res);
} else if ( kind == TK_BAREWORD ||
( allow_quoted && kind == TK_QDSTRING ) ) {
- res = LDAP_CALLOC(2,sizeof(char *));
+ res = LDAP_CALLOC(2,sizeof(gchar *));
if ( !res ) {
LDAP_FREE(sval);
*code = LDAP_SCHERR_OUTOFMEM;
@@ -466,24 +466,24 @@ ldap_objectclass_free(LDAPObjectClass * oc)
}
static LDAPObjectClass *
-ldap_str2objectclass( LDAP_CONST char * s,
- int * code,
- LDAP_CONST char ** errp,
+ldap_str2objectclass( LDAP_CONST gchar * s,
+ gint * code,
+ LDAP_CONST gchar ** errp,
LDAP_CONST unsigned flags )
{
- int kind;
- const char * ss = s;
- char * sval;
- int seen_name = 0;
- int seen_desc = 0;
- int seen_obsolete = 0;
- int seen_sup = 0;
- int seen_kind = 0;
- int seen_must = 0;
- int seen_may = 0;
+ gint kind;
+ const gchar * ss = s;
+ gchar * sval;
+ gint seen_name = 0;
+ gint seen_desc = 0;
+ gint seen_obsolete = 0;
+ gint seen_sup = 0;
+ gint seen_kind = 0;
+ gint seen_must = 0;
+ gint seen_may = 0;
LDAPObjectClass * oc;
- char ** ext_vals;
- const char * savepos;
+ gchar ** ext_vals;
+ const gchar * savepos;
if ( !s ) {
*code = LDAP_SCHERR_EMPTY;
@@ -539,7 +539,7 @@ ldap_str2objectclass( LDAP_CONST char * s,
} else if ( flags &
LDAP_SCHEMA_ALLOW_OID_MACRO ) {
/* Non-numerical OID, ignore */
- int len = ss-savepos;
+ gint len = ss-savepos;
oc->oc_oid = LDAP_MALLOC(len+1);
strncpy(oc->oc_oid, savepos, len);
oc->oc_oid[len] = 0;
@@ -741,21 +741,21 @@ ldap_str2objectclass( LDAP_CONST char * s,
#define LDAP_UTF8_INCR(p) ((p)=LDAP_UTF8_NEXT((p)))
#define ldap_x_utf8_to_ucs4(str) g_utf8_get_char(str)
-static char *ldap_utf8_strchr( const char *str, const char *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 ) ) {
- return (char *) str;
+ return (gchar *) str;
}
}
return NULL;
}
-static size_t ldap_utf8_strcspn( const char *str, const char *set )
+static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set )
{
- const char *cstr;
- const char *cset;
+ const gchar *cstr;
+ const gchar *cset;
for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) {
@@ -768,10 +768,10 @@ static size_t ldap_utf8_strcspn( const char *str, const char *set )
return cstr - str;
}
-static size_t ldap_utf8_strspn( const char *str, const char *set )
+static size_t ldap_utf8_strspn( const gchar *str, const gchar *set )
{
- const char *cstr;
- const char *cset;
+ const gchar *cstr;
+ const gchar *cset;
for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
for( cset = set; ; LDAP_UTF8_INCR(cset) ) {
@@ -788,10 +788,10 @@ static size_t ldap_utf8_strspn( const char *str, const char *set )
return cstr - str;
}
-static char *ldap_utf8_strtok(char *str, const char *sep, char **last)
+static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
{
- char *begin;
- char *end;
+ gchar *begin;
+ gchar *end;
if( last == NULL ) return NULL;
@@ -807,7 +807,7 @@ static char *ldap_utf8_strtok(char *str, const char *sep, char **last)
end = &begin[ ldap_utf8_strcspn( begin, sep ) ];
if( *end != '\0' ) {
- char *next = LDAP_UTF8_NEXT( end );
+ gchar *next = LDAP_UTF8_NEXT( end );
*end = '\0';
end = next;
}
@@ -856,17 +856,17 @@ typedef struct ldap_url_desc {
/* from url.c */
-static const char*
+static const gchar *
skip_url_prefix(
- const char *url,
- int *enclosedp,
- const char **scheme )
+ const gchar *url,
+ gint *enclosedp,
+ const gchar **scheme )
{
/*
* return non-zero if this looks like a LDAP URL; zero if not
* if non-zero returned, *urlp will be moved past "ldap://" part of URL
*/
- const char *p;
+ const gchar *p;
if ( url == NULL ) {
return( NULL );
@@ -924,7 +924,7 @@ skip_url_prefix(
return( NULL );
}
-static int str2scope( const char *p )
+static gint str2scope( const gchar *p )
{
if ( strcasecmp( p, "one" ) == 0 ) {
return LDAP_SCOPE_ONELEVEL;
@@ -980,7 +980,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp )
}
static int
-ldap_int_unhex( int c )
+ldap_int_unhex( gint c )
{
return( c >= '0' && c <= '9' ? c - '0'
: c >= 'A' && c <= 'F' ? c - 'A' + 10
@@ -988,7 +988,7 @@ ldap_int_unhex( int c )
}
static void
-ldap_pvt_hex_unescape( char *s )
+ldap_pvt_hex_unescape( gchar *s )
{
/*
* Remove URL hex escapes from s... done in place. The basic concept for
@@ -1014,8 +1014,8 @@ ldap_pvt_hex_unescape( char *s )
*p = '\0';
}
-static char **
-ldap_str2charray( const char *str_in, const char *brkstr )
+static gchar **
+ldap_str2charray( const gchar *str_in, const gchar *brkstr )
{
char **res;
char *str, *s;
@@ -1035,7 +1035,7 @@ ldap_str2charray( const char *str_in, const char *brkstr )
}
}
- res = (char **) LDAP_MALLOC( (i + 1) * sizeof(char *) );
+ res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) );
if( res == NULL ) {
LDAP_FREE( str );
@@ -1069,7 +1069,7 @@ ldap_str2charray( const char *str_in, const char *brkstr )
}
static int
-ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
/*
* Pick apart the pieces of an LDAP URL.
@@ -1078,9 +1078,9 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
LDAPURLDesc *ludp;
char *p, *q, *r;
int i, enclosed;
- const char *scheme = NULL;
- const char *url_tmp;
- char *url;
+ const gchar *scheme = NULL;
+ const gchar *url_tmp;
+ gchar *url;
if( url_in == NULL || ludpp == NULL ) {
return LDAP_URL_ERR_PARAM;
@@ -1393,9 +1393,9 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
}
static int
-ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
- int rc = ldap_url_parse_ext( url_in, ludpp );
+ gint rc = ldap_url_parse_ext( url_in, ludpp );
if( rc != LDAP_URL_SUCCESS ) {
return rc;