summaryrefslogtreecommitdiff
path: root/src/inttypes/strtoimax.c
blob: 488729c7b57db18be0eff1ccd56b5504a25412e6 (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"

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

	intmax_t ret = 0;
	intmax_t max = INTMAX_MAX;
	intmax_t min = INTMAX_MIN;

	#include "stdlib/_strtoi.h"

	return ret;
}

CHECK_3(intmax_t, 0, strtoimax, const char * restrict, char ** restrict, int)

/*
STDC(199901)
*/