"Written in portable ANSI C", sure it isn't.

The assumption about character codes and stuff like `'a' < 'z'` being true, etc. is not portable at all, since the C standard only mandates the order of decimal digits, not that of other characters.
Furthermore, `isdigit(c)` is preferred over `c >= 0 && c <= 9`.