From f5ccdfc8e8c55439d77f7211595c6f11d91f32cf Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 7 Nov 2007 22:34:05 +0000 Subject: [PATCH] - Don't include if it's not needed. - Fix strange usage of TABs. svn path=/trunk/; revision=30247 --- reactos/lib/sdk/libcntpr/string/wtol.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/reactos/lib/sdk/libcntpr/string/wtol.c b/reactos/lib/sdk/libcntpr/string/wtol.c index 33f5721b724..9944956384b 100644 --- a/reactos/lib/sdk/libcntpr/string/wtol.c +++ b/reactos/lib/sdk/libcntpr/string/wtol.c @@ -1,6 +1,8 @@ #include -#include -#include +#include +#include + +/* Implementation comes from wine/dlls/ntdll/wcstring.c */ /* * @implemented @@ -8,23 +10,23 @@ long _wtol(const wchar_t *str) { - ULONG RunningTotal = 0; + unsigned long RunningTotal = 0; char bMinus = 0; while (iswctype(*str, _SPACE) ) { - str++; + str++; } /* while */ if (*str == L'+') { - str++; + str++; } else if (*str == L'-') { - bMinus = 1; - str++; + bMinus = 1; + str++; } /* if */ while (*str >= L'0' && *str <= L'9') { - RunningTotal = RunningTotal * 10 + *str - L'0'; - str++; + RunningTotal = RunningTotal * 10 + *str - L'0'; + str++; } /* while */ return bMinus ? -RunningTotal : RunningTotal;