summaryrefslogtreecommitdiff
path: root/src/inttypes/strtoumax.c
blob: 4370ccb0e7e86fe863586392e58f4807e3e570f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stddef.h>
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>
#include <string.h>
#include "_safety.h"

uintmax_t strtoumax(const char *restrict nptr, char ** restrict endptr, int base)
{
	SIGNAL_SAFE(0);
	ASSERT_NOOVERLAP(nptr, strlen(nptr), endptr, sizeof(*endptr));

	uintmax_t ret = 0;
	uintmax_t max = UINTMAX_MAX;
	uintmax_t min = 0;

	#include "stdlib/_strtoi.h"

	return ret;
}

CHECK_3(uintmax_t, 0, strtoumax, const char *restrict, char ** restrict, int)

/*
STDC(199901)
*/