Recognize 'd', 't' and 'y' as radix suffixes

'd', 't' and 'y' now recognized as radix suffixes.
This commit is contained in:
H. Peter Anvin 2007-10-15 20:06:06 -07:00
parent 826ffa9c8e
commit b2f6fef421

View File

@ -237,8 +237,10 @@ int64_t readnum(char *str, bool *error)
radix = 16, q--;
else if (q[-1] == 'Q' || q[-1] == 'q' || q[-1] == 'O' || q[-1] == 'o')
radix = 8, q--;
else if (q[-1] == 'B' || q[-1] == 'b')
else if (q[-1] == 'B' || q[-1] == 'b' || q[-1] == 'Y' || q[-1] == 'y')
radix = 2, q--;
else if (q[-1] == 'D' || q[-1] == 'd' || q[-1] == 'T' || q[-1] == 't')
radix = 10, q--;
else
radix = 10;