Hacker News new | ask | show | jobs
by Joker_vD 1019 days ago
Not only early Unix; look at the original inet_addr implementation [0]. It accepts not only "0x" but also just "x" as the 16-base prefix, it doesn't really care about the numbers overflowing, and it parses 09 as equal to 011 (which is decimal 9). And the less said about the coding style, the better.

[0] https://github.com/dank101/4.2BSD/blob/master/lib/libc/inet/...