[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs cptoqe.c cutils.c ligtoqe.c xml.c libqht...
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs cptoqe.c cutils.c ligtoqe.c xml.c libqht... |
Date: |
Thu, 06 Dec 2007 17:59:23 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 07/12/06 17:59:23
Modified files:
. : cptoqe.c cutils.c ligtoqe.c xml.c
libqhtml : xmlparse.c
Log message:
more ctype unsigned char fixes
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/cptoqe.c?cvsroot=qemacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemacs/cutils.c?cvsroot=qemacs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemacs/ligtoqe.c?cvsroot=qemacs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/qemacs/xml.c?cvsroot=qemacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/xmlparse.c?cvsroot=qemacs&r1=1.10&r2=1.11
Patches:
Index: cptoqe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/cptoqe.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- cptoqe.c 6 Dec 2007 17:43:47 -0000 1.7
+++ cptoqe.c 6 Dec 2007 17:59:23 -0000 1.8
@@ -143,7 +143,7 @@
continue;
}
- if (p[0] != '0' || tolower(p[1]) != 'x') {
+ if (p[0] != '0' || tolower((unsigned char)p[1]) != 'x') {
if (!has_iso_name) {
strcpy(iso_name, p);
has_iso_name = 1;
@@ -157,14 +157,14 @@
if (!strcmp(iso_name, p) || !strcmp(alias_list, p))
continue;
- if (!isdigit(*p)) {
+ if (!isdigit((unsigned char)*p)) {
fprintf(stderr, "%s: ignoring line: %s\n", filename, p);
continue;
}
}
c1 = strtol(p, (char **)&p, 16);
- if (!isspace(*p)) {
+ if (!isspace((unsigned char)*p)) {
/* ignore ranges such as "0x20-0x7e idem" */
continue;
}
Index: cutils.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/cutils.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- cutils.c 3 Dec 2007 16:10:38 -0000 1.9
+++ cutils.c 6 Dec 2007 17:59:23 -0000 1.10
@@ -84,9 +84,7 @@
p = str;
q = val;
while (*q != '\0') {
- if (toupper(*(const unsigned char *)p) !=
- toupper(*(const unsigned char *)q))
- {
+ if (toupper((unsigned char)*p) != toupper((unsigned char)*q)) {
if (*p == '-' || *p == '_' || *p == ' ') {
p++;
continue;
@@ -119,9 +117,7 @@
p = str1;
q = str2;
for (;;) {
- if (toupper(*(const unsigned char *)p) !=
- toupper(*(const unsigned char *)q))
- {
+ if (toupper((unsigned char)*p) != toupper((unsigned char)*q)) {
if (*p == '-' || *p == '_' || *p == ' ') {
p++;
continue;
@@ -130,8 +126,8 @@
q++;
continue;
}
- return (toupper(*(const unsigned char *)p) <
- toupper(*(const unsigned char *)q)) ? -1 : +1;
+ return (toupper((unsigned char)*p) <
+ toupper((unsigned char)*q)) ? -1 : +1;
}
if (!*p)
break;
Index: ligtoqe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/ligtoqe.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ligtoqe.c 3 Dec 2007 16:12:40 -0000 1.4
+++ ligtoqe.c 6 Dec 2007 17:59:23 -0000 1.5
@@ -143,7 +143,7 @@
*p = '\0';
p = buf;
- while (isspace(*p))
+ while (isspace((unsigned char)*p))
p++;
if (*p == '#' || *p == '\0') {
@@ -157,7 +157,7 @@
l->buf_in_size = 0;
for (;;) {
- while (isspace(*p))
+ while (isspace((unsigned char)*p))
p++;
if (*p == '=')
break;
@@ -171,7 +171,7 @@
l->buf_out_size = 0;
for (;;) {
- while (isspace(*p))
+ while (isspace((unsigned char)*p))
p++;
/* stop at the first comment */
if (*p == '\0' || *p == '/')
Index: xml.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/xml.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- xml.c 3 Dec 2007 16:10:39 -0000 1.5
+++ xml.c 6 Dec 2007 17:59:23 -0000 1.6
@@ -171,7 +171,7 @@
return 0;
p++;
if (*p != '!' && *p != '?' && *p != '/' &&
- !isalpha(*p))
+ !isalpha((unsigned char)*p))
return 0;
return 90; /* leave some room for more specific XML parser */
}
Index: libqhtml/xmlparse.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/xmlparse.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libqhtml/xmlparse.c 6 Dec 2007 17:43:49 -0000 1.10
+++ libqhtml/xmlparse.c 6 Dec 2007 17:59:23 -0000 1.11
@@ -1048,7 +1048,7 @@
int d;
while (*s2) {
- d = *(const unsigned char *)s2 - tolower(*(const unsigned char *)s1);
+ d = (unsigned char)*s2 - tolower((unsigned char)*s1);
if (d)
return d;
s2++;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs cptoqe.c cutils.c ligtoqe.c xml.c libqht...,
Charlie Gordon <=