summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-23 16:18:38 -0400
committerpommicket <pommicket@gmail.com>2023-03-23 16:18:38 -0400
commitaf61b9be6a746421a0417d282134491213f2c03f (patch)
treeb81b5fe297cc2d4f029ec111b9ac6a9228b1c4f8 /util.h
parent6643ff4c14cc27bf80189aadaf65c36ac2e7307f (diff)
handle various :increment-number edge cases and binary
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index 8c65b35..9fb078c 100644
--- a/util.h
+++ b/util.h
@@ -98,6 +98,8 @@ void strn_cpy(char *dst, size_t dst_sz, const char *src, size_t src_len);
void str_cpy(char *dst, size_t dst_sz, const char *src);
/// equivalent to GNU function asprintf (like sprintf, but allocates the string with malloc).
char *a_sprintf(const char *fmt, ...);
+/// convert binary number to string. make sure `s` can hold at least 65 bytes!!
+void str_binary_number(char s[65], u64 n);
/// print some bytes. useful for debugging.
void print_bytes(const u8 *bytes, size_t n);
/// like strstr, but case-insensitive