]> err.no Git - eweouz/commitdiff
Fix up printing of multivalue fields.
authorTollef Fog Heen <tfheen@err.no>
Tue, 16 Oct 2007 20:13:45 +0000 (22:13 +0200)
committerTollef Fog Heen <tfheen@err.no>
Tue, 16 Oct 2007 20:13:45 +0000 (22:13 +0200)
src/dump-addressbook.c

index f30f5060d091dc972702eb23048ede00e51f477d..b92f05ed6238c9af21961bba1a4ed584b6212aa9 100644 (file)
@@ -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);
                        }
                }
        }