include/, src/: Rename strto[iu]2() => ato[su]imax()
The '2' is confusing, since the function already has a 'to' in the name,
and our other API, a2i(3), even has a '2' with the meaning of 'to'.
Use a new naming scheme. The 's'/'u' determines if the function does
signed or unsigned parsing. 'ato' is like in atoi(3), and 'imax'
relates to the types intmax_t/uintmax_t. The suffix is inconsistent
with the scheme for signed/unsigned standard APIs, such as
imaxabs(3)/umaxabs(3); however, in this case the signed and unsigned
variants differ significantly --the unsigned one rejects a sign--, so it
can be reasonable to differ from it.
With this naming scheme, the 4th letter, that is, 's' or 'u', explicitly
says what the function does.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 files changed