|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| #define _ALLOW_OLD_VALIDATE_MACROS
|
| #include <corecrt_internal.h>
|
| #include <corecrt_internal_strtox.h>
|
| #include <corecrt_wstdlib.h>
|
| #include <ctype.h>
|
| #include <errno.h>
|
| #include <limits.h>
|
| #include <locale.h>
|
| #include <stdint.h>
|
| #include <stdlib.h>
|
| #include <inttypes.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| extern "C" long __cdecl strtol(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" long __cdecl _strtol_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
| extern "C" unsigned long __cdecl strtoul(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" unsigned long __cdecl _strtoul_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| extern "C" __int64 __cdecl _strtoi64(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<__int64>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" long long __cdecl strtoll(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" intmax_t __cdecl strtoimax(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<intmax_t>(string, end_ptr, base, nullptr);
|
| }
|
|
|
|
|
|
|
| extern "C" __int64 __cdecl _strtoi64_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<__int64>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" long long __cdecl _strtoll_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long long>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" intmax_t __cdecl _strtoimax_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<intmax_t>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
| extern "C" unsigned __int64 __cdecl _strtoui64(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned __int64>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" unsigned long long __cdecl strtoull(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" uintmax_t __cdecl strtoumax(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<uintmax_t>(string, end_ptr, base, nullptr);
|
| }
|
|
|
|
|
|
|
| extern "C" unsigned __int64 __cdecl _strtoui64_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned __int64>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" unsigned long long __cdecl _strtoull_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long long>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" uintmax_t __cdecl _strtoumax_l(
|
| char const* const string,
|
| char** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<uintmax_t>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| extern "C" long __cdecl wcstol(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" long __cdecl _wcstol_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" unsigned long __cdecl wcstoul(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" unsigned long __cdecl _wcstoul_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| extern "C" __int64 __cdecl _wcstoi64(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<__int64>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" long long __cdecl wcstoll(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" intmax_t __cdecl wcstoimax(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<intmax_t>(string, end_ptr, base, nullptr);
|
| }
|
|
|
|
|
|
|
| extern "C" __int64 __cdecl _wcstoi64_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<__int64>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" long long __cdecl _wcstoll_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<long long>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" intmax_t __cdecl _wcstoimax_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<intmax_t>(string, end_ptr, base, locale);
|
| }
|
|
|
|
|
|
|
| extern "C" unsigned __int64 __cdecl _wcstoui64(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned __int64>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" unsigned long long __cdecl wcstoull(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long long>(string, end_ptr, base, nullptr);
|
| }
|
|
|
| extern "C" uintmax_t __cdecl wcstoumax(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<uintmax_t>(string, end_ptr, base, nullptr);
|
| }
|
|
|
|
|
|
|
| extern "C" unsigned __int64 __cdecl _wcstoui64_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned __int64>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" unsigned long long __cdecl _wcstoull_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<unsigned long long>(string, end_ptr, base, locale);
|
| }
|
|
|
| extern "C" uintmax_t __cdecl _wcstoumax_l(
|
| wchar_t const* const string,
|
| wchar_t** const end_ptr,
|
| int const base,
|
| _locale_t const locale
|
| )
|
| {
|
| return __crt_strtox::parse_integer_from_string<uintmax_t>(string, end_ptr, base, locale);
|
| }
|
|
|