summaryrefslogtreecommitdiff
path: root/lib/libc/ctype/isdigit.c
blob: c33dc1b927ceb35d5fcb270c0d0e915a1347f61d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <ctype.h>     // for isdigit, isdigit_l, locale_t
#include <sys/cdefs.h> // for __unused, __weak

int isdigit(int c)
{
	return (unsigned)c - '0' < 10;
}

__weak int isdigit_l(int c, locale_t __unused locale)
{
	return isdigit(c);
}