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