aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/importers/evolution-vcard-importer.c
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/importers/evolution-vcard-importer.c
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/importers/evolution-vcard-importer.c')
-rw-r--r--addressbook/importers/evolution-vcard-importer.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 1ec623d098..169c6413d1 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -51,9 +51,9 @@ typedef struct {
guint idle_id;
- int state; /* 0 - importing, 1 - cancelled/complete */
- int total;
- int count;
+ gint state; /* 0 - importing, 1 - cancelled/complete */
+ gint total;
+ gint count;
ESource *primary;
@@ -115,8 +115,8 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
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);
@@ -155,9 +155,9 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
vs = e_vcard_attribute_param_get_values (p);
for (v = vs; v; v = v->next) {
- if (!g_ascii_strcasecmp ((char*)v->data, "WORK") ||
- !g_ascii_strcasecmp ((char*)v->data, "HOME") ||
- !g_ascii_strcasecmp ((char*)v->data, "OTHER"))
+ if (!g_ascii_strcasecmp ((gchar *)v->data, "WORK") ||
+ !g_ascii_strcasecmp ((gchar *)v->data, "HOME") ||
+ !g_ascii_strcasecmp ((gchar *)v->data, "OTHER"))
no_location = FALSE;
else
location_only = FALSE;
@@ -204,8 +204,8 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
vs = e_vcard_attribute_param_get_values (p);
for (v = vs; v; v = v->next) {
- if (!g_ascii_strcasecmp ((char*)v->data, "WORK") ||
- !g_ascii_strcasecmp ((char*)v->data, "HOME"))
+ if (!g_ascii_strcasecmp ((gchar *)v->data, "WORK") ||
+ !g_ascii_strcasecmp ((gchar *)v->data, "HOME"))
no_location = FALSE;
}
}
@@ -228,10 +228,10 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
}
static gboolean
-vcard_import_contacts(void *data)
+vcard_import_contacts(gpointer data)
{
VCardImporter *gci = data;
- int count = 0;
+ gint count = 0;
GList *iterator = gci->iterator;
if (gci->state == 0) {
@@ -319,11 +319,11 @@ typedef enum _VCardEncoding VCardEncoding;
/* Actually check the contents of this file */
static VCardEncoding
-guess_vcard_encoding (const char *filename)
+guess_vcard_encoding (const gchar *filename)
{
FILE *handle;
- char line[4096];
- char *line_utf8;
+ gchar line[4096];
+ gchar *line_utf8;
VCardEncoding encoding = VCARD_ENCODING_NONE;
handle = g_fopen (filename, "r");
@@ -455,7 +455,7 @@ static void
vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
VCardImporter *gci;
- char *contents;
+ gchar *contents;
VCardEncoding encoding;
EBook *book;
EImportTargetURI *s = (EImportTargetURI *)target;