aboutsummaryrefslogtreecommitdiffstats
path: root/dos/strtoul.c
blob: 3be94307a7f610b5fafe47cfb1e36f40726abdba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * strtoul.c
 *
 * strtoul() function
 */

#include <stddef.h>
#include <inttypes.h>

extern uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n);

unsigned long strtoul(const char *nptr, char **endptr, int base)
{
    return (unsigned long) strntoumax(nptr, endptr, base, ~(size_t) 0);
}