diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-21 18:28:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-21 18:28:25 +0000 |
commit | a5f528e25695e2b50b4eb0e2f221c4d7b5f4456f (patch) | |
tree | ce16f417f18968d1cf75c4b7cd9e0510aa2c3d79 | |
parent | a624ea109d0006af6a721a48ab28c57fda230dae (diff) |
handle -- as POSIX requires; from kili@outback.escape.de; ok otto
-rw-r--r-- | bin/expr/expr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/expr/expr.c b/bin/expr/expr.c index 52635e42204..615a69ed86d 100644 --- a/bin/expr/expr.c +++ b/bin/expr/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.16 2005/11/12 00:49:55 deraadt Exp $ */ +/* $OpenBSD: expr.c,v 1.17 2006/06/21 18:28:24 deraadt Exp $ */ /* $NetBSD: expr.c,v 1.3.6.1 1996/06/04 20:41:47 cgd Exp $ */ /* @@ -494,6 +494,10 @@ main(int argc, char *argv[]) struct val *vp; (void) setlocale(LC_ALL, ""); + + if (argc > 1 && !strcmp(argv[1], "--")) + argv++; + av = argv + 1; nexttoken(0); |