This commit is contained in:
Igor Pavlov 2022-06-20 00:00:00 +00:00
parent f19f813537
commit a3e1d22737
211 changed files with 15242 additions and 2443 deletions

View file

@ -26,6 +26,33 @@ CONVERT_STRING_TO_UINT_FUNC(UInt32, wchar_t, wchar_t)
CONVERT_STRING_TO_UINT_FUNC(UInt64, char, Byte)
CONVERT_STRING_TO_UINT_FUNC(UInt64, wchar_t, wchar_t)
/*
Int32 ConvertStringToInt32(const char *s, const char **end) throw()
{
if (end)
*end = s;
const char *s2 = s;
if (*s == '-')
s2++;
if (*s2 == 0)
return 0;
const char *end2;
UInt32 res = ConvertStringToUInt32(s2, &end2);
if (*s == '-')
{
if (res > ((UInt32)1 << (32 - 1)))
return 0;
}
else if ((res & ((UInt32)1 << (32 - 1))) != 0)
return 0;
if (end)
*end = end2;
if (*s == '-')
return -(Int32)res;
return (Int32)res;
}
*/
Int32 ConvertStringToInt32(const wchar_t *s, const wchar_t **end) throw()
{
if (end)