Add setlocale LC_CTYPE
This commit is contained in:
parent
628b3a7935
commit
8bbd907273
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11765
@ -49,6 +49,7 @@ static char sccsid[] = "@(#)col.c 8.3 (Berkeley) 4/2/94";
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
#define BS '\b' /* backspace */
|
#define BS '\b' /* backspace */
|
||||||
#define TAB '\t' /* tab */
|
#define TAB '\t' /* tab */
|
||||||
@ -128,6 +129,8 @@ main(argc, argv)
|
|||||||
int nflushd_lines; /* number of lines that were flushed */
|
int nflushd_lines; /* number of lines that were flushed */
|
||||||
int adjust, opt, warned;
|
int adjust, opt, warned;
|
||||||
|
|
||||||
|
(void) setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
max_bufd_lines = 128;
|
max_bufd_lines = 128;
|
||||||
compress_spaces = 1; /* compress spaces into tabs */
|
compress_spaces = 1; /* compress spaces into tabs */
|
||||||
while ((opt = getopt(argc, argv, "bfhl:x")) != EOF)
|
while ((opt = getopt(argc, argv, "bfhl:x")) != EOF)
|
||||||
|
@ -43,6 +43,7 @@ static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93";
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fmt -- format the concatenation of input files or standard input
|
* fmt -- format the concatenation of input files or standard input
|
||||||
@ -84,6 +85,8 @@ main(argc, argv)
|
|||||||
register int errs = 0;
|
register int errs = 0;
|
||||||
int number; /* LIZ@UOM 6/18/85 */
|
int number; /* LIZ@UOM 6/18/85 */
|
||||||
|
|
||||||
|
(void) setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
goal_length = GOAL_LENGTH;
|
goal_length = GOAL_LENGTH;
|
||||||
max_length = MAX_LENGTH;
|
max_length = MAX_LENGTH;
|
||||||
setout();
|
setout();
|
||||||
|
Loading…
Reference in New Issue
Block a user