diff options
author | Karel Zak | 2006-12-07 00:25:39 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:39 +0100 |
commit | 7eda085c41faa3445b4b168ce78ab18dab87d98a (patch) | |
tree | eb8da4baebd0af68fa84818d3d51b4a3714667fc /login-utils/mesg.c | |
parent | Imported from util-linux-2.9i tarball. (diff) | |
download | kernel-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 'login-utils/mesg.c')
-rw-r--r-- | login-utils/mesg.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/login-utils/mesg.c b/login-utils/mesg.c index d05d333c9..cc8c4010d 100644 --- a/login-utils/mesg.c +++ b/login-utils/mesg.c @@ -38,6 +38,10 @@ * Modified Fri Mar 10 20:27:19 1995, faith@cs.unc.edu, for Linux * Modified Mon Jul 1 18:14:10 1996, janl@ifi.uio.no, writing to stdout * as suggested by Michael Meskes <meskes@Informatik.RWTH-Aachen.DE> + * + * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org> + * - added Native Language Support + * * */ @@ -50,6 +54,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include "nls.h" int main(argc, argv) @@ -60,6 +65,11 @@ main(argc, argv) char *tty; int ch; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + while ((ch = getopt(argc, argv, "")) != EOF) switch (ch) { case '?': @@ -76,10 +86,10 @@ main(argc, argv) if (*argv == NULL) { if (sb.st_mode & (S_IWGRP | S_IWOTH)) { - (void)fprintf(stdout, "is y\n"); + (void)fprintf(stdout, _("is y\n")); exit(0); } - (void)fprintf(stdout, "is n\n"); + (void)fprintf(stdout, _("is n\n")); exit(1); } @@ -99,6 +109,6 @@ main(argc, argv) exit(1); } -usage: (void)fprintf(stderr, "usage: mesg [y | n]\n"); +usage: (void)fprintf(stderr, _("usage: mesg [y | n]\n")); exit(2); } |