Localize it
8bit cleanup
This commit is contained in:
parent
11282a57ce
commit
726aebe5e0
@ -140,7 +140,7 @@ compile()
|
||||
|
||||
#define EATSPACE() do { \
|
||||
if (p) \
|
||||
while (*p && isascii(*p) && isspace(*p)) \
|
||||
while (*p && isspace((unsigned char)*p)) \
|
||||
p++; \
|
||||
} while (0)
|
||||
|
||||
@ -696,7 +696,7 @@ duptoeol(s, ctype)
|
||||
|
||||
ws = 0;
|
||||
for (start = s; *s != '\0' && *s != '\n'; ++s)
|
||||
ws = isspace(*s);
|
||||
ws = isspace((unsigned char)*s);
|
||||
*s = '\0';
|
||||
if (ws)
|
||||
err(WARNING, "whitespace after %s", ctype);
|
||||
|
@ -47,9 +47,9 @@ static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94";
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <regex.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
@ -109,6 +109,8 @@ main(argc, argv)
|
||||
{
|
||||
int c, fflag;
|
||||
|
||||
(void) setlocale(LC_ALL, "");
|
||||
|
||||
fflag = 0;
|
||||
while ((c = getopt(argc, argv, "ae:f:n")) != EOF)
|
||||
switch (c) {
|
||||
|
@ -475,7 +475,7 @@ lputs(s)
|
||||
(void)printf("\\\n");
|
||||
count = 0;
|
||||
}
|
||||
if (isascii(*s) && isprint(*s) && *s != '\\') {
|
||||
if (isprint((unsigned char)*s) && *s != '\\') {
|
||||
(void)putchar(*s);
|
||||
count++;
|
||||
} else {
|
||||
@ -552,7 +552,7 @@ regsub(sp, string, src)
|
||||
while ((c = *src++) != '\0') {
|
||||
if (c == '&')
|
||||
no = 0;
|
||||
else if (c == '\\' && isdigit(*src))
|
||||
else if (c == '\\' && isdigit((unsigned char)*src))
|
||||
no = *src++ - '0';
|
||||
else
|
||||
no = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user