summaryrefslogtreecommitdiffstats
path: root/text-utils/column.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/column.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/column.c')
-rw-r--r--text-utils/column.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/text-utils/column.c b/text-utils/column.c
index 4ae9522ef..21236b2c8 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -30,6 +30,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * - added Native Language Support
+ */
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -41,6 +45,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
+#include "nls.h"
void c_columnate __P((void));
void *emalloc __P((int));
@@ -74,6 +79,9 @@ main(argc, argv)
extern char *__progname;
__progname = argv[0];
#endif
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
if ((p = getenv("COLUMNS")) != NULL)
@@ -265,7 +273,7 @@ input(fp)
if (!*p)
continue;
if (!(p = strchr(p, '\n'))) {
- warnx("line too long");
+ warnx(_("line too long"));
eval = 1;
continue;
}
@@ -300,6 +308,6 @@ usage()
{
(void)fprintf(stderr,
- "usage: column [-tx] [-c columns] [file ...]\n");
+ _("usage: column [-tx] [-c columns] [file ...]\n"));
exit(1);
}