Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Implement fmt_human_2() and fmt_human_10()
[slstatus.git]
/
util.h
diff --git
a/util.h
b/util.h
index
e90c29d
..
64e30d0
100644
(file)
--- a/
util.h
+++ b/
util.h
@@
-3,5
+3,13
@@
extern char buf[1024];
#define LEN(x) (sizeof (x) / sizeof *(x))
#define LEN(x) (sizeof (x) / sizeof *(x))
+extern char *argv0;
+
+void warn(const char *, ...);
+void die(const char *, ...);
+
+int esnprintf(char *str, size_t size, const char *fmt, ...);
const char *bprintf(const char *fmt, ...);
const char *bprintf(const char *fmt, ...);
+const char *fmt_human_2(size_t num, char *unit);
+const char *fmt_human_10(size_t num, char *unit);
int pscanf(const char *path, const char *fmt, ...);
int pscanf(const char *path, const char *fmt, ...);