1999-09-19  Bruno Haible  <haible@clisp.cons.org> - for util-linux-2.9y

	* configure: Add test for wide character support.
	* lib/widechar.h: New file.
	* text-utils/col.c: No need to include <locale.h>, it's already
	included by "nls.h". Include "widechar.h".
	(CHAR): Change c_char field to wchar_t.
	(PUTC): Use putwchar instead of putchar.
	(main): Change ch type to wchar_t. Use getwchar instead of getchar.
	Use iswgraph instead of isgraph. Set exit status upon write error
	on stdout.
	* text-utils/colcrt.c: Include "widechar.h".
	(plus): Change argument types to wchar_t.
	(page): Change element type to wchar_t.
	(f): Move inside main.
	(main): Change type of c to wint_t. Change type of cp, dp to wchar_t*.
	Remove "close(0); fopen(...);" hack. Set exit status upon write error
	on stdout.
	(pflush): Change type of cp to wchar_t*. Use fputws and putwchar
	instead of printf.
	(move): Change type of cp, dp to wchar_t*.
	* text-utils/colrm.c: Include <stdlib.h>, <locale.h>, "widechar.h".
	(main): Change type of c to wint_t. Call setlocale. Use `atoi' instead
	of `getn'. Use getwc instead of getc. Use putwc instead of putc.
	Set exit status upon write error on stdout.
	(getn): Remove function.
	* text-utils/column.c: Include "widechar.h".
	(list): Change type to wchar_t**.
	(separator): Change type to wchar_t*.
	(main): Call mbs_to_wcs when initializing separator.
	Set exit status upon write error on stdout.
	(c_columnate): Change type of lp to wchar_t**. Use fputws instead of
	printf. Use putwchar instead of putchar.
	(r_columnate): Use fputws instead of printf. Use putwchar instead of
	putchar.
	(print): Change type of lp to wchar_t**. Use fputws instead of printf.
	(TBL): Change type of field list to wchar_t**.
	(maketbl): Change type of lp and cols to wchar_t**. Change type of p
	to wchar_t*. New variable wcstok_state. Use wcstok instead of strtok,
	Fix realloc bug. Use fputws and putwchar instead of printf.
	(input): Use fgetws instead of fgets.
	(mbs_to_wcs, mtsafe_strtok): New functions.
	* text-utils/rev.c: Include "widechar.h".
	(main): Change type of t and p to wchar_t*. Use fgetws instead of
	fgets. Use putwchar instead of putchar.
	* text-utils/ul.c: Include "widechar.h".
	(putwp): New macro.
	(outc): Change argument type to wint_t.
	(CHAR): Change type of c_char field to wchar_t.
	(PRINT): Use putwp instead of putp.
	(main): Set exit status upon write error on stdout.
	(filter): Change type of c to wchar_t. Use getwc instead of getc.
	(flushln): Use putwchar instead of putchar.
	(overstrike, iattr): Avoid buffer overrun bug. Use putwchar instead
	of putchar.
	(outc): Use putwchar instead of putchar.
