aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-26 09:16:09 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-26 09:16:09 +0200
commit8307642c8c0dab1dcfccb5f36b4e5e5e3f4f12be (patch)
tree0032cf65826c1887a6625827a3579d2c1bae839b /src/main.c
parenteba151c179fa55f74a1e492cf36513ee636954ed (diff)
Half-implement -h
Diffstat (limited to 'src/main.c')
-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