1 --- wcstoll.c.orig Tue May 20 15:21:45 2003
2 +++ wcstoll.c Fri Feb 18 14:54:25 2005
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wcstoll.c,v 1.1 2002/09/22 08:06:45 tjr Exp $");
7 +#include "xlocale_private.h"
13 * Convert a wide character string to a long long integer.
16 -wcstoll(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base)
17 +wcstoll_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr,
18 + int base, locale_t loc)
21 unsigned long long acc;
23 unsigned long long cutoff;
26 + NORMALIZE_LOCALE(loc);
28 * See strtoll for comments as to the logic used.
33 - } while (iswspace(c));
34 + } while (iswspace_l(c, loc));
44 + if (iswdigit_l(c, loc))
45 + c = digittoint_l(c, loc);
48 if (c >= L'0' && c <= L'9')
51 *endptr = (wchar_t *)(any ? s - 1 : nptr);
56 +wcstoll(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base)
58 + return wcstoll_l(nptr, endptr, base, __current_locale());