]> granicus.if.org Git - procps-ng/commit
Changed the err and warns to macros
authorCraig Small <csmall@enc.com.au>
Tue, 3 Jan 2012 07:48:43 +0000 (18:48 +1100)
committerCraig Small <csmall@enc.com.au>
Tue, 3 Jan 2012 07:48:43 +0000 (18:48 +1100)
commitfb11e1fe0a29c628c288d5a66c8e4d153bd15a5b
tree6e3067e999cd8da6d1b04f8358a3572ab037cdb0
parent76b3e91e6a379acbfadb8e20232cf08182398928
Changed the err and warns to macros

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.
15 files changed:
free.c
include/c.h
lib/strutils.c
pgrep.c
pmap.c
proc/procps.h
pwdx.c
skill.c
slabtop.c
sysctl.c
tload.c
uptime.c
vmstat.c
w.c
watch.c