diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-20 12:13:49 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-20 12:13:49 -0700 |
commit | b29feb2bdde8b7aae84e6dbfd9daa46eda888dcd (patch) | |
tree | 863e43253fbd0ff872a46907e6b36a212d59f278 | |
parent | 13bc4b3ce3e9b3a8554cbb82d455ad229bad25e4 (diff) |
Accept --help & --version as aliases to -help & -version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xwud/-/merge_requests/4>
-rw-r--r-- | xwud.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -184,7 +184,8 @@ main(int argc, char *argv[]) geom = argv[i]; continue; } - if (strcmp(argv[i], "-help") == 0) { + if ((strcmp(argv[i], "-help") == 0) || + (strcmp(argv[i], "--help") == 0)) { usage(NULL); } if (strcmp(argv[i], "-in") == 0) { @@ -239,7 +240,8 @@ main(int argc, char *argv[]) vis = argv[i]; continue; } - if (strcmp(argv[i], "-version") == 0) { + if ((strcmp(argv[i], "-version") == 0) || + (strcmp(argv[i], "--version") == 0)) { puts(PACKAGE_STRING); exit(0); } |