summaryrefslogtreecommitdiff
path: root/src/nice.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-08-04 14:15:25 +0000
committerJim Meyering <jim@meyering.net>1996-08-04 14:15:25 +0000
commit7532e5794186b48dfb6532191c40c8e3a80ea702 (patch)
tree1e81a7bac09908f1b4eeebbb5a76300529f60aa0 /src/nice.c
parent5b8cad3534d1eaa5e9f228ed4ea37aa514428952 (diff)
downloadcoreutils-7532e5794186b48dfb6532191c40c8e3a80ea702.tar.xz
(main): Allow `+' in options like -+8 and -+13.
Diffstat (limited to 'src/nice.c')
-rw-r--r--src/nice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nice.c b/src/nice.c
index e05cf7938..c9e271313 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -84,8 +84,11 @@ main (int argc, char **argv)
adjustment_given = 1;
++optind;
}
- else if (s[0] == '-' && ISDIGIT (s[1]))
+ else if (s[0] == '-' && (ISDIGIT (s[1])
+ || (s[1] == '+' && ISDIGIT (s[2]))))
{
+ if (s[1] == '+')
+ ++s;
if (!isinteger (&s[1]))
error (1, 0, _("invalid option `%s'"), s);