string.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 2004 Tobias Lorenz
*
* string handling functions
*
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ETHERBOOT_STRING_H
#define ETHERBOOT_STRING_H
/* *** FROM ctype.h *** */
#define isdigit(c) ((c & 0x04) != 0)
#define islower(c) ((c & 0x02) != 0)
//#define isspace(c) ((c & 0x20) != 0)
#define isupper(c) ((c & 0x01) != 0)
static inline unsigned char tolower(unsigned char c)
{
if (isupper(c))
c -= 'A'-'a';
return c;
}
static inline unsigned char toupper(unsigned char c)
{
if (islower(c))
c -= 'a'-'A';
return c;
}
/* *** FROM string.h *** */
char * strchr(const char * s, int c);
char * strrchr(const char * s, int c);
#endif /* ETHERBOOT_STRING */