From: Sébastien Guillet Date: Sun, 13 Jan 2013 11:49:10 +0000 (+0100) Subject: vcard export: ADR field's components now respect the order X-Git-Tag: upstream/0.6.1~2^2~26 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=2b6493a629d94386ed6e07b5c71482c66d3be4fe;p=pkg%2Fabook.git vcard export: ADR field's components now respect the order defined by the rfc6350 section-6.3.1. --- diff --git a/filter.c b/filter.c index a22a0c7..4d1abd8 100644 --- a/filter.c +++ b/filter.c @@ -2027,15 +2027,18 @@ vcard_export_item(FILE *out, int item) free(name); - if(db_fget(item, ADDRESS)) - fprintf(out, "ADR:;;%s;%s;%s;%s;%s;%s\r\n", - safe_str(db_fget(item, ADDRESS)), - safe_str(db_fget(item, ADDRESS2)), - safe_str(db_fget(item, CITY)), - safe_str(db_fget(item, STATE)), - safe_str(db_fget(item, ZIP)), - safe_str(db_fget(item, COUNTRY)) - ); + // see rfc6350 section 6.3.1 + if(db_fget(item, ADDRESS)) { + fprintf(out, "ADR:;%s;%s;%s;%s;%s;%s\r\n", + // pobox (unsupported) + safe_str(db_fget(item, ADDRESS2)), // ext (n°, ...) + safe_str(db_fget(item, ADDRESS)), // street + safe_str(db_fget(item, CITY)), // locality + safe_str(db_fget(item, STATE)), // region + safe_str(db_fget(item, ZIP)), // code (postal) + safe_str(db_fget(item, COUNTRY)) // country + ); + } if(db_fget(item, PHONE)) fprintf(out, "TEL;HOME:%s\r\n",