Localize it, LC_CTYPE
This commit is contained in:
parent
60f514a9a7
commit
a243305fbe
@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -75,6 +76,8 @@ main(argc, argv)
|
||||
int width;
|
||||
char *p;
|
||||
|
||||
(void) setlocale(LC_CTYPE, "");
|
||||
|
||||
width = -1;
|
||||
while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1)
|
||||
switch (ch) {
|
||||
@ -155,7 +158,7 @@ fold(width)
|
||||
if ((col = newpos(col, ch)) > width) {
|
||||
if (sflag) {
|
||||
i = indx;
|
||||
while (--i >= 0 && !isblank(buf[i]))
|
||||
while (--i >= 0 && !isblank((unsigned char)buf[i]))
|
||||
;
|
||||
space = i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user