Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839#include <string.h>#include <ctype.h>#include <basetsd.h>
/* Implementation comes from wine/dlls/ntdll/wcstring.c */
/* * @implemented */long_wtol(const wchar_t *str){ unsigned long RunningTotal = 0; char bMinus = 0;
if (str == NULL) return 0;
while (iswctype(*str, _SPACE) ) { str++; } /* while */
if (*str == L'+') { str++; } else if (*str == L'-') { bMinus = 1; str++; } /* if */
while (*str >= L'0' && *str <= L'9') { RunningTotal = RunningTotal * 10 + *str - L'0'; str++; } /* while */
return bMinus ? 0-RunningTotal : RunningTotal;}