diff options
author | pjd <pjd@FreeBSD.org> | 2007-09-01 06:19:11 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-09-01 06:19:11 +0000 |
commit | cc12b6df6115bbae54020b4990f47ae05910c578 (patch) | |
tree | 5572f0edc5bafc686f315e72b54b7b631de76d81 /lib/libutil/libutil.h | |
parent | b4e5f9c9740505b3db333a8199667c3cb82daf4d (diff) | |
download | FreeBSD-src-cc12b6df6115bbae54020b4990f47ae05910c578.zip FreeBSD-src-cc12b6df6115bbae54020b4990f47ae05910c578.tar.gz |
Implement expand_number(3), which is the opposite of humanize_number(3), ie.
a number in human-readable form is converted to int64_t, for example:
123b -> 123
10k -> 10240
16G -> 17179869184
First version submitted by: Eric Anderson <anderson@freebsd.org>
Approved by: re (bmah)
Diffstat (limited to 'lib/libutil/libutil.h')
-rw-r--r-- | lib/libutil/libutil.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index 51ca3d1..1df9510 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -82,6 +82,7 @@ int forkpty(int *_amaster, char *_name, struct termios *_termp, struct winsize *_winp); int humanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); +int expand_number(char *_buf, int64_t *_num); const char *uu_lockerr(int _uu_lockresult); int uu_lock(const char *_ttyname); int uu_unlock(const char *_ttyname); |