Commit Graph

14 Commits

Author SHA1 Message Date
Sami Kerola
9d47cb0c38 pwdx: re-create invalid process id check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-08 21:29:51 +01:00
Craig Small
fb11e1fe0a 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.
2012-01-03 18:48:43 +11:00
Sami Kerola
2c8b3a7857 pwdx: write errors to stderr
Includes also magic number removal (return value 1 to EXIT_FAILURE),
and proper null assignment to end of string.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Sami Kerola
0022b6ec5d nls: improve translations and provide translator help comments
Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Sami Kerola
c862a4caa5 nls: add functions which take translations to be used
Add the following three functions to most of the commands.

setlocale (LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:53 +01:00
Sami Kerola
e9f7392d31 pwdx: add gettext support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
4f7b9c661b pwdx.c: new usage & fix coding style
Coding style fixed and new help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Daniel Novotny
5d29bfedc8 pwdx & libprocps-ng: Hurd does not have MAX_PATH defined
A patch from Debian.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243
Bug-Debian: http://bugs.debian.org/588677
Backported-by: Sami Kerola <kerolasa@iki.fi>
2011-12-18 22:30:00 +11:00
Jim Warner
3f75390563 redhat analysis: pwdx 2011-10-15 08:26:28 +02:00
Werner Fink
9564bfc6f0 Fix potential bufferoverflow in pwdx
Fix potential bufferoverflow in pwdx
 Novell bugzilla entry 78074

Signed-off-by: Werner Fink <werner@suse.de>
2011-01-18 16:15:15 +01:00
albert
ac23e47c3e pwdx: buffer overflow fixed -- thanks Ulf Harnhammar 2006-06-17 05:01:17 +00:00
albert
c03b9f6deb fix buffer overflow 2005-10-30 23:52:35 +00:00
albert
29cbc63561 fputs instead of fprintf 2005-10-30 23:45:47 +00:00
albert
92ba425ed6 new pwdx command 2004-10-16 07:59:02 +00:00