X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/35371dec1e2b253df8bc26206721757ff9166b22..0fc2393237ed589446f55569cf068aacdaacba58:/usr/src/bin/csh/time.c diff --git a/usr/src/bin/csh/time.c b/usr/src/bin/csh/time.c index 1e4c529205..8cfc010ff3 100644 --- a/usr/src/bin/csh/time.c +++ b/usr/src/bin/csh/time.c @@ -1,5 +1,11 @@ +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley Software License Agreement + * specifies the terms and conditions for redistribution. + */ + #ifndef lint -static char *sccsid = "@(#)time.c 4.6 (Berkeley) %G%"; +static char *sccsid = "@(#)time.c 5.3 (Berkeley) %G%"; #endif #include "sh.h" @@ -41,13 +47,15 @@ donice(v) register char **v; { register char *cp; + int nval; v++, cp = *v++; if (cp == 0) - (void) setpriority(PRIO_PROCESS, 0, 4); + nval = 4; else if (*v == 0 && any(cp[0], "+-")) - (void) setpriority(PRIO_PROCESS, 0, - getpriority(PRIO_PROCESS, 0) + getn(cp)); + nval = getn(cp); + (void) setpriority(PRIO_PROCESS, 0, + getpriority(PRIO_PROCESS, 0) + nval); } ruadd(ru, ru2)