- /* Skip leading zeros but don't allow leading zeros before "0x". */
- for (; s[0]=='0' && s[1]=='0'; s++) skipped=1;
- if (skipped && (base==0 || base==16) && (s[1]|32)=='x') {
- *p = (wchar_t *)(s+1);
- return 0;
- }
-
- /* Convert to normal char string so we can use strtoumax */
- buf[0] = sign;
- if (wcstombs(buf+!!sign, s, sizeof buf-1) == -1) return 0;
- buf[sizeof buf-1]=0;