1
/* $Id: strlwr.c,v 1.1 2007/03/01 13:10:55 dmix Exp $ */
11
#ifndef __AVR__ /* strlwr() is't a standart function */
12
char * strlwr (char *s)
23
void Check (int line, const char *s, const char *expect)
29
if (strlen_P(s) > sizeof(t) - 1)
35
else if (strcmp_P (t, expect))
40
printf ("\nLine %d: expect: \"%s\""
41
"\n result: \"%s\"\n",
43
if (code > 255) code = 255;
50
#define CHECK(s, expect) do { \
51
Check (__LINE__, PSTR(s), PSTR(expect)); \
61
CHECK ("@[", "@["); /* '@'=='A'-1, '['=='Z'+1 */
62
CHECK ("`az{", "`az{"); /* '`'=='a'-1, '{'=='z'+1 */
64
CHECK ("QWERTYUIOPASDFGHJKLZXCVBNM", "qwertyuiopasdfghjklzxcvbnm");
68
CHECK ("\001A\177\200\201B\377", "\001a\177\200\201b\377");