xref: /netbsd-src/external/bsd/unbound/dist/compat/isblank.c (revision 3b6c3722d8f990f9a667d638078aee8ccdc3c0f3)
1*3b6c3722Schristos /* isblank - compatibility implementation of isblank
2*3b6c3722Schristos  *
3*3b6c3722Schristos  * Copyright (c) 2015, NLnet Labs. All rights reserved.
4*3b6c3722Schristos  *
5*3b6c3722Schristos  * This software is open source.
6*3b6c3722Schristos  *
7*3b6c3722Schristos  * Redistribution and use in source and binary forms, with or without
8*3b6c3722Schristos  * modification, are permitted provided that the following conditions
9*3b6c3722Schristos  * are met:
10*3b6c3722Schristos  *
11*3b6c3722Schristos  * Redistributions of source code must retain the above copyright notice,
12*3b6c3722Schristos  * this list of conditions and the following disclaimer.
13*3b6c3722Schristos  *
14*3b6c3722Schristos  * Redistributions in binary form must reproduce the above copyright notice,
15*3b6c3722Schristos  * this list of conditions and the following disclaimer in the documentation
16*3b6c3722Schristos  * and/or other materials provided with the distribution.
17*3b6c3722Schristos  *
18*3b6c3722Schristos  * Neither the name of the NLNET LABS nor the names of its contributors may
19*3b6c3722Schristos  * be used to endorse or promote products derived from this software without
20*3b6c3722Schristos  * specific prior written permission.
21*3b6c3722Schristos  *
22*3b6c3722Schristos  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23*3b6c3722Schristos  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24*3b6c3722Schristos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25*3b6c3722Schristos  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26*3b6c3722Schristos  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27*3b6c3722Schristos  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28*3b6c3722Schristos  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29*3b6c3722Schristos  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30*3b6c3722Schristos  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31*3b6c3722Schristos  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32*3b6c3722Schristos  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33*3b6c3722Schristos  */
34*3b6c3722Schristos 
35*3b6c3722Schristos #include "config.h"
36*3b6c3722Schristos 
37*3b6c3722Schristos /* return true for a blank character: space or tab */
38*3b6c3722Schristos int isblank(int c);
39*3b6c3722Schristos 
40*3b6c3722Schristos /* implementation of isblank. unsigned char is the argument */
41*3b6c3722Schristos int
isblank(int c)42*3b6c3722Schristos isblank(int c)
43*3b6c3722Schristos {
44*3b6c3722Schristos 	return (c==' ' || c=='\t');
45*3b6c3722Schristos }
46