/^BEGIN;:VCARD$/ { fn = n = id = iban = tmp = ""; }
- /^UID;[^:]*:/ { uid = $0; sub(/^[^;]+;[^:]*:/, "", uid); }
- /^FN;[^:]*:/ { fn = $0; sub(/^[^;]+;[^:]*:/, "", fn); }
- /^N;[^:]*:/ { n = $0; sub(/^[^;]+;[^:]*:/, "", n); sub(/;.*$/, "", n); }
-/^X-IBAN;[^:]*:/ { tmp = $0; sub(/^[^;]+;[^:]*:/, "", tmp); iban = iban ? iban " " tmp : tmp; }
+ /^UID;[^:]*:/ { uid = $0; sub(/^[^;]+;[^:]*:/, "", uid); }
+ /^FN;[^:]*:/ { fn = $0; sub(/^[^;]+;[^:]*:/, "", fn); }
+ /^N;[^:]*:/ { n = $0; sub(/^[^;]+;[^:]*:/, "", n); sub(/;.*$/, "", n); }
+/^X-IBAN;[^:]*:/ { iban = $0; sub(/^[^;]+;[^:]*:/, "", iban); ibans[length(ibans)] = iban; }
/^END;:VCARD$/ {
uid_n[uid] = n; uid_fn[uid] = fn; uid_iban[uid] = iban;
- split(iban, ibans, / /);
- for (iban in ibans) iban_uid[iban] = iban_uid[iban] ? iban_uid[iban] " " uid : uid;
- fn = n = uid = iban = tmp = "";
+ for (iban in ibans) iban_uid[ibans[iban]] = iban_uid[ibans[iban]] ? iban_uid[ibans[iban]] " " uid : uid;
+ fn = n = uid = iban = tmp = ""; split("", ibans);
}
strftime("%Y-%m-%d", $1, "UTC") == $2 && strftime("%Y-%m-%d", $3, "UTC") == $4 { ledger = 1; }