ctype.h revision 732efd5515b5788339f3da4db04de7cea0f79c86
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/* Copyright (c) 1988 AT&T */
2N/A/* All Rights Reserved */
2N/A
2N/A
2N/A/*
2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A/*
2N/A * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2N/A */
2N/A
2N/A#ifndef _CTYPE_H
2N/A#define _CTYPE_H
2N/A
2N/A#include <iso/ctype_iso.h>
2N/A
2N/A/*
2N/A * Allow global visibility for symbols defined in
2N/A * C++ "std" namespace in <iso/ctype_iso.h>.
2N/A */
2N/A#if __cplusplus >= 199711L
2N/Ausing std::isalnum;
2N/Ausing std::isalpha;
2N/Ausing std::iscntrl;
2N/Ausing std::isdigit;
2N/Ausing std::isgraph;
2N/Ausing std::islower;
2N/Ausing std::isprint;
2N/Ausing std::ispunct;
2N/Ausing std::isspace;
2N/Ausing std::isupper;
2N/Ausing std::isxdigit;
2N/Ausing std::tolower;
2N/Ausing std::toupper;
2N/A#if _cplusplus >= 201103L
2N/Ausing std::isblank;
2N/A#endif
2N/A#endif
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#if defined(__STDC__)
2N/A
2N/A#if defined(__EXTENSIONS__) || \
2N/A ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
2N/A defined(_XOPEN_SOURCE))
2N/A
2N/Aextern int isascii(int);
2N/Aextern int toascii(int);
2N/Aextern int _tolower(int);
2N/Aextern int _toupper(int);
2N/A
2N/A#endif /* defined(__EXTENSIONS__) || ((!defined(_STRICT_STDC) ... */
2N/A
2N/A#if !defined(__lint)
2N/A
2N/A#if defined(__EXTENSIONS__) || \
2N/A ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \
2N/A defined(_XOPEN_SOURCE)) || defined(__XPG4_CHAR_CLASS__)
2N/A#define isascii(c) (!(((int)(c)) & ~0177))
2N/A#define toascii(c) (((int)(c)) & 0177)
2N/A#define _toupper(c) (toupper(c))
2N/A#define _tolower(c) (tolower(c))
2N/A
2N/A#endif /* defined(__EXTENSIONS__) || ((!defined(_STRICT_STDC) ... */
2N/A
2N/A#endif /* !defined(__lint) */
2N/A
2N/A#if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
2N/A
2N/A#ifndef _LOCALE_T
2N/A#define _LOCALE_T
2N/Atypedef struct _locale *locale_t;
2N/A#endif
2N/A
2N/Aextern int isalnum_l(int, locale_t);
2N/Aextern int isalpha_l(int, locale_t);
2N/Aextern int isblank_l(int, locale_t);
2N/Aextern int iscntrl_l(int, locale_t);
2N/Aextern int isdigit_l(int, locale_t);
2N/Aextern int isgraph_l(int, locale_t);
2N/Aextern int islower_l(int, locale_t);
2N/Aextern int isprint_l(int, locale_t);
2N/Aextern int ispunct_l(int, locale_t);
2N/Aextern int isspace_l(int, locale_t);
2N/Aextern int isupper_l(int, locale_t);
2N/Aextern int isxdigit_l(int, locale_t);
2N/A
2N/A#endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
2N/A
2N/A#else /* defined(__STDC__) */
2N/A
2N/A#if !defined(__lint)
2N/A
2N/A#define isascii(c) (!(((int)(c)) & ~0177))
2N/A#define _toupper(c) (isascii(c) ? __trans_upper[(int)(c)] : toupper(c))
2N/A#define _tolower(c) (isascii(c) ? __trans_lower[(int)(c)] : tolower(c))
2N/A#define toascii(c) (((int)(c)) & 0177)
2N/A
2N/A#endif /* !defined(__lint) */
2N/A
2N/A#endif /* defined(__STDC__) */
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _CTYPE_H */
2N/A