xref: /netbsd-src/lib/libc/gen/isascii.c (revision 9e66e6d75e9910b3de5f4ef031995955f69a7dd1)
1*9e66e6d7Sabs /*	$NetBSD: isascii.c,v 1.4 2012/06/25 22:32:43 abs Exp $	*/
2ecaa1449Skleink 
3ecaa1449Skleink /*
4ecaa1449Skleink  * Copyright (c) 1989 The Regents of the University of California.
5ecaa1449Skleink  * All rights reserved.
6ecaa1449Skleink  * (c) UNIX System Laboratories, Inc.
7ecaa1449Skleink  * All or some portions of this file are derived from material licensed
8ecaa1449Skleink  * to the University of California by American Telephone and Telegraph
9ecaa1449Skleink  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10ecaa1449Skleink  * the permission of UNIX System Laboratories, Inc.
11ecaa1449Skleink  *
12ecaa1449Skleink  * Redistribution and use in source and binary forms, with or without
13ecaa1449Skleink  * modification, are permitted provided that the following conditions
14ecaa1449Skleink  * are met:
15ecaa1449Skleink  * 1. Redistributions of source code must retain the above copyright
16ecaa1449Skleink  *    notice, this list of conditions and the following disclaimer.
17ecaa1449Skleink  * 2. Redistributions in binary form must reproduce the above copyright
18ecaa1449Skleink  *    notice, this list of conditions and the following disclaimer in the
19ecaa1449Skleink  *    documentation and/or other materials provided with the distribution.
20eb7c1594Sagc  * 3. Neither the name of the University nor the names of its contributors
21ecaa1449Skleink  *    may be used to endorse or promote products derived from this software
22ecaa1449Skleink  *    without specific prior written permission.
23ecaa1449Skleink  *
24ecaa1449Skleink  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25ecaa1449Skleink  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26ecaa1449Skleink  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27ecaa1449Skleink  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28ecaa1449Skleink  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29ecaa1449Skleink  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30ecaa1449Skleink  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31ecaa1449Skleink  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32ecaa1449Skleink  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33ecaa1449Skleink  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34ecaa1449Skleink  * SUCH DAMAGE.
35ecaa1449Skleink  *
36ecaa1449Skleink  * 	from:	@(#)isctype.c	5.2 (Berkeley) 6/1/90
37ecaa1449Skleink  */
38ecaa1449Skleink 
39ecaa1449Skleink #include <sys/cdefs.h>
40ecaa1449Skleink #if defined(LIBC_SCCS) && !defined(lint)
41*9e66e6d7Sabs __RCSID("$NetBSD: isascii.c,v 1.4 2012/06/25 22:32:43 abs Exp $");
42ecaa1449Skleink #endif /* LIBC_SCCS and not lint */
43ecaa1449Skleink 
449a35d797Stnozaki #define _CTYPE_NOINLINE
45ecaa1449Skleink #include <ctype.h>
46ecaa1449Skleink 
47ecaa1449Skleink int
isascii(int c)48*9e66e6d7Sabs isascii(int c)
49ecaa1449Skleink {
50ecaa1449Skleink 	return ((unsigned)(c) <= 0177);
51ecaa1449Skleink }
52