mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix strtol isspace calls.
This commit is contained in:
parent
1d7c157848
commit
8c0252300e
12 changed files with 14 additions and 2 deletions
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL strtoimax
|
#define STRTOL strtoimax
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT intmax_t
|
#define STRTOL_INT intmax_t
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL strtoumax
|
#define STRTOL strtoumax
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT uintmax_t
|
#define STRTOL_INT uintmax_t
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstoimax
|
#define STRTOL wcstoimax
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT intmax_t
|
#define STRTOL_INT intmax_t
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstoumax
|
#define STRTOL wcstoumax
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT uintmax_t
|
#define STRTOL_INT uintmax_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2013, 2014.
|
Copyright(C) Jonas 'Sortie' Termansen 2011, 2013, 2014, 2015.
|
||||||
|
|
||||||
This file is part of the Sortix C Library.
|
This file is part of the Sortix C Library.
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
#ifndef STRTOL
|
#ifndef STRTOL
|
||||||
#define STRTOL strtol
|
#define STRTOL strtol
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT long
|
#define STRTOL_INT long
|
||||||
|
@ -138,7 +139,7 @@ STRTOL_INT STRTOL(const STRTOL_CHAR* restrict str,
|
||||||
const STRTOL_CHAR* original_str = str;
|
const STRTOL_CHAR* original_str = str;
|
||||||
|
|
||||||
// Skip any leading white space.
|
// Skip any leading white space.
|
||||||
while ( STRTOL_ISSPACE(*str) )
|
while ( STRTOL_ISSPACE((STRTOL_UCHAR) *str) )
|
||||||
str++;
|
str++;
|
||||||
|
|
||||||
bool negative = false;
|
bool negative = false;
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL strtoll
|
#define STRTOL strtoll
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT long long
|
#define STRTOL_INT long long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL strtoul
|
#define STRTOL strtoul
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT unsigned long
|
#define STRTOL_INT unsigned long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL strtoull
|
#define STRTOL strtoull
|
||||||
#define STRTOL_CHAR char
|
#define STRTOL_CHAR char
|
||||||
|
#define STRTOL_UCHAR unsigned char
|
||||||
#define STRTOL_L(x) x
|
#define STRTOL_L(x) x
|
||||||
#define STRTOL_ISSPACE isspace
|
#define STRTOL_ISSPACE isspace
|
||||||
#define STRTOL_INT unsigned long long
|
#define STRTOL_INT unsigned long long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstol
|
#define STRTOL wcstol
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT long
|
#define STRTOL_INT long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstoll
|
#define STRTOL wcstoll
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT long long
|
#define STRTOL_INT long long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstoul
|
#define STRTOL wcstoul
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT unsigned long
|
#define STRTOL_INT unsigned long
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define STRTOL wcstoull
|
#define STRTOL wcstoull
|
||||||
#define STRTOL_CHAR wchar_t
|
#define STRTOL_CHAR wchar_t
|
||||||
|
#define STRTOL_UCHAR wint_t
|
||||||
#define STRTOL_L(x) L##x
|
#define STRTOL_L(x) L##x
|
||||||
#define STRTOL_ISSPACE iswspace
|
#define STRTOL_ISSPACE iswspace
|
||||||
#define STRTOL_INT unsigned long long
|
#define STRTOL_INT unsigned long long
|
||||||
|
|
Loading…
Reference in a new issue