summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-07-13 06:17:12 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-07-13 06:17:12 +0000
commitfcfe53e9f5e0e0b8dcc3ca4a5c923e2c7b833057 (patch)
tree3e9b776bca34a3c6a1f5a76600fe974d3de3bd12 /regress
parent8c61c618f41a3ae8551406b90d9dd65add863b06 (diff)
Fix usage() output and getopt sorting
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libc/regex/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/regress/lib/libc/regex/main.c b/regress/lib/libc/regex/main.c
index 73334fa4ceb..d6787d88fc4 100644
--- a/regress/lib/libc/regex/main.c
+++ b/regress/lib/libc/regex/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.9 2016/05/26 14:17:58 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.10 2016/07/13 06:17:11 guenther Exp $ */
/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */
#include <stdio.h>
@@ -46,20 +46,20 @@ main(int argc, char *argv[])
progname = argv[0];
- while ((c = getopt(argc, argv, "c:e:S:E:x")) != -1)
+ while ((c = getopt(argc, argv, "c:E:e:S:x")) != -1)
switch (c) {
case 'c': /* compile options */
copts = options('c', optarg);
break;
+ case 'E': /* end offset */
+ endoff = (regoff_t)atoi(optarg);
+ break;
case 'e': /* execute options */
eopts = options('e', optarg);
break;
case 'S': /* start offset */
startoff = (regoff_t)atoi(optarg);
break;
- case 'E': /* end offset */
- endoff = (regoff_t)atoi(optarg);
- break;
case 'x': /* Debugging. */
debug++;
break;
@@ -70,7 +70,7 @@ main(int argc, char *argv[])
}
if (errflg) {
fprintf(stderr, "usage: %s ", progname);
- fprintf(stderr, "[-c copt][-C][-d] [re]\n");
+ fprintf(stderr, "[-x] [-c copt] [-E endoff] [-e eopt] [-S startoff] [re]\n");
exit(2);
}