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