GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EXPAND_NUMBER (3)

NAME

expand_number - format a number from human readable form

CONTENTS

Library
Synopsis
Description
Return Values
Errors
See Also
History

LIBRARY


.Lb libutil

SYNOPSIS


.In libutil.h int
.Fo expand_number const char *buf uint64_t *num
.Fc

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


.Rv -std

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
.Fx 6.3 .
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.