aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 40318cf..83c27ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,13 +44,18 @@ main(int argc, char **argv)
int opt;
static const struct option longopts[] = {
{"digits", required_argument, 0, 'd'},
+ {"help", no_argument, 0, 'h'},
{"period", required_argument, 0, 'p'},
{0},
};
argv[0] = basename(argv[0]);
- while ((opt = getopt_long(argc, argv, "d:p:", longopts, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "d:hp:", longopts, NULL)) != -1) {
switch (opt) {
+ case 'h':
+ /* TODO: Open the manual page! */
+ usage(argv[0]);
+ break;
case 'd':
case 'p': {
/* strtol() allows for numbers with leading spaces and a