From 7eda085c41faa3445b4b168ce78ab18dab87d98a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2006 00:25:39 +0100 Subject: Imported from util-linux-2.9v tarball. --- login-utils/mesg.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'login-utils/mesg.c') 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 + * + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * * */ @@ -50,6 +54,7 @@ #include #include #include +#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); } -- cgit v1.2.3-55-g7522