aboutsummaryrefslogtreecommitdiffstats
path: root/find-contact-by-number.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-05 23:48:03 +0200
committerMattias Andrée <maandree@kth.se>2021-04-05 23:48:03 +0200
commit21e71d1951192259502681df0f63e6de7254eca9 (patch)
treee9f2e75be70cdbc86540f99f2d2ff9b573ac4d29 /find-contact-by-number.c
parentm + add set-contact-addresses + use -n instead of -l for country (diff)
downloadcontacts-21e71d1951192259502681df0f63e6de7254eca9.tar.gz
contacts-21e71d1951192259502681df0f63e6de7254eca9.tar.bz2
contacts-21e71d1951192259502681df0f63e6de7254eca9.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'find-contact-by-number.c')
-rw-r--r--find-contact-by-number.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/find-contact-by-number.c b/find-contact-by-number.c
index e426c57..54827f4 100644
--- a/find-contact-by-number.c
+++ b/find-contact-by-number.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
-USAGE("[-c context] [-C local-country-calling-code] [-D address-book-country-calling-code] [-F | -f] [-M | -m] [-t] (-L | number)");
+USAGE("[-a address-book-country-calling-code] [-l local-country-calling-code] [-c context] [-F | -f] [-M | -m] [-t] (-L | number)");
int
@@ -11,24 +11,24 @@ main(int argc, char *argv[])
struct passwd *user;
struct libcontacts_contact **contacts;
struct libcontacts_number **numbers, *number;
- char *context = NULL, *cc_contacts = NULL, *cc_location = NULL;
+ const char *context = NULL, *cc_contacts = NULL, *cc_location = NULL;
size_t i;
ARGBEGIN {
- case 'c':
- if (context)
+ case 'a':
+ if (cc_contacts)
usage();
- context = ARG();
+ cc_contacts = ARG();
break;
- case 'C':
+ case 'l':
if (cc_location)
usage();
cc_location = ARG();
break;
- case 'D':
- if (cc_contacts)
+ case 'c':
+ if (context)
usage();
- cc_contacts = ARG();
+ context = ARG();
break;
case 'F':
if (require_fax >= 0)