Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

expand_number(3) [debian man page]

EXPAND_NUMBER(3)					   BSD Library Functions Manual 					  EXPAND_NUMBER(3)

NAME
expand_number -- format a number from human readable form LIBRARY
Utility functions from BSD systems (libbsd, -lbsd) SYNOPSIS
#include <bsd/libutil.h> int expand_number(const char *buf, uint64_t *num); DESCRIPTION
The expand_number() function unformats the buf string and stores a unsigned 64-bit quantity at address pointed out by the num argument. The expand_number() function follows the SI power of two convention. The prefixes are: Prefix Description Multiplier k kilo 1024 M mega 1048576 G giga 1073741824 T tera 1099511627776 P peta 1125899906842624 E exa 1152921504606846976 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 prefix 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. BSD
August 15, 2010 BSD

Check Out this Related Man Page

EXPAND_NUMBER(3)					   BSD 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 unformats the buf string and stores a unsigned 64-bit quantity at address pointed out by the num argument. The expand_number() function is case-insensitive and follows the SI power of two convention. The prefixes are: Prefix Description Multiplier K kilo 1024 M mega 1048576 G giga 1073741824 T tera 1099511627776 P peta 1125899906842624 E exa 1152921504606846976 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 prefix 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. BSD
August 15, 2010 BSD
Man Page

We Also Found This Discussion For You

1. BSD

Invitation to BSD Forum Members

If you are a former member of the abandoned forums over at bsdforums.org, please feel free to suggest subforums for BSD here and we will add them, if you would like to be active here. We have plenty of room for the BSD community here. Welcome! (1 Reply)
Discussion started by: Neo
1 Replies