1
/* Test of isascii() function.
2
$Id: isascii-1.c,v 1.1.2.1 2008/03/20 21:42:37 joerg_wunsch Exp $
10
# define PRINTFLN(fmt, ...) \
11
printf ("\nLine %d: " fmt "\n", __LINE__, ##__VA_ARGS__)
12
# define EXIT(code) exit ((code) < 255 ? (code) : 100 + (code) % 100)
14
# if defined(__AVR_ATmega128__)
15
/* ATmega128 has enough RAM for sprintf(), print to 0x2000 in XRAM. */
16
# define PRINTFLN(fmt, ...) \
17
sprintf ((char *)0x2000, "\nLine %d: " fmt "\n", __LINE__, ##__VA_ARGS__)
20
# define PRINTFLN(args...)
29
for (i = -1; i < 256; i++) {
30
if (i >= 0 && i < 0x80) {
32
PRINTFLN ("isascii(%#x) --> false", i);
37
PRINTFLN ("isascii(%#x) --> true", i);
44
/* Skip the host, as according to C standart it is not safety to use an
45
argument beyound -1..255 value. But Avr-libc's ctype functions permit
50
for (u = 0xffff; u > 0xff; u--)