Implemented _wtoi and _wtol.

This commit is contained in:
Ove Kaaven 2001-04-16 20:24:47 +00:00 committed by Alexandre Julliard
parent 169e36b9a0
commit 54dfe595ca
2 changed files with 20 additions and 2 deletions

View File

@ -903,6 +903,8 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl _wcslwr(wstr) NTDLL__wcslwr
@ cdecl _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp
@ cdecl _wcsupr(wstr) NTDLL__wcsupr
@ cdecl _wtoi(wstr) _wtoi
@ cdecl _wtol(wstr) _wtol
@ cdecl -noimport abs(long) abs
@ cdecl -noimport atan(double) atan
@ cdecl -noimport atoi(str) atoi
@ -1004,8 +1006,6 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ stub RtlGuidToPropertySetName
@ stub RtlClosePropertySet
@ stub RtlCreatePropertySet
@ stub _wtoi
@ stub _wtol
@ stub RtlSetPropertySetClassId
@ stdcall NtPowerInformation(long long long long long) NtPowerInformation

View File

@ -338,6 +338,24 @@ LPWSTR __cdecl _ultow(ULONG value, LPWSTR string, INT radix)
return string;
}
/*********************************************************************
* _wtol (NTDLL)
* Like atol, but for wide character strings.
*/
LONG __cdecl _wtol(LPWSTR string)
{
char buffer[30];
NTDLL_wcstombs( buffer, string, sizeof(buffer) );
return atol( buffer );
}
/*********************************************************************
* _wtoi (NTDLL)
*/
INT __cdecl _wtoi(LPWSTR string)
{
return _wtol(string);
}
/* INTERNAL: Wide char snprintf
* If you fix a bug in this function, fix it in msvcrt/wcs.c also!