Welcome to mirror list, hosted at ThFree Co, Russian Federation.

isascii.c « ctype « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 109fd3ace7d66dccaf5882db44981f0b43a21515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
FUNCTION
	<<isascii>>---ASCII character predicate

INDEX
	isascii

ANSI_SYNOPSIS
	#include <ctype.h>
	int isascii(int <[c]>);

TRAD_SYNOPSIS
	#include <ctype.h>
	int isascii(<[c]>);

DESCRIPTION
<<isascii>> is a macro which returns non-zero when <[c]> is an ASCII
character, and 0 otherwise.  It is defined for all integer values.

You can use a compiled subroutine instead of the macro definition by
undefining the macro using `<<#undef isascii>>'.

RETURNS
<<isascii>> returns non-zero if the low order byte of <[c]> is in the range
0 to 127 (<<0x00>>--<<0x7F>>).

PORTABILITY
<<isascii>> is ANSI C.

No supporting OS subroutines are required.
*/
#include <_ansi.h>
#include <ctype.h>



#undef isascii

int 
_DEFUN(isascii,(c),int c)
{
	return c >= 0 && c< 128;
}