about summary refs log tree commit diff stats
path: root/src/chrtrans
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2000-10-25 18:35:30 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2000-10-25 18:35:30 -0400
commit5b28849589e7577a222685852b8601a1e7568726 (patch)
treecce74bbe5bf3c32f82c79a94c22eb29ca458c6ee /src/chrtrans
parentc16270eee5ad3c6a3b992a9684ff8bd60e60de96 (diff)
downloadlynx-snapshots-5b28849589e7577a222685852b8601a1e7568726.tar.gz
snapshot of project "lynx", label v2-8-4dev_12
Diffstat (limited to 'src/chrtrans')
-rw-r--r--src/chrtrans/makeuctb.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c
index 14d0dd54..611e737d 100644
--- a/src/chrtrans/makeuctb.c
+++ b/src/chrtrans/makeuctb.c
@@ -26,11 +26,11 @@
 #endif /* exit */
 
 #ifndef TOUPPER
-#define TOUPPER(c) (islower((unsigned char)c) ? toupper((unsigned char)c) : (c))
+#define TOUPPER(c) (islower(UCH(c)) ? toupper(UCH(c)) : (c))
 #endif /* !TOLOWER */
 
 #ifndef TOLOWER
-#define TOLOWER(c) (isupper((unsigned char)c) ? tolower((unsigned char)c) : (c))
+#define TOLOWER(c) (isupper(UCH(c)) ? tolower(UCH(c)) : (c))
 #endif /* !TOLOWER */
 
 #include <UCkd.h>
@@ -112,8 +112,11 @@ PRIVATE int getunicode ARGS1(
     if (*p == '-') {
 	return -2;
     } else if (*p != 'U' || p[1] != '+' ||
-	       !isxdigit(p[2]) || !isxdigit(p[3]) || !isxdigit(p[4]) ||
-	       !isxdigit(p[5]) || isxdigit(p[6])) {
+	       !isxdigit(UCH(p[2])) ||
+	       !isxdigit(UCH(p[3])) ||
+	       !isxdigit(UCH(p[4])) ||
+	       !isxdigit(UCH(p[5])) ||
+	        isxdigit(UCH(p[6]))) {
 	return -1;
     }
     *p0 = p+6;
@@ -559,9 +562,9 @@ PUBLIC int main ARGS2(
 		 *  We had ':'.
 		 */
 		for (ch = *(++p); (ch = *p) != '\0'; p++, p1++) {
-		    if ((unsigned char)ch < 32 || ch == '\\' || ch == '\"' ||
-			(unsigned char)ch >= 127) {
-			sprintf(p1, "\\%.3o", (unsigned char)ch);
+		    if (UCH(ch) < 32 || ch == '\\' || ch == '\"' ||
+			UCH(ch) >= 127) {
+			sprintf(p1, "\\%.3o", UCH(ch));
 #ifdef NOTDEFINED
 			fprintf(stderr, "%s\n", tbuf);
 #endif /* NOTDEFINED */
@@ -763,7 +766,7 @@ PUBLIC int main ARGS2(
 	for (i = 0, p = this_MIMEcharset;
 	     *p && (i < UC_MAXLEN_ID_APPEND-1);
 	     p++, i++) {
-	    id_append[i+1] = isalnum(*p) ? *p : '_';
+	    id_append[i+1] = isalnum(UCH(*p)) ? *p : '_';
 	}
 	id_append[i+1] = '\0';
     }