MINOR: tools: add some of the missing null-terminated integer parsers
We have a number of integer parsers depending on what delimits the
integer, but the null-terminated ones were still fairly limited,
especially when range checks were expected. This commit adds the
following parsers:
int str2irc(const char *str, int *ret);
int str2uirc(const char *str, uint *ret);
int str2lrc(const char *str, long *ret);
int str2ulrc(const char *str, ulong *ret);
int str2llrc(const char *str, llong *ret);
int str2ullrc(const char *str, ullong *ret);
The all return an error status like their equivalent length-defined
ones, with the returned value via a pointer. They stop on a null
character and return parsing error when non-digit chars appear in the
string, or when too large a number is being produced for the range.
Note that for now they're in tools.c and defined in intops.h because
other ones were done similarly, but all of these should move to a new
intops.c file.