You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
702 B
32 lines
702 B
/*
|
|
* Public domain, 2008, Todd C. Miller <Todd.Miller@courtesan.com>
|
|
*
|
|
* $OpenBSD: charclass.h,v 1.1 2008/10/01 23:04:13 millert Exp $
|
|
*/
|
|
|
|
/* OPENBSD ORIGINAL: lib/libc/gen/charclass.h */
|
|
|
|
/*
|
|
* POSIX character class support for fnmatch() and glob().
|
|
*/
|
|
static struct cclass {
|
|
const char *name;
|
|
int (*isctype)(int);
|
|
} cclasses[] = {
|
|
{ "alnum", isalnum },
|
|
{ "alpha", isalpha },
|
|
{ "blank", isblank },
|
|
{ "cntrl", iscntrl },
|
|
{ "digit", isdigit },
|
|
{ "graph", isgraph },
|
|
{ "lower", islower },
|
|
{ "print", isprint },
|
|
{ "punct", ispunct },
|
|
{ "space", isspace },
|
|
{ "upper", isupper },
|
|
{ "xdigit", isxdigit },
|
|
{ NULL, NULL }
|
|
};
|
|
|
|
#define NCCLASSES (sizeof(cclasses) / sizeof(cclasses[0]) - 1)
|