summaryrefslogtreecommitdiff
path: root/src/ctype/isascii.c
blob: fc0067d75d4e4c0927537328b325366eafc10f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <ctype.h>

/** test whether a character is in the ASCII range **/

int isascii(int c)
{
	if (0 <= c && c <= 0177) {
		return 1;
	}
	return 0;
}

/***
tests whether ARGUMENT(c) is a 7-bit US-ASCII character.
***/

/*
RETURN(NONZERO, ARGUMENT(c) is between 0 and octal 0177 inclusive)
RETURN(ZERO, ARGUMENT(c) is outside of the ASCII range)
XOBSOLETE(700)
XOPEN(4)
*/