diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-05 22:25:05 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-05 22:25:05 +0200 |
commit | b843dec3932b5904af4a019f75d05ba8e0bdf191 (patch) | |
tree | 02868d4f6def9a26dae77dfbd0eaafdc3afe6250 /find-contact-by-address.c | |
parent | Add find-contact-by-address and get-contact-addresses (diff) | |
download | contacts-b843dec3932b5904af4a019f75d05ba8e0bdf191.tar.gz contacts-b843dec3932b5904af4a019f75d05ba8e0bdf191.tar.bz2 contacts-b843dec3932b5904af4a019f75d05ba8e0bdf191.tar.xz |
m + add set-contact-addresses + use -n instead of -l for country
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'find-contact-by-address.c')
-rw-r--r-- | find-contact-by-address.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/find-contact-by-address.c b/find-contact-by-address.c index 646d0d5..b556e0f 100644 --- a/find-contact-by-address.c +++ b/find-contact-by-address.c @@ -1,19 +1,19 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" -USAGE("[-a address] [-c context] [-g [latitude]:[longitude]] [-l country] [-o care-of] [-p post-code] [-t city]"); +USAGE("[-a address] [-c context] [-g [latitude]:[longitude]] [-n country] [-o care-of] [-p post-code] [-t city]"); int main(int argc, char *argv[]) { - struct passwd *user; - struct libcontacts_contact **contacts; - struct libcontacts_address **addresses, *addr; char *lookup_addr = NULL, *lookup_ctx = NULL, *lookup_loc = NULL; char *lookup_country = NULL, *lookup_careof = NULL; char *lookup_postcode = NULL, *lookup_city = NULL; double lat, lon, lat_min = 0, lat_max = 0, lon_min = 0, lon_max = 0; + struct passwd *user; + struct libcontacts_contact **contacts; + struct libcontacts_address **addresses, *addr; size_t i; ARGBEGIN { @@ -42,7 +42,7 @@ main(int argc, char *argv[]) usage(); lookup_city = ARG(); break; - case 'l': + case 'n': if (lookup_country) usage(); lookup_country = ARG(); @@ -51,7 +51,7 @@ main(int argc, char *argv[]) if (lookup_loc) usage(); lookup_loc = ARG(); - if (parse_coord(lookup_loc, &lat_min, &lat_max, &lon_min, &lon_max)) + if (parse_coord(lookup_loc, &lat, &lat_min, &lat_max, &lon, &lon_min, &lon_max)) usage(); break; default: |