diff options
| author | christos <christos@NetBSD.org> | 2007-12-14 16:36:19 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2007-12-14 16:36:19 +0000 |
| commit | 03dcf031ab52cfb6988b9329c8bd95ee4d66fa1d (patch) | |
| tree | 3a573d2a8f85cd6a689aac76f64542940268062a /include/stdlib.h | |
| parent | 486b2ff08597fdc95a9e26adac84b1fe8c53226f (diff) | |
humanize_number was the only function in <util.h> that is not in libutil.
Move it to stdlib.h and add dehumanize_number.
Diffstat (limited to 'include/stdlib.h')
| -rw-r--r-- | include/stdlib.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 3e62a57cee8..df6169366c1 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.78 2007/11/19 14:48:41 ad Exp $ */ +/* $NetBSD: stdlib.h,v 1.79 2007/12/14 16:36:19 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -260,6 +260,18 @@ int cgetustr(char *, const char *, char **); int daemon(int, int); __aconst char *devname(dev_t, mode_t); + +#define HN_DECIMAL 0x01 +#define HN_NOSPACE 0x02 +#define HN_B 0x04 +#define HN_DIVISOR_1000 0x08 + +#define HN_GETSCALE 0x10 +#define HN_AUTOSCALE 0x20 + +int humanize_number(char *, size_t, int64_t, const char *, int, int); +int dehumanize_number(const char *, int64_t *); + dev_t getdevmajor(const char *, mode_t); int getloadavg(double [], int); |
