diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 19:50:00 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 19:50:00 +0000 |
| commit | 77ea7fc61c307c81698904c03796c1920e7a0856 (patch) | |
| tree | b6e394382c7434c95b0dd99ded7b55bb3981f3e2 /client.c | |
| parent | wayland: wayl_win_destroy(): looks like we need another roundtrip (diff) | |
client: add long options for --verbose and --help
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -40,8 +40,14 @@ main(int argc, char *const *argv) const char *const prog_name = argv[0]; + static const struct option longopts[] = { + {"version", no_argument, 0, 'v'}, + {"help", no_argument, 0, 'h'}, + {NULL, no_argument, 0, 0}, + }; + while (true) { - int c = getopt_long(argc, argv, ":hv", NULL, NULL); + int c = getopt_long(argc, argv, ":hv", longopts, NULL); if (c == -1) break; |
