summaryrefslogtreecommitdiff
path: root/com32/include/ctype.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:22 -0700
commit14808d4efa053fccfdbe7d7d7a78d6029798eb66 (patch)
treef4f1708b449c281992b542073ca2f0044ef65b90 /com32/include/ctype.h
parentb71004ef315f6019210d9b25cef2985bd5c6a2e5 (diff)
downloadsyslinux-14808d4efa053fccfdbe7d7d7a78d6029798eb66.tar.gz
Run Nindent on com32/include/ctype.h
Automatically reformat com32/include/ctype.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include/ctype.h')
-rw-r--r--com32/include/ctype.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/com32/include/ctype.h b/com32/include/ctype.h
index 89b6e6dd..28fae9fd 100644
--- a/com32/include/ctype.h
+++ b/com32/include/ctype.h
@@ -22,84 +22,82 @@
* blank = '\t' || ' ' (per POSIX requirement)
*/
enum {
- __ctype_upper = (1 << 0),
- __ctype_lower = (1 << 1),
- __ctype_digit = (1 << 2),
- __ctype_xdigit = (1 << 3),
- __ctype_space = (1 << 4),
- __ctype_print = (1 << 5),
- __ctype_punct = (1 << 6),
- __ctype_cntrl = (1 << 7),
+ __ctype_upper = (1 << 0),
+ __ctype_lower = (1 << 1),
+ __ctype_digit = (1 << 2),
+ __ctype_xdigit = (1 << 3),
+ __ctype_space = (1 << 4),
+ __ctype_print = (1 << 5),
+ __ctype_punct = (1 << 6),
+ __ctype_cntrl = (1 << 7),
};
extern const unsigned char __ctypes[];
__ctype_inline int isalnum(int __c)
{
- return __ctypes[__c+1] &
- (__ctype_upper|__ctype_lower|__ctype_digit);
+ return __ctypes[__c + 1] & (__ctype_upper | __ctype_lower | __ctype_digit);
}
__ctype_inline int isalpha(int __c)
{
- return __ctypes[__c+1] &
- (__ctype_upper|__ctype_lower);
+ return __ctypes[__c + 1] & (__ctype_upper | __ctype_lower);
}
__ctype_inline int isascii(int __c)
{
- return !(__c & ~0x7f);
+ return !(__c & ~0x7f);
}
__ctype_inline int isblank(int __c)
{
- return (__c == '\t') || (__c == ' ');
+ return (__c == '\t') || (__c == ' ');
}
__ctype_inline int iscntrl(int __c)
{
- return __ctypes[__c+1] & __ctype_cntrl;
+ return __ctypes[__c + 1] & __ctype_cntrl;
}
__ctype_inline int isdigit(int __c)
{
- return ((unsigned)__c - '0') <= 9;
+ return ((unsigned)__c - '0') <= 9;
}
__ctype_inline int isgraph(int __c)
{
- return __ctypes[__c+1] &
- (__ctype_upper|__ctype_lower|__ctype_digit|__ctype_punct);
+ return __ctypes[__c + 1] &
+ (__ctype_upper | __ctype_lower | __ctype_digit | __ctype_punct);
}
__ctype_inline int islower(int __c)
{
- return __ctypes[__c+1] & __ctype_lower;
+ return __ctypes[__c + 1] & __ctype_lower;
}
__ctype_inline int isprint(int __c)
{
- return __ctypes[__c+1] & __ctype_print;
+ return __ctypes[__c + 1] & __ctype_print;
}
__ctype_inline int ispunct(int __c)
{
- return __ctypes[__c+1] & __ctype_punct;
+ return __ctypes[__c + 1] & __ctype_punct;
}
__ctype_inline int isspace(int __c)
{
- return __ctypes[__c+1] & __ctype_space;
+ return __ctypes[__c + 1] & __ctype_space;
}
__ctype_inline int isupper(int __c)
{
- return __ctypes[__c+1] & __ctype_upper;
+ return __ctypes[__c + 1] & __ctype_upper;
}
__ctype_inline int isxdigit(int __c)
{
- return __ctypes[__c+1] & __ctype_xdigit;
+ return __ctypes[__c + 1] & __ctype_xdigit;
}
/* Note: this is decimal, not hex, to avoid accidental promotion to unsigned */
@@ -108,12 +106,12 @@ __ctype_inline int isxdigit(int __c)
__ctype_inline int toupper(int __c)
{
- return islower(__c) ? _toupper(__c) : __c;
+ return islower(__c) ? _toupper(__c) : __c;
}
__ctype_inline int tolower(int __c)
{
- return isupper(__c) ? _tolower(__c) : __c;
+ return isupper(__c) ? _tolower(__c) : __c;
}
#endif /* _CTYPE_H */