summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-06-23 09:05:15 +0000
committerFrederic Culot <calcurse@culot.org>2009-06-23 09:05:15 +0000
commitdfa4c580aa55e51176bd08a7d4561f54c1023ce8 (patch)
tree903cd4007d3b17ae5ba930cea0d8c88ab1319467 /src
parent90589eab172ee6f3dcd22cca81accca5a64d521b (diff)
downloadcalcurse-dfa4c580aa55e51176bd08a7d4561f54c1023ce8.tar.gz
calcurse-dfa4c580aa55e51176bd08a7d4561f54c1023ce8.zip
Make the argument given to -r or -s flags optional.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/args.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/args.c b/src/args.c
index 6cbe906..12db2d8 100755
--- a/src/args.c
+++ b/src/args.c
@@ -1,4 +1,4 @@
-/* $calcurse: args.c,v 1.46 2009/06/20 17:59:04 culot Exp $ */
+/* $calcurse: args.c,v 1.47 2009/06/23 09:05:15 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -597,7 +597,7 @@ parse_args (int argc, char **argv, conf_t *conf)
char *ddate = "", *cfile = NULL, *range = NULL, *startday = NULL;
char *datadir = NULL, *ifile = NULL;
- static char *optstr = "hvnNax::t::d:c:r:s:D:i:";
+ static char *optstr = "hvnNax::t::d:c:r::s::D:i:";
struct option longopts[] = {
{"appointment", no_argument, NULL, 'a'},
@@ -608,8 +608,8 @@ parse_args (int argc, char **argv, conf_t *conf)
{"import", required_argument, NULL, 'i'},
{"next", no_argument, NULL, 'n'},
{"note", no_argument, NULL, 'N'},
- {"range", required_argument, NULL, 'r'},
- {"startday", required_argument, NULL, 's'},
+ {"range", optional_argument, NULL, 'r'},
+ {"startday", optional_argument, NULL, 's'},
{"todo", optional_argument, NULL, 't'},
{"version", no_argument, NULL, 'v'},
{"export", optional_argument, NULL, 'x'},