*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: expand_number | Section: 3 | Source: FreeBSD | File: expand_number.3.gz
EXPAND_NUMBER(3) FreeBSD Library Functions Manual EXPAND_NUMBER(3) NAME expand_number - format a number from human readable form LIBRARY System Utilities Library (libutil, -lutil) SYNOPSIS #include <libutil.h> int expand_number(const char *buf, uint64_t *num); DESCRIPTION The expand_number() function parses the buf string and stores a unsigned 64-bit quantity at *num. The expand_number() function is case-insensitive and follows the SI power of two convention. The suffixes are: Suffix Description Multiplier K kilo 1024 M mega 1048576 G giga 1073741824 T tera 1099511627776 P peta 1125899906842624 E exa 1152921504606846976 For historical reasons, the expand_number() function accepts and ignores a single "B" suffix at the end of the buf string. However, the usage of this suffix is discouraged. RETURN VALUES Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS The expand_number() function will fail if: [EINVAL] The given string contains no digits. [EINVAL] An unrecognized suffix was given. [ERANGE] Result doesn't fit into 64 bits. SEE ALSO humanize_number(3) HISTORY The expand_number() function first appeared in FreeBSD 6.3. FreeBSD 14.1-RELEASE-p8 June 13, 2023 FreeBSD 14.1-RELEASE-p8

Navigation Options