Print this page
remove support for non-ANSI compilation


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*


  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 /*
  31  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  32  */
  33 
  34 #ifndef _CTYPE_H
  35 #define _CTYPE_H
  36 
  37 #include <iso/ctype_iso.h>
  38 
  39 /*
  40  * Allow global visibility for symbols defined in
  41  * C++ "std" namespace in <iso/ctype_iso.h>.
  42  */
  43 #if __cplusplus >= 199711L
  44 using std::isalnum;
  45 using std::isalpha;
  46 using std::iscntrl;
  47 using std::isdigit;
  48 using std::isgraph;
  49 using std::islower;
  50 using std::isprint;
  51 using std::ispunct;
  52 using std::isspace;
  53 using std::isupper;
  54 using std::isxdigit;
  55 using std::tolower;
  56 using std::toupper;
  57 #if _cplusplus >= 201103L
  58 using std::isblank;
  59 #endif
  60 #endif
  61 
  62 #ifdef  __cplusplus
  63 extern "C" {
  64 #endif
  65 
  66 #if defined(__STDC__)
  67 
  68 #if defined(__EXTENSIONS__) || \
  69         ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
  70         defined(_XOPEN_SOURCE))
  71 
  72 extern int isascii(int);
  73 extern int toascii(int);
  74 extern int _tolower(int);
  75 extern int _toupper(int);
  76 
  77 #endif /* defined(__EXTENSIONS__) || ((!defined(_STRICT_STDC) ... */
  78 
  79 #if !defined(__lint)
  80 
  81 #if defined(__EXTENSIONS__) || \
  82         ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
  83         defined(_XOPEN_SOURCE)) || defined(__XPG4_CHAR_CLASS__)
  84 #define isascii(c)      (!(((int)(c)) & ~0177))
  85 #define toascii(c)      (((int)(c)) & 0177)
  86 #define _toupper(c)     (toupper(c))
  87 #define _tolower(c)     (tolower(c))


  95 #ifndef _LOCALE_T
  96 #define _LOCALE_T
  97 typedef struct _locale *locale_t;
  98 #endif
  99 
 100 extern int isalnum_l(int, locale_t);
 101 extern int isalpha_l(int, locale_t);
 102 extern int isblank_l(int, locale_t);
 103 extern int iscntrl_l(int, locale_t);
 104 extern int isdigit_l(int, locale_t);
 105 extern int isgraph_l(int, locale_t);
 106 extern int islower_l(int, locale_t);
 107 extern int isprint_l(int, locale_t);
 108 extern int ispunct_l(int, locale_t);
 109 extern int isspace_l(int, locale_t);
 110 extern int isupper_l(int, locale_t);
 111 extern int isxdigit_l(int, locale_t);
 112 
 113 #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
 114 
 115 #else   /* defined(__STDC__) */
 116 
 117 #if !defined(__lint)
 118 
 119 #define isascii(c)      (!(((int)(c)) & ~0177))
 120 #define _toupper(c)     (isascii(c) ? __trans_upper[(int)(c)] : toupper(c))
 121 #define _tolower(c)     (isascii(c) ? __trans_lower[(int)(c)] : tolower(c))
 122 #define toascii(c)      (((int)(c)) & 0177)
 123 
 124 #endif  /* !defined(__lint) */
 125 
 126 #endif  /* defined(__STDC__) */
 127 
 128 #ifdef  __cplusplus
 129 }
 130 #endif
 131 
 132 #endif  /* _CTYPE_H */


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  28  *
  29  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  30  * Use is subject to license terms.
  31  */



  32 
  33 #ifndef _CTYPE_H
  34 #define _CTYPE_H
  35 
  36 #include <iso/ctype_iso.h>
  37 
  38 /*
  39  * Allow global visibility for symbols defined in
  40  * C++ "std" namespace in <iso/ctype_iso.h>.
  41  */
  42 #if __cplusplus >= 199711L
  43 using std::isalnum;
  44 using std::isalpha;
  45 using std::iscntrl;
  46 using std::isdigit;
  47 using std::isgraph;
  48 using std::islower;
  49 using std::isprint;
  50 using std::ispunct;
  51 using std::isspace;
  52 using std::isupper;
  53 using std::isxdigit;
  54 using std::tolower;
  55 using std::toupper;
  56 #if _cplusplus >= 201103L
  57 using std::isblank;
  58 #endif
  59 #endif
  60 
  61 #ifdef  __cplusplus
  62 extern "C" {
  63 #endif
  64 


  65 #if defined(__EXTENSIONS__) || \
  66         ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
  67         defined(_XOPEN_SOURCE))
  68 
  69 extern int isascii(int);
  70 extern int toascii(int);
  71 extern int _tolower(int);
  72 extern int _toupper(int);
  73 
  74 #endif /* defined(__EXTENSIONS__) || ((!defined(_STRICT_STDC) ... */
  75 
  76 #if !defined(__lint)
  77 
  78 #if defined(__EXTENSIONS__) || \
  79         ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
  80         defined(_XOPEN_SOURCE)) || defined(__XPG4_CHAR_CLASS__)
  81 #define isascii(c)      (!(((int)(c)) & ~0177))
  82 #define toascii(c)      (((int)(c)) & 0177)
  83 #define _toupper(c)     (toupper(c))
  84 #define _tolower(c)     (tolower(c))


  92 #ifndef _LOCALE_T
  93 #define _LOCALE_T
  94 typedef struct _locale *locale_t;
  95 #endif
  96 
  97 extern int isalnum_l(int, locale_t);
  98 extern int isalpha_l(int, locale_t);
  99 extern int isblank_l(int, locale_t);
 100 extern int iscntrl_l(int, locale_t);
 101 extern int isdigit_l(int, locale_t);
 102 extern int isgraph_l(int, locale_t);
 103 extern int islower_l(int, locale_t);
 104 extern int isprint_l(int, locale_t);
 105 extern int ispunct_l(int, locale_t);
 106 extern int isspace_l(int, locale_t);
 107 extern int isupper_l(int, locale_t);
 108 extern int isxdigit_l(int, locale_t);
 109 
 110 #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
 111 













 112 #ifdef  __cplusplus
 113 }
 114 #endif
 115 
 116 #endif  /* _CTYPE_H */