Commit 0ac63f5bc1 messed up header
print order; the Total Slabs and Total Caches where reported in place
of each other.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
err and warn are BSD format but they are not recommended by library
developers. However their consiseness is useful!
The solution is to use some macros that create xerr etc which then
just map to the error() function. The next problem is error() uses
program_invocation_name so we set this to program_invovation_short_name
This is a global set but seems to be the convention (or at least errors
are on the short name only) used everywhere else.
This commit fixes also peculiar behavior of
$ slabtop -d 0
which did not make sense. The fix is to disallow anything else but
positive integers, which includes zero as is is not positive (or
negative) number.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Using ncurses initscr/endwin clears the screen for xterm/etc it
now prints raw text using printf
Bug-Debian: http://bugs.debian.org/503089
Author: Craig Small <csmall@debian.org>