Commit Graph

23 Commits

Author SHA1 Message Date
Quentin Rameau 6e7743eb56 Cleanup usage() across sbase
Some tools didn't use argv0 for tool name, or usage() at all.
2015-12-21 18:07:25 +00:00
Roberto E. Vargas Caballero d84070398b Check if PRIO_MIN and PRIO_MAX are defined
The majority of the systems define PRIO_MAX and PRIO_MIN,
but there is an obscure system, whose name I am not going
to tell, where they were not defined.
2015-12-15 17:05:21 +00:00
sin 2366164de7 No need for semicolon after ARGEND
This is also the style used in Plan 9.
2015-11-01 10:18:55 +00:00
FRIGN 4d946a274f Audit renice(1)
1) Get rid of strtop(), which was a NiH-version of estrtonum().
2) Boolean-style-fixes.
3) Update usage, reflecting num-idiom, also update manpage accordingly.
4) Don't break after usage().
5) Rewrite main loop with *argv instead of argv[i].
6) Don't play around with who < 0 and stuff.
7) Rename status to ret for consistency.
2015-03-17 22:15:09 +01:00
Hiltjo Posthuma ad6776e9a1 grep, kill, renice, sort: style: put main at bottom 2015-03-08 12:51:33 +01:00
FRIGN 31572c8b0e Clean up #includes 2015-02-14 21:12:23 +01:00
FRIGN fd562481f3 Convert estrto{l, ul} to estrtonum
Enough with this insanity!
2015-01-30 16:52:44 +01:00
FRIGN 1436518f9d Use < 0 instead of == -1 2014-11-19 20:09:29 +00:00
sin ee1e90ebdc renice(1) rework 2014-11-17 16:33:38 +00:00
sin 4dc2b783b8 Nuke some fprintf() calls and replace with weprintf() 2014-11-17 16:33:24 +00:00
sin 166bc3052e Use PRIO_{MIN,MAX} instead of NZERO
Some systems do not define NZERO.  NZERO seems to be an XSI extension
and PRIO_{MIN,MAX} is not specified by POSIX but most relevant systems
define it.
2014-11-17 15:02:51 +00:00
FRIGN ec8246bbc6 Un-boolify sbase
It actually makes the binaries smaller, the code easier to read
(gems like "val == true", "val == false" are gone) and actually
predictable in the sense of that we actually know what we're
working with (one bitwise operator was quite adventurous and
should now be fixed).

This is also more consistent with the other suckless projects
around which don't use boolean types.
2014-11-14 10:54:20 +00:00
FRIGN eee98ed3a4 Fix coding style
It was about damn time. Consistency is very important in such a
big codebase.
2014-11-13 18:08:43 +00:00
sin 0c5b7b9155 Stop using EXIT_{SUCCESS,FAILURE} 2014-10-02 23:46:59 +01:00
Hiltjo Posthuma 953ebf3573 code style
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-06-01 18:02:30 +01:00
dwts 575b38391c keep usage definition above main 2014-04-22 13:46:33 +01:00
sin 02d91696b4 Fix char **argv to char *argv[] 2014-04-18 11:54:44 +01:00
sin 795ffe490d Use the more portable NZERO instead of PRIO_*
We assume the valid range is [-NZERO, NZERO-1].
2014-02-27 14:24:21 +00:00
sin 8cd24f0525 Revert "Make sbase compile with musl"
musl-0.9.14 defines PRIO_MIN and PRIO_MAX
2013-10-07 20:47:33 +01:00
sin f349dd5987 Use arg.h as much as possible and add usage() where missing
Rename eusage() to usage() as well.
2013-10-07 17:13:01 +01:00
sin b5a511dacf Exit with EXIT_SUCCESS/EXIT_FAILURE instead of 0 and 1
Fixed for consistency purposes.
2013-10-07 16:44:22 +01:00
sin 5d35656193 Make sbase compile with musl 2013-10-05 13:51:45 +01:00
Lorenzo Cogotti 75c97de593 Various fixes, add renice command.
This commit adds the renice command and its man page,
it also introduces some fixes:
* Makes nice command more solid, it also makes it respect POSIX return values.
* Fixes estrtol, which produced a misleading error on out of range errors.
* Fixes chgrp.1 NAME section.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-06-14 19:01:04 +02:00