| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Windows Kits/10/Source/10.0.19041.0/ucrt/convert/ |
Upload File : |
//
// atox.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The "simple" string conversion functions: atoi, atol, atoll, and their wide
// string functions.
//
#include <corecrt_internal_strtox.h>
#include <stdlib.h>
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Narrow Strings => Various Integers (Simple Functions, wtox)
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
extern "C" int __cdecl atoi(char const* const string)
{
// Note: We parse as a long to avoid an extra specialization of parse_integer_from_string
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, nullptr);
}
extern "C" int __cdecl _atoi_l(char const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, locale);
}
extern "C" long __cdecl atol(char const* const string)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, nullptr);
}
extern "C" long __cdecl _atol_l(char const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, locale);
}
extern "C" long long __cdecl atoll(char const* const string)
{
return __crt_strtox::parse_integer_from_string<long long>(string, nullptr, 10, nullptr);
}
extern "C" long long __cdecl _atoll_l(char const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long long>(string, nullptr, 10, locale);
}
extern "C" __int64 __cdecl _atoi64(char const* const string)
{
return __crt_strtox::parse_integer_from_string<__int64>(string, nullptr, 10, nullptr);
}
extern "C" __int64 __cdecl _atoi64_l(char const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<__int64>(string, nullptr, 10, locale);
}
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Wide Strings => Various Integers (Simple Functions, wtox)
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
extern "C" int __cdecl _wtoi(wchar_t const* const string)
{
// Note: We parse as a long to avoid an extra specialization of parse_integer_from_string
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, nullptr);
}
extern "C" int __cdecl _wtoi_l(wchar_t const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, locale);
}
extern "C" long __cdecl _wtol(wchar_t const* const string)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, nullptr);
}
extern "C" long __cdecl _wtol_l(wchar_t const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long>(string, nullptr, 10, locale);
}
extern "C" long long __cdecl _wtoll(wchar_t const* const string)
{
return __crt_strtox::parse_integer_from_string<long long>(string, nullptr, 10, nullptr);
}
extern "C" long long __cdecl _wtoll_l(wchar_t const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<long long>(string, nullptr, 10, locale);
}
extern "C" __int64 __cdecl _wtoi64(wchar_t const* const string)
{
return __crt_strtox::parse_integer_from_string<__int64>(string, nullptr, 10, nullptr);
}
extern "C" __int64 __cdecl _wtoi64_l(wchar_t const* const string, _locale_t const locale)
{
return __crt_strtox::parse_integer_from_string<__int64>(string, nullptr, 10, locale);
}