Localize it

8bit cleanup
This commit is contained in:
Andrey A. Chernov 1996-08-11 17:46:35 +00:00
parent 11282a57ce
commit 726aebe5e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17522
3 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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;