diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-03-05 18:44:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-03-05 18:44:03 +0000 |
commit | f416d1679d76012f25d60123409c5a036f5ff1b4 (patch) | |
tree | 81b664ffde219cfdaa055c71f99469737445d039 | |
parent | 12e940e3c0ecd3bfd23e2668caa47b856a76a155 (diff) |
provide support for -- argument seperator
-rw-r--r-- | usr.bin/less/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c index b247fe2e9cb..23bc1e6379c 100644 --- a/usr.bin/less/main.c +++ b/usr.bin/less/main.c @@ -121,8 +121,14 @@ main(argc, argv) } #endif #define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') - while (--argc > 0 && (isoptstring(argv[0]) || isoptpending())) + while (--argc > 0 && (isoptstring(argv[0]) || isoptpending())) { + if (strcmp(argv[0], "--") == 0) { + argv++; + argc--; + break; + } scan_option(*argv++); + } #undef isoptstring if (isoptpending()) |