diff options
Diffstat (limited to 'addressbook/util')
-rw-r--r-- | addressbook/util/addressbook.c | 12 | ||||
-rw-r--r-- | addressbook/util/eab-book-util.c | 54 | ||||
-rw-r--r-- | addressbook/util/eab-book-util.h | 18 |
3 files changed, 42 insertions, 42 deletions
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c index f36012ab94..45790e15c0 100644 --- a/addressbook/util/addressbook.c +++ b/addressbook/util/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/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 8d08a3e88f..ec8fccb5ba 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -46,11 +46,11 @@ eab_get_config_database (void) * */ -static char* -escape (const char *str) +static gchar * +escape (const gchar *str) { GString *s = g_string_new (NULL); - const char *p = str; + const gchar *p = str; while (*p) { if (*p == '\\') @@ -76,7 +76,7 @@ eab_name_and_email_query (EBook *book, gchar *email_query=NULL, *name_query=NULL; EBookQuery *query; guint tag; - char *escaped_name, *escaped_email; + gchar *escaped_name, *escaped_email; g_return_val_if_fail (book && E_IS_BOOK (book), 0); g_return_val_if_fail (cb != NULL, 0); @@ -118,7 +118,7 @@ eab_name_and_email_query (EBook *book, /* Assemble our e-mail & name queries */ if (email_query && name_query) { - char *full_query = g_strdup_printf ("(and %s %s)", email_query, name_query); + gchar *full_query = g_strdup_printf ("(and %s %s)", email_query, name_query); query = e_book_query_from_string (full_query); g_free (full_query); } @@ -147,12 +147,12 @@ eab_name_and_email_query (EBook *book, */ guint eab_nickname_query (EBook *book, - const char *nickname, + const gchar *nickname, EBookListCallback cb, gpointer closure) { EBookQuery *query; - char *query_string; + gchar *query_string; guint retval; g_return_val_if_fail (E_IS_BOOK (book), 0); @@ -175,11 +175,11 @@ eab_nickname_query (EBook *book, } /* Copied from camel_strstrcase */ -static char * -eab_strstrcase (const char *haystack, const char *needle) +static gchar * +eab_strstrcase (const gchar *haystack, const gchar *needle) { /* find the needle in the haystack neglecting case */ - const char *ptr; + const gchar *ptr; guint len; g_return_val_if_fail (haystack != NULL, NULL); @@ -190,24 +190,24 @@ eab_strstrcase (const char *haystack, const char *needle) return NULL; if (len == 0) - return (char *) haystack; + return (gchar *) haystack; for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++) if (!g_ascii_strncasecmp (ptr, needle, len)) - return (char *) ptr; + return (gchar *) ptr; return NULL; } GList* -eab_contact_list_from_string (const char *str) +eab_contact_list_from_string (const gchar *str) { GList *contacts = NULL; GString *gstr = g_string_new (NULL); - char *str_stripped; - char *p = (char*)str; - char *q; + gchar *str_stripped; + gchar *p = (gchar *)str; + gchar *q; if (!p) return NULL; @@ -270,7 +270,7 @@ eab_contact_list_from_string (const char *str) return contacts; } -char* +gchar * eab_contact_list_to_string (GList *contacts) { GString *str = g_string_new (""); @@ -278,7 +278,7 @@ eab_contact_list_to_string (GList *contacts) for (l = contacts; l; l = l->next) { EContact *contact = l->data; - char *vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); + gchar *vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); g_string_append (str, vcard_str); if (l->next) @@ -289,10 +289,10 @@ eab_contact_list_to_string (GList *contacts) } gboolean -eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **contacts) +eab_book_and_contact_list_from_string (const gchar *str, EBook **book, GList **contacts) { - const char *s0, *s1; - char *uri; + const gchar *s0, *s1; + gchar *uri; g_return_val_if_fail (str != NULL, FALSE); g_return_val_if_fail (book != NULL, FALSE); @@ -323,10 +323,10 @@ eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **co return *book ? TRUE : FALSE; } -char * +gchar * eab_book_and_contact_list_to_string (EBook *book, GList *contacts) { - char *s0, *s1; + gchar *s0, *s1; s0 = eab_contact_list_to_string (contacts); if (!s0) @@ -406,12 +406,12 @@ eab_query_address_default (const gchar *email, #endif /* bad place for this i know. */ -int -e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len) +gint +e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len) { gchar *s1 = g_utf8_casefold(str1, len); gchar *s2 = g_utf8_casefold(str2, len); - int rv; + gint rv; rv = g_utf8_collate (s1, s2); @@ -421,7 +421,7 @@ e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len) return rv; } -int +gint e_utf8_casefold_collate (const gchar *str1, const gchar *str2) { return e_utf8_casefold_collate_len (str1, str2, -1); diff --git a/addressbook/util/eab-book-util.h b/addressbook/util/eab-book-util.h index cb59dc9085..a06ef43929 100644 --- a/addressbook/util/eab-book-util.h +++ b/addressbook/util/eab-book-util.h @@ -36,20 +36,20 @@ EConfigListener *eab_get_config_database (void); /* Specialized Name/Email Queries */ guint eab_name_and_email_query (EBook *book, - const char *name, - const char *email, + const gchar *name, + const gchar *email, EBookListCallback cb, gpointer closure); guint eab_nickname_query (EBook *book, - const char *nickname, + const gchar *nickname, EBookListCallback cb, gpointer closure); -GList *eab_contact_list_from_string (const char *str); -char *eab_contact_list_to_string (GList *contacts); +GList *eab_contact_list_from_string (const gchar *str); +gchar *eab_contact_list_to_string (GList *contacts); -gboolean eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **contacts); -char *eab_book_and_contact_list_to_string (EBook *book, GList *contacts); +gboolean eab_book_and_contact_list_from_string (const gchar *str, EBook **book, GList **contacts); +gchar *eab_book_and_contact_list_to_string (EBook *book, GList *contacts); /* Returns the EContact associated to email in the callback, or NULL if no match is found in the default address book. */ @@ -57,8 +57,8 @@ void eab_query_address_default (const gchar * EABHaveAddressCallback cb, gpointer closure); -int e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len); -int e_utf8_casefold_collate (const gchar *str1, const gchar *str2); +gint e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len); +gint e_utf8_casefold_collate (const gchar *str1, const gchar *str2); G_END_DECLS |