summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-07-20 12:13:49 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-07-20 12:13:49 -0700
commitb29feb2bdde8b7aae84e6dbfd9daa46eda888dcd (patch)
tree863e43253fbd0ff872a46907e6b36a212d59f278
parent13bc4b3ce3e9b3a8554cbb82d455ad229bad25e4 (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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xwud.c b/xwud.c
index 4f8264a..c7c85f4 100644
--- a/xwud.c
+++ b/xwud.c
@@ -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);
}