From 80d70870f52674ecb7e1dd6f7c517d689ab6be1f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 27 Nov 1993 21:59:45 +0000 Subject: [PATCH] * (main): If an adjustment is specified, but no command is given, give a diagnostic in addition to the usage message. (isinteger): Accept a leading `+'. --- src/nice.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nice.c b/src/nice.c index 94f750eb52..ca989cda5e 100644 --- a/src/nice.c +++ b/src/nice.c @@ -125,7 +125,10 @@ main (argc, argv) if (optind == argc) { if (adjustment_given) - usage (1); + { + error (0, 0, "a command must be given with an adjustment"); + usage (1); + } /* No command given; print the priority. */ errno = 0; current_priority = GET_PRIORITY (); @@ -157,7 +160,7 @@ static int isinteger (s) char *s; { - if (*s == '-') + if (*s == '-' || *s == '+') ++s; if (*s == 0) return 0; -- 2.47.3