summaryrefslogtreecommitdiffstats
path: root/misc-utils/kill.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:39 +0100
committerKarel Zak2006-12-07 00:25:39 +0100
commit7eda085c41faa3445b4b168ce78ab18dab87d98a (patch)
treeeb8da4baebd0af68fa84818d3d51b4a3714667fc /misc-utils/kill.c
parentImported from util-linux-2.9i tarball. (diff)
downloadkernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.gz
kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.xz
kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.zip
Imported from util-linux-2.9v tarball.
Diffstat (limited to 'misc-utils/kill.c')
-rw-r--r--misc-utils/kill.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index 629938137..768f5deab 100644
--- a/misc-utils/kill.c
+++ b/misc-utils/kill.c
@@ -34,6 +34,10 @@
* oct 5 1994 -- almost entirely re-written to allow for process names.
* modifications (c) salvatore valente <svalente@mit.edu>
* may be used / modified / distributed under the same terms as the original.
+ *
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * - added Native Language Support
+ *
*/
#include <stdio.h>
@@ -42,6 +46,7 @@
#include <ctype.h>
#include <unistd.h>
#include <signal.h>
+#include "nls.h"
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
@@ -151,6 +156,10 @@ int main (int argc, char *argv[])
int do_pid, do_kill, check_all;
int *pids, *ip;
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
whoami = mybasename (*argv);
numsig = SIGTERM;
do_pid = (! strcmp (whoami, "pid"));
@@ -187,7 +196,7 @@ int main (int argc, char *argv[])
/* argc == 2 */
arg = argv[1];
if ((numsig = arg_to_signum (arg)) < 0) {
- fprintf (stderr, "%s: unknown signal %s\n", whoami, arg);
+ fprintf (stderr, _("%s: unknown signal %s\n"), whoami, arg);
return 1;
}
printsig (numsig);
@@ -249,7 +258,7 @@ int main (int argc, char *argv[])
pids = get_pids (arg, check_all);
if (! pids) {
errors++;
- fprintf (stderr, "%s: can't find process \"%s\"\n",
+ fprintf (stderr, _("%s: can't find process \"%s\"\n"),
whoami, arg);
continue;
}
@@ -291,7 +300,7 @@ int arg_to_signum (char *arg)
void nosig (char *name)
{
- fprintf (stderr, "%s: unknown signal %s; valid signals:\n", whoami, name);
+ fprintf (stderr, _("%s: unknown signal %s; valid signals:\n"), whoami, name);
printsignals (stderr);
}
@@ -331,8 +340,8 @@ int usage (int status)
FILE *fp;
fp = (status == 0 ? stdout : stderr);
- fprintf (fp, "usage: %s [ -s signal | -p ] [ -a ] pid ...\n", whoami);
- fprintf (fp, " %s -l [ signal ]\n", whoami);
+ fprintf (fp, _("usage: %s [ -s signal | -p ] [ -a ] pid ...\n"), whoami);
+ fprintf (fp, _(" %s -l [ signal ]\n"), whoami);
return status;
}