summaryrefslogtreecommitdiff
path: root/slstatus/util.h
diff options
context:
space:
mode:
authorcoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
committercoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
commit8cbadb61604667b407b53ee1258433994fa4765a (patch)
tree97765fb29418fd6278fcb4cbb9760893afaf7a58 /slstatus/util.h
Diffstat (limited to 'slstatus/util.h')
-rwxr-xr-xslstatus/util.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/slstatus/util.h b/slstatus/util.h
new file mode 100755
index 0000000..cf4b027
--- /dev/null
+++ b/slstatus/util.h
@@ -0,0 +1,16 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdint.h>
+
+extern char buf[1024];
+
+#define LEN(x) (sizeof(x) / sizeof((x)[0]))
+
+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 *fmt_human(uintmax_t num, int base);
+int pscanf(const char *path, const char *fmt, ...);