1*84d9c625SLionel Sambuc /* $NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $ */ 22fe8fb19SBen Gras 32fe8fb19SBen Gras /* 42fe8fb19SBen Gras * Copyright (c) 1989 The Regents of the University of California. 52fe8fb19SBen Gras * All rights reserved. 62fe8fb19SBen Gras * (c) UNIX System Laboratories, Inc. 72fe8fb19SBen Gras * All or some portions of this file are derived from material licensed 82fe8fb19SBen Gras * to the University of California by American Telephone and Telegraph 92fe8fb19SBen Gras * Co. or Unix System Laboratories, Inc. and are reproduced herein with 102fe8fb19SBen Gras * the permission of UNIX System Laboratories, Inc. 112fe8fb19SBen Gras * 122fe8fb19SBen Gras * Redistribution and use in source and binary forms, with or without 132fe8fb19SBen Gras * modification, are permitted provided that the following conditions 142fe8fb19SBen Gras * are met: 152fe8fb19SBen Gras * 1. Redistributions of source code must retain the above copyright 162fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer. 172fe8fb19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 182fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer in the 192fe8fb19SBen Gras * documentation and/or other materials provided with the distribution. 202fe8fb19SBen Gras * 3. Neither the name of the University nor the names of its contributors 212fe8fb19SBen Gras * may be used to endorse or promote products derived from this software 222fe8fb19SBen Gras * without specific prior written permission. 232fe8fb19SBen Gras * 242fe8fb19SBen Gras * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 252fe8fb19SBen Gras * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 262fe8fb19SBen Gras * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 272fe8fb19SBen Gras * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 282fe8fb19SBen Gras * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 292fe8fb19SBen Gras * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 302fe8fb19SBen Gras * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 312fe8fb19SBen Gras * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 322fe8fb19SBen Gras * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 332fe8fb19SBen Gras * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 342fe8fb19SBen Gras * SUCH DAMAGE. 352fe8fb19SBen Gras * 362fe8fb19SBen Gras * @(#)ctype.h 5.3 (Berkeley) 4/3/91 379865aeaaSBen Gras */ 389865aeaaSBen Gras 392fe8fb19SBen Gras #ifndef _CTYPE_H_ 402fe8fb19SBen Gras #define _CTYPE_H_ 419865aeaaSBen Gras 422fe8fb19SBen Gras #include <sys/cdefs.h> 432fe8fb19SBen Gras #include <sys/featuretest.h> 449865aeaaSBen Gras 452fe8fb19SBen Gras __BEGIN_DECLS 462fe8fb19SBen Gras int isalnum(int); 472fe8fb19SBen Gras int isalpha(int); 482fe8fb19SBen Gras int iscntrl(int); 492fe8fb19SBen Gras int isdigit(int); 502fe8fb19SBen Gras int isgraph(int); 512fe8fb19SBen Gras int islower(int); 522fe8fb19SBen Gras int isprint(int); 532fe8fb19SBen Gras int ispunct(int); 542fe8fb19SBen Gras int isspace(int); 552fe8fb19SBen Gras int isupper(int); 562fe8fb19SBen Gras int isxdigit(int); 572fe8fb19SBen Gras int tolower(int); 582fe8fb19SBen Gras int toupper(int); 599865aeaaSBen Gras 60*84d9c625SLionel Sambuc #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) 61*84d9c625SLionel Sambuc # ifndef __LOCALE_T_DECLARED 62*84d9c625SLionel Sambuc typedef struct _locale *locale_t; 63*84d9c625SLionel Sambuc # define __LOCALE_T_DECLARED 64*84d9c625SLionel Sambuc # endif 65*84d9c625SLionel Sambuc 66*84d9c625SLionel Sambuc int isalnum_l(int, locale_t); 67*84d9c625SLionel Sambuc int isalpha_l(int, locale_t); 68*84d9c625SLionel Sambuc int isblank_l(int, locale_t); 69*84d9c625SLionel Sambuc int iscntrl_l(int, locale_t); 70*84d9c625SLionel Sambuc int isdigit_l(int, locale_t); 71*84d9c625SLionel Sambuc int isgraph_l(int, locale_t); 72*84d9c625SLionel Sambuc int islower_l(int, locale_t); 73*84d9c625SLionel Sambuc int isprint_l(int, locale_t); 74*84d9c625SLionel Sambuc int ispunct_l(int, locale_t); 75*84d9c625SLionel Sambuc int isspace_l(int, locale_t); 76*84d9c625SLionel Sambuc int isupper_l(int, locale_t); 77*84d9c625SLionel Sambuc int isxdigit_l(int, locale_t); 78*84d9c625SLionel Sambuc int tolower_l(int, locale_t); 79*84d9c625SLionel Sambuc int toupper_l(int, locale_t); 80*84d9c625SLionel Sambuc #endif 81*84d9c625SLionel Sambuc 822fe8fb19SBen Gras #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) 832fe8fb19SBen Gras int isascii(int); 842fe8fb19SBen Gras int toascii(int); 852fe8fb19SBen Gras int _tolower(int); 862fe8fb19SBen Gras int _toupper(int); 872fe8fb19SBen Gras #endif 889865aeaaSBen Gras 892fe8fb19SBen Gras #if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \ 902fe8fb19SBen Gras (_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE) 912fe8fb19SBen Gras int isblank(int); 922fe8fb19SBen Gras #endif 932fe8fb19SBen Gras __END_DECLS 949865aeaaSBen Gras 95*84d9c625SLionel Sambuc #if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \ 96*84d9c625SLionel Sambuc !defined(__cplusplus) 972fe8fb19SBen Gras #include <sys/ctype_inline.h> 98*84d9c625SLionel Sambuc #else 99*84d9c625SLionel Sambuc #include <sys/ctype_bits.h> 1002fe8fb19SBen Gras #endif 1019865aeaaSBen Gras 1022fe8fb19SBen Gras #endif /* !_CTYPE_H_ */ 103