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/include/ctype.h | |
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/include/ctype.h')
-rw-r--r-- | winsup/mingw/include/ctype.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 == '_'));} |