Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/locale/wcstoll.c
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | if (c == L'-') { | ||||
neg = 1; | neg = 1; | ||||
c = *s++; | c = *s++; | ||||
} else { | } else { | ||||
neg = 0; | neg = 0; | ||||
if (c == L'+') | if (c == L'+') | ||||
c = *s++; | c = *s++; | ||||
} | } | ||||
if ((base == 0 || base == 16) && | if ((base == 0 || base == 16) && | ||||
c == L'0' && (*s == L'x' || *s == L'X')) { | c == L'0' && (*s == L'x' || *s == L'X') && | ||||
((s[1] >= L'0' && s[1] <= L'9') || | |||||
(s[1] >= L'A' && s[1] <= L'F') || | |||||
(s[1] >= L'a' && s[1] <= L'f'))) { | |||||
c = s[1]; | c = s[1]; | ||||
s += 2; | s += 2; | ||||
base = 16; | base = 16; | ||||
} | } | ||||
if (base == 0) | if (base == 0) | ||||
base = c == L'0' ? 8 : 10; | base = c == L'0' ? 8 : 10; | ||||
acc = any = 0; | acc = any = 0; | ||||
if (base < 2 || base > 36) | if (base < 2 || base > 36) | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |