fxlibc/src/libc/stdlib/strtoull.c
Lephenixnoir 3a9a60db78
stdlib: formatting on the strto* functions
* Name the private function __strto_{int,fp} (with leading double
  underscores) to avoid name conflicts
* Fix comments of the wrong style
* Fix missing leading double underscores in stdlib_p.h
2021-05-24 10:07:48 +02:00

11 lines
278 B
C

#include "stdlib_p.h"
#include <errno.h>
unsigned long long int strtoull(char const * restrict ptr,
char ** restrict endptr, int base)
{
unsigned long long n = 0;
int err = __strto_int(ptr, endptr, base, NULL, (long long *)&n, true);
if(err != 0) errno = err;
return n;
}