From 13c11e365a2eb06b70657e335dc97f98a16651c1 Mon Sep 17 00:00:00 2001 From: Arthur David Olson Date: Mon, 30 Oct 1995 10:23:45 -0500 Subject: [PATCH] slight reformatting SCCS-file: zic.c SCCS-SID: 7.55 --- zic.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/zic.c b/zic.c index dbefdbd..37b0036 100644 --- a/zic.c +++ b/zic.c @@ -13,7 +13,7 @@ static char elsieid[] = "%W%"; /* ** On some ancient hosts, predicates like `isspace(C)' are defined ** 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. ** For portability, we check both ancient and modern requirements. ** If isascii is not defined, the isascii check succeeds trivially. @@ -1717,7 +1717,7 @@ static int lowerit(a) int a; { - a = (unsigned char)a; + a = (unsigned char) a; return (isascii(a) && isupper(a)) ? tolower(a) : a; } @@ -1741,9 +1741,10 @@ register const char * word; return FALSE; ++word; while (*++abbr != '\0') - do if (*word == '\0') - return FALSE; - while (lowerit(*word++) != lowerit(*abbr)); + do { + if (*word == '\0') + return FALSE; + } while (lowerit(*word++) != lowerit(*abbr)); return TRUE; } @@ -1789,7 +1790,7 @@ register char * cp; emalloc((int) ((strlen(cp) + 1) * sizeof *array)); nsubs = 0; for ( ; ; ) { - while (isascii(*cp) && isspace((unsigned char)*cp)) + while (isascii(*cp) && isspace((unsigned char) *cp)) ++cp; if (*cp == '\0' || *cp == '#') break; @@ -1802,8 +1803,8 @@ register char * cp; ++dp; else error("Odd number of quotation marks"); } while (*cp != '\0' && *cp != '#' && - (!isascii(*cp) || !isspace((unsigned char)*cp))); - if (isascii(*cp) && isspace((unsigned char)*cp)) + (!isascii(*cp) || !isspace((unsigned char) *cp))); + if (isascii(*cp) && isspace((unsigned char) *cp)) ++cp; *dp = '\0'; } @@ -1966,7 +1967,7 @@ char * const argname; /* ** DOS drive specifier? */ - if (isalpha((unsigned char)name[0]) + if (isalpha((unsigned char) name[0]) && name[1] == ':' && !name[2]) { *cp = '/'; continue;