mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
31 lines
700 B
C
31 lines
700 B
C
/*
|
|
* Public domain, 2008, Todd C. Miller <Todd.Miller@courtesan.com>
|
|
*
|
|
* $OpenBSD: charclass.h,v 1.1 2008/10/01 23:04:13 millert Exp $
|
|
*/
|
|
|
|
/*
|
|
* 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)
|