The functions
strsuftoll() and
strsuftollx() convert
val into a number of type
long long, checking that the result is not smaller than
min or larger than
max. Two or more decimal numbers may be separated by an “x” to indicate a product.
Each decimal number may have one of the following optional suffixes:
k
Kibi; multiply by 1024 (1 KiB)
m
Mebi; multiply by 1048576 (1 MiB)
g
Gibi; multiply by 1073741824 (1 GiB)
t
Tebi; multiply by 1099511627776 (1 TiB)
w
Word; multiply by the number of bytes in an integer
In the case of an error (range overflow or an invalid number),
strsuftollx() places an error message into
errbuf (which is
errbuflen bytes long) and returns 0, and
strsuftoll() displays that error and terminates the process. The parameter
desc is used to construct
errbuf.
Neither
desc nor
val may be
NULL.