aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2003-01-07 21:05:13 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2003-01-07 21:05:13 +0000
commit68dea338192334c0b61dec2e910e1584ef08522f (patch)
tree4666190d5062eda4086c4c2e8aee8fdb35c57e88
parentbe9c60e52e24c28e5d76eb7790e3ce76d6400e1d (diff)
downloadnewlib-68dea338192334c0b61dec2e910e1584ef08522f.zip
newlib-68dea338192334c0b61dec2e910e1584ef08522f.tar.gz
newlib-68dea338192334c0b61dec2e910e1584ef08522f.tar.bz2
* include/ctype.h (__isascii): Don't cast arg to unsigned.
(iswascii): Likewise. Correct mask. * include/wctype.h (iswascii): Don't cast arg to unsigned. Correct mask
-rw-r--r--winsup/mingw/ChangeLog7
-rw-r--r--winsup/mingw/include/ctype.h4
-rw-r--r--winsup/mingw/include/wctype.h2
3 files changed, 10 insertions, 3 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 269dbe9..4b8fb89 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-07 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/ctype.h (__isascii): Don't cast arg to unsigned.
+ (iswascii): Likewise. Correct mask.
+ * include/wctype.h (iswascii): Don't cast arg to unsigned.
+ Correct mask
+
2003-01-03 Danny Smith <dannysmith@users.sourceforge.net>
* include/stdlib.h (_osver, _winver, _winmajor,
diff --git a/winsup/mingw/include/ctype.h b/winsup/mingw/include/ctype.h
index 3e553cc..fcbb31d 100644
--- a/winsup/mingw/include/ctype.h
+++ b/winsup/mingw/include/ctype.h
@@ -212,7 +212,7 @@ int isleadbyte (int);
#define __WCTYPE_INLINES_DEFINED
extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
-extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
+extern __inline__ int iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
@@ -232,7 +232,7 @@ int __iscsymf (int); /* Valid first character in C symbol */
int __iscsym (int); /* Valid character in C symbol (after first) */
#ifndef __NO_CTYPE_INLINES
-extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
+extern __inline__ int __isascii(int c) {return ((c & ~0x7F) == 0);}
extern __inline__ int __toascii(int c) {return (c & 0x7F);}
extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
diff --git a/winsup/mingw/include/wctype.h b/winsup/mingw/include/wctype.h
index f39ef64..858981b 100644
--- a/winsup/mingw/include/wctype.h
+++ b/winsup/mingw/include/wctype.h
@@ -112,7 +112,7 @@ extern unsigned short** _imp___ctype;
#define __WCTYPE_INLINES_DEFINED
extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
-extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
+extern __inline__ int iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}