1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-12-09 15:20:31 +00:00

slight reformatting

SCCS-file: zic.c
SCCS-SID: 7.55
This commit is contained in:
Arthur David Olson
1995-10-30 10:23:45 -05:00
committed by Paul Eggert
parent 16ac27a079
commit 13c11e365a

19
zic.c
View File

@ -13,7 +13,7 @@ static char elsieid[] = "%W%";
/* /*
** On some ancient hosts, predicates like `isspace(C)' are defined ** On some ancient hosts, predicates like `isspace(C)' are defined
** only if isascii(C) || C == EOF. Modern hosts obey the C Standard, ** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
** which says they are defined only if C == (unsigned char)C || C == EOF. ** which says they are defined only if C == ((unsigned char) C) || C == EOF.
** Neither the C Standard nor Posix require that `isascii' exist. ** Neither the C Standard nor Posix require that `isascii' exist.
** For portability, we check both ancient and modern requirements. ** For portability, we check both ancient and modern requirements.
** If isascii is not defined, the isascii check succeeds trivially. ** If isascii is not defined, the isascii check succeeds trivially.
@ -1717,7 +1717,7 @@ static int
lowerit(a) lowerit(a)
int a; int a;
{ {
a = (unsigned char)a; a = (unsigned char) a;
return (isascii(a) && isupper(a)) ? tolower(a) : a; return (isascii(a) && isupper(a)) ? tolower(a) : a;
} }
@ -1741,9 +1741,10 @@ register const char * word;
return FALSE; return FALSE;
++word; ++word;
while (*++abbr != '\0') while (*++abbr != '\0')
do if (*word == '\0') do {
return FALSE; if (*word == '\0')
while (lowerit(*word++) != lowerit(*abbr)); return FALSE;
} while (lowerit(*word++) != lowerit(*abbr));
return TRUE; return TRUE;
} }
@ -1789,7 +1790,7 @@ register char * cp;
emalloc((int) ((strlen(cp) + 1) * sizeof *array)); emalloc((int) ((strlen(cp) + 1) * sizeof *array));
nsubs = 0; nsubs = 0;
for ( ; ; ) { for ( ; ; ) {
while (isascii(*cp) && isspace((unsigned char)*cp)) while (isascii(*cp) && isspace((unsigned char) *cp))
++cp; ++cp;
if (*cp == '\0' || *cp == '#') if (*cp == '\0' || *cp == '#')
break; break;
@ -1802,8 +1803,8 @@ register char * cp;
++dp; ++dp;
else error("Odd number of quotation marks"); else error("Odd number of quotation marks");
} while (*cp != '\0' && *cp != '#' && } while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char)*cp))); (!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char)*cp)) if (isascii(*cp) && isspace((unsigned char) *cp))
++cp; ++cp;
*dp = '\0'; *dp = '\0';
} }
@ -1966,7 +1967,7 @@ char * const argname;
/* /*
** DOS drive specifier? ** DOS drive specifier?
*/ */
if (isalpha((unsigned char)name[0]) if (isalpha((unsigned char) name[0])
&& name[1] == ':' && !name[2]) { && name[1] == ':' && !name[2]) {
*cp = '/'; *cp = '/';
continue; continue;