diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2003-01-08 00:05:13 +0300 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2003-01-08 00:05:13 +0300 |
commit | 68dea338192334c0b61dec2e910e1584ef08522f (patch) | |
tree | 4666190d5062eda4086c4c2e8aee8fdb35c57e88 /winsup/mingw | |
parent | be9c60e52e24c28e5d76eb7790e3ce76d6400e1d (diff) |
* 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
Diffstat (limited to 'winsup/mingw')
-rw-r--r-- | winsup/mingw/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/mingw/include/ctype.h | 4 | ||||
-rw-r--r-- | winsup/mingw/include/wctype.h | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 269dbe98f..4b8fb8924 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 3e553cc5c..fcbb31d77 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 f39ef6496..858981b69 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));} |