aboutsummaryrefslogtreecommitdiff
path: root/ctype
diff options
context:
space:
mode:
Diffstat (limited to 'ctype')
-rw-r--r--ctype/ctype.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/ctype/ctype.h b/ctype/ctype.h
index 922f5b38c8..37e2cbeb35 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -37,12 +37,12 @@ __BEGIN_DECLS
endian). We define the bit value interpretations here dependent on the
machine's byte order. */
-#include <endian.h>
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define _ISbit(bit) (1 << bit)
-#else /* __BYTE_ORDER == __LITTLE_ENDIAN */
-#define _ISbit(bit) (bit < 8 ? ((1 << bit) << 8) : ((1 << bit) >> 8))
-#endif
+# include <endian.h>
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define _ISbit(bit) (1 << bit)
+# else /* __BYTE_ORDER == __LITTLE_ENDIAN */
+# define _ISbit(bit) (bit < 8 ? ((1 << bit) << 8) : ((1 << bit) >> 8))
+# endif
enum
{
@@ -115,7 +115,7 @@ extern int tolower __P ((int __c));
extern int toupper __P ((int __c));
-#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN)
+#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
/* Return nonzero iff C is in the ASCII set
(i.e., is no more than 7 bits wide). */
@@ -127,35 +127,35 @@ extern int toascii __P ((int __c));
#endif /* Use SVID or use misc. */
-#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN)
+#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
/* These are the same as `toupper' and `tolower'. */
__exctype (_toupper);
__exctype (_tolower);
#endif
#ifndef __NO_CTYPE
-#define isalnum(c) __isctype((c), _ISalnum)
-#define isalpha(c) __isctype((c), _ISalpha)
-#define iscntrl(c) __isctype((c), _IScntrl)
-#define isdigit(c) __isctype((c), _ISdigit)
-#define islower(c) __isctype((c), _ISlower)
-#define isgraph(c) __isctype((c), _ISgraph)
-#define isprint(c) __isctype((c), _ISprint)
-#define ispunct(c) __isctype((c), _ISpunct)
-#define isspace(c) __isctype((c), _ISspace)
-#define isupper(c) __isctype((c), _ISupper)
-#define isxdigit(c) __isctype((c), _ISxdigit)
+# define isalnum(c) __isctype((c), _ISalnum)
+# define isalpha(c) __isctype((c), _ISalpha)
+# define iscntrl(c) __isctype((c), _IScntrl)
+# define isdigit(c) __isctype((c), _ISdigit)
+# define islower(c) __isctype((c), _ISlower)
+# define isgraph(c) __isctype((c), _ISgraph)
+# define isprint(c) __isctype((c), _ISprint)
+# define ispunct(c) __isctype((c), _ISpunct)
+# define isspace(c) __isctype((c), _ISspace)
+# define isupper(c) __isctype((c), _ISupper)
+# define isxdigit(c) __isctype((c), _ISxdigit)
#ifdef __USE_GNU
-#define isblank(c) __isctype((c), _ISblank)
+# define isblank(c) __isctype((c), _ISblank)
#endif
#define tolower(c) __tolower(c)
#define toupper(c) __toupper(c)
-#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN)
-#define isascii(c) __isascii(c)
-#define toascii(c) __toascii(c)
+#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+# define isascii(c) __isascii(c)
+# define toascii(c) __toascii(c)
#endif
#endif /* Not __NO_CTYPE. */
@@ -179,13 +179,13 @@ __exctype (_tolower);
/* These definitions are similar to the ones above but all functions
take as an argument a handle for the locale which shall be used. */
-#define __isctype_l(c, type, locale) \
+# define __isctype_l(c, type, locale) \
((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
-#define __tolower_l(c, locale) ((int) (locale)->__ctype_tolower[(int) (c)])
-#define __toupper_l(c, locale) ((int) (locale)->__ctype_toupper[(int) (c)])
+# define __tolower_l(c, locale) ((int) (locale)->__ctype_tolower[(int) (c)])
+# define __toupper_l(c, locale) ((int) (locale)->__ctype_toupper[(int) (c)])
-#define __exctype_l(name) extern int name __P ((int, __locale_t))
+# define __exctype_l(name) extern int name __P ((int, __locale_t))
/* The following names are all functions:
int isCHARACTERISTIC(int c, locale_t *locale);
@@ -213,27 +213,27 @@ extern int __tolower_l __P ((int __c, __locale_t __l));
extern int __toupper_l __P ((int __c, __locale_t __l));
-#ifndef __NO_CTYPE
-#define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
-#define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
-#define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
-#define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
-#define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
-#define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
-#define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
-#define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
-#define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
-#define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
-#define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
-
-#define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
-
-#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN)
-#define __isascii_l(c,l) __isascii(c)
-#define __toascii_l(c,l) __toascii(c)
-#endif
+# ifndef __NO_CTYPE
+# define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
+# define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
+# define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
+# define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
+# define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
+# define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
+# define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
+# define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
+# define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
+# define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
+# define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
-#endif /* Not __NO_CTYPE. */
+# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
+
+# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+# define __isascii_l(c,l) __isascii(c)
+# define __toascii_l(c,l) __toascii(c)
+# endif
+
+# endif /* Not __NO_CTYPE. */
#endif /* Use GNU. */