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. --- text-utils/rev.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'text-utils/rev.c') diff --git a/text-utils/rev.c b/text-utils/rev.c index 5c3a8406d..dbc25cd80 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -37,6 +37,9 @@ * last line that has no newline correctly. * 3-Jun-1998: Patched by Nicolai Langfeldt to work better on Linux: * Handle any-length-lines. Code copied from util-linux' setpwnam.c + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * */ #include @@ -45,6 +48,7 @@ #include #include #include +#include "nls.h" void usage __P((void)); void warn __P((const char *, ...)); @@ -61,6 +65,10 @@ main(argc, argv) FILE *fp; int ch, rval; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + while ((ch = getopt(argc, argv, "")) != EOF) switch(ch) { case '?': @@ -98,7 +106,7 @@ main(argc, argv) p = realloc(p, buflen); if (p == NULL) { - fprintf(stderr,"Unable to allocate bufferspace\n"); + fprintf(stderr,_("Unable to allocate bufferspace\n")); exit(1); } @@ -156,6 +164,6 @@ warn(fmt, va_alist) void usage() { - (void)fprintf(stderr, "usage: rev [file ...]\n"); + (void)fprintf(stderr, _("usage: rev [file ...]\n")); exit(1); } -- cgit v1.2.3-55-g7522