From: Tollef Fog Heen Date: Tue, 16 Oct 2007 20:13:45 +0000 (+0200) Subject: Fix up printing of multivalue fields. X-Git-Tag: 0.1~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62f9b66e2190a834d81edad5443ab84bcd53e2cb;p=eweouz Fix up printing of multivalue fields. --- diff --git a/src/dump-addressbook.c b/src/dump-addressbook.c index f30f506..b92f05e 100644 --- a/src/dump-addressbook.c +++ b/src/dump-addressbook.c @@ -28,11 +28,6 @@ void dump_as_vcard(EContact *contact, int dump_all) continue; } - if (strcmp(attr_name, "N") == 0 || - strcmp(attr_name, "ADR") == 0) { - continue; - } - if (e_vcard_attribute_is_single_valued(attr)) { char *av = e_vcard_attribute_get_value(attr); printf("%s: %s\n", @@ -42,11 +37,9 @@ void dump_as_vcard(EContact *contact, int dump_all) GList *vals = e_vcard_attribute_get_values(attr); for (j = 0; j < g_list_length(vals); j++) { - const char *av = (char*) g_list_nth(vals, j); + const char *av = *(char**) g_list_nth(vals, j); - printf("%s: %s\n", - attr_name, - av); + printf("%s: %s\n", attr_name, av); } } }