1
/* Test of isalnum() function.
2
$Id: isalnum-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 <= '9')
31
|| (i >= 'A' && i <= 'Z')
32
|| (i >= 'a' && i <= 'z'))
35
PRINTFLN ("isalnum(%#x) --> false", i);
40
PRINTFLN ("isalnum(%#x) --> true", i);
47
/* Skip the host, as according to C standart it is not safety to use an
48
argument beyound -1..255 value. But Avr-libc's ctype functions permit
53
for (u = 0xffff; u > 0xff; u--)