summaryrefslogtreecommitdiffstats
path: root/text-utils/col.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 /text-utils/col.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 'text-utils/col.c')
-rw-r--r--text-utils/col.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/text-utils/col.c b/text-utils/col.c
index 1cbaeb5b1..f08f51ad8 100644
--- a/text-utils/col.c
+++ b/text-utils/col.c
@@ -37,6 +37,9 @@
* patches from Andries.Brouwer@cwi.nl
* Wed Sep 14 22:31:17 1994: patches from Carl Christofferson
* (cchris@connected.com)
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * - added Native Language Support
+ *
*/
#include <stdlib.h>
@@ -46,6 +49,7 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+#include "nls.h"
#include <locale.h>
#define BS '\b' /* backspace */
@@ -123,9 +127,10 @@ int main(int argc, char **argv)
int nflushd_lines; /* number of lines that were flushed */
int adjust, opt, warned;
- /* we discard characters that do not pass isgraph() */
- setlocale(LC_CTYPE, "");
-
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
max_bufd_lines = 128;
compress_spaces = 1; /* compress spaces into tabs */
while ((opt = getopt(argc, argv, "bfhl:x")) != EOF)
@@ -142,7 +147,7 @@ int main(int argc, char **argv)
case 'l': /* buffered line count */
if ((max_bufd_lines = atoi(optarg)) <= 0) {
(void)fprintf(stderr,
- "col: bad -l argument %s.\n", optarg);
+ _("col: bad -l argument %s.\n"), optarg);
exit(1);
}
break;
@@ -503,19 +508,19 @@ xmalloc(void *p, size_t size)
void usage()
{
- (void)fprintf(stderr, "usage: col [-bfx] [-l nline]\n");
+ (void)fprintf(stderr, _("usage: col [-bfx] [-l nline]\n"));
exit(1);
}
void wrerr()
{
- (void)fprintf(stderr, "col: write error.\n");
+ (void)fprintf(stderr, _("col: write error.\n"));
exit(1);
}
void warn(int line)
{
(void)fprintf(stderr,
- "col: warning: can't back up %s.\n", line < 0 ?
- "past first line" : "-- line already flushed");
+ _("col: warning: can't back up %s.\n"), line < 0 ?
+ _("past first line") : _("-- line already flushed"));
}