Protect isspace by isascii to not count high spaces

This commit is contained in:
Andrey A. Chernov 1997-06-27 10:09:50 +00:00
parent f74df00911
commit e5fb1920f5
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $Id: domacro.c,v 1.2 1997/06/25 08:56:37 msmith Exp $ */
/* $Id: domacro.c,v 1.3 1997/06/27 09:30:09 ache Exp $ */
/* $NetBSD: domacro.c,v 1.9 1997/03/13 06:23:14 lukem Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)domacro.c 8.3 (Berkeley) 4/2/94";
#else
static char rcsid[] = "$Id: domacro.c,v 1.2 1997/06/25 08:56:37 msmith Exp $";
static char rcsid[] = "$Id: domacro.c,v 1.3 1997/06/27 09:30:09 ache Exp $";
#endif
#endif /* not lint */
@ -77,7 +77,7 @@ domacro(argc, argv)
TOP:
cp1 = macros[i].mac_start;
while (cp1 != macros[i].mac_end) {
while (isspace((unsigned char)*cp1)) {
while (isascii(*cp1) && isspace(*cp1)) {
cp1++;
}
cp2 = line;

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: ruserpass.c,v 1.5 1997/06/25 08:56:45 msmith Exp $ */
/* $NetBSD: ruserpass.c,v 1.13 1997/04/01 14:20:34 mrg Exp $ */
/*
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95";
#else
static char rcsid[] = "$Id$";
static char rcsid[] = "$Id: ruserpass.c,v 1.5 1997/06/25 08:56:45 msmith Exp $";
#endif
#endif /* not lint */
@ -202,7 +202,7 @@ next:
tmp = macros[macnum].mac_name;
*tmp++ = c;
for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
!isspace(c); ++i) {
(!isascii(c) || !isspace(c)); ++i) {
*tmp++ = c;
}
if (c == EOF) {