From 8bbd90727373467dcce77571238fceb192af0747 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 24 Oct 1995 06:15:05 +0000 Subject: [PATCH] Add setlocale LC_CTYPE --- usr.bin/col/col.c | 3 +++ usr.bin/fmt/fmt.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 719fef798c2f..37dc3045c48b 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)col.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #define BS '\b' /* backspace */ #define TAB '\t' /* tab */ @@ -128,6 +129,8 @@ main(argc, argv) int nflushd_lines; /* number of lines that were flushed */ int adjust, opt, warned; + (void) setlocale(LC_CTYPE, ""); + max_bufd_lines = 128; compress_spaces = 1; /* compress spaces into tabs */ while ((opt = getopt(argc, argv, "bfhl:x")) != EOF) diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index 6d689c12dd30..dfbdb9796174 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93"; #include #include +#include /* * fmt -- format the concatenation of input files or standard input @@ -84,6 +85,8 @@ main(argc, argv) register int errs = 0; int number; /* LIZ@UOM 6/18/85 */ + (void) setlocale(LC_CTYPE, ""); + goal_length = GOAL_LENGTH; max_length = MAX_LENGTH; setout();