{"Name", "name", TAB_CONTACT},/* NAME */
{"E-mails", "email", TAB_CONTACT},/* EMAIL */
{"Address", "address", TAB_ADDRESS},/* ADDRESS */
+ {"Address2", "address2", TAB_ADDRESS},/* ADDRESS2 */
{"City", "city", TAB_ADDRESS},/* CITY */
{"State/Province","state", TAB_ADDRESS},/* STATE */
{"ZIP/Postal Code","zip", TAB_ADDRESS},/* ZIP */
static void ldif_fix_string(char *str);
-#define LDIF_ITEM_FIELDS 15
+#define LDIF_ITEM_FIELDS 16
typedef char* ldif_item[LDIF_ITEM_FIELDS];
"cn",
"mail",
"streetaddress",
+ "streetaddress2",
"locality",
"st",
"postalcode",
NAME, /* "cn" */
EMAIL, /* "mail" */
ADDRESS, /* "streetaddress" */
+ ADDRESS2, /* "streetaddress2" */
CITY, /* "locality" */
STATE, /* "st" */
ZIP, /* "postalcode" */
free(name);
if ( database[e.item][ADDRESS] )
- fprintf(out, "ADR:;;%s;%s;%s;%s;%s\n",
+ fprintf(out, "ADR:;;%s;%s;%s;%s;%s;%s\n",
safe_str(database[e.item][ADDRESS]),
+ safe_str(database[e.item][ADDRESS2]),
safe_str(database[e.item][CITY]),
safe_str(database[e.item][STATE]),
safe_str(database[e.item][ZIP]),
static void
text_write_address_us(FILE *out, int i) {
fprintf(out, "\n%s", database[i][ADDRESS]);
-
+
+ if (database[i][ADDRESS2])
+ fprintf(out, "\n%s", database[i][ADDRESS2]);
+
if (database[i][CITY])
fprintf(out, "\n%s", database[i][CITY]);
static void
text_write_address_eu(FILE *out, int i) {
fprintf(out, "\n%s", database[i][ADDRESS]);
-
+
+ if (database[i][ADDRESS2])
+ fprintf(out, "\n%s", database[i][ADDRESS2]);
+
if (database[i][ZIP] || database[i][CITY]) {
fputc('\n', out);