summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2007-12-14 16:36:19 +0000
committerchristos <christos@NetBSD.org>2007-12-14 16:36:19 +0000
commit03dcf031ab52cfb6988b9329c8bd95ee4d66fa1d (patch)
tree3a573d2a8f85cd6a689aac76f64542940268062a /include
parent486b2ff08597fdc95a9e26adac84b1fe8c53226f (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')
-rw-r--r--include/stdlib.h14
-rw-r--r--include/util.h12
2 files changed, 14 insertions, 12 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);
diff --git a/include/util.h b/include/util.h
index 8ed7684ee6f..cf59158cf52 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,4 +1,4 @@
-/* $NetBSD: util.h,v 1.48 2007/10/30 20:02:48 christos Exp $ */
+/* $NetBSD: util.h,v 1.49 2007/12/14 16:36:19 christos Exp $ */
/*-
* Copyright (c) 1995
@@ -50,14 +50,6 @@ typedef _BSD_TIME_T_ time_t;
#define PIDLOCK_NONBLOCK 1
#define PIDLOCK_USEHOSTNAME 2
-#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
-
#define PW_POLICY_BYSTRING 0
#define PW_POLICY_BYPASSWD 1
#define PW_POLICY_BYGROUP 2
@@ -80,8 +72,6 @@ off_t getlabeloffset(void);
int getlabelsector(void);
int getmaxpartitions(void);
int getrawpartition(void);
-int humanize_number(char *, size_t, int64_t, const char *, int,
- int);
void login(const struct utmp *);
void loginx(const struct utmpx *);
int login_tty(int);