diff options
author | Jim Meyering <jim@meyering.net> | 1996-05-18 18:36:10 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-05-18 18:36:10 +0000 |
commit | 2d8de9b8ab695a46ff93387b75264611b73e2b49 (patch) | |
tree | 449551e716b657af9534b9fee64435f324261544 | |
parent | 271a7e6bb395cf2e3da2cb2f33b05faefb63a47a (diff) | |
download | coreutils-2d8de9b8ab695a46ff93387b75264611b73e2b49.tar.xz |
(main): Don't recognize --help, --h, --he, --version, --v, etc.
if the POSIXLY_CORRECT environment variable is set.
(docolon) [RE_SYNTAX_POSIX_BASIC]: Revert my misguided change of Mar 1.
-rw-r--r-- | src/expr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c index 6b0324e92..567633b58 100644 --- a/src/expr.c +++ b/src/expr.c @@ -158,7 +158,9 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, "expr", PACKAGE_VERSION, usage); + /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */ + if (getenv ("POSIXLY_CORRECT") == NULL) + parse_long_options (argc, argv, "expr", PACKAGE_VERSION, usage); if (argc == 1) { @@ -425,7 +427,7 @@ docolon (VALUE *sv, VALUE *pv) re_buffer.allocated = 2 * len; re_buffer.buffer = (unsigned char *) xmalloc (re_buffer.allocated); re_buffer.translate = 0; - re_syntax_options = RE_SYNTAX_POSIX_MINIMAL_BASIC; + re_syntax_options = RE_SYNTAX_POSIX_BASIC; errmsg = re_compile_pattern (pv->u.s, len, &re_buffer); if (errmsg) error (2, 0, "%s", errmsg); |