summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-04-12 23:34:40 +0200
committerLaslo Hunhold <dev@frign.de>2017-04-12 23:34:40 +0200
commitaa873108425a500d8f47edb56fb476f248cb09d0 (patch)
treee649931540582f3a77398b4b6ca2004a48ffbf6a /util.h
parent4ee1dee12fc4680504cb0a75c4b8a6862fd38db2 (diff)
Rename header-functions and add more util functions
parse_mask() -> parse a mask-color #xxxxxx ereallocarray() estrtonum() These will come in handy in the respective tools.
Diffstat (limited to 'util.h')
-rw-r--r--util.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/util.h b/util.h
index 02aee25..93492a5 100644
--- a/util.h
+++ b/util.h
@@ -6,5 +6,15 @@ extern char *argv0;
#define LEN(x) (sizeof (x) / sizeof *(x))
-void read_ff_header(uint32_t *width, uint32_t *height);
-void write_ff_header(uint32_t width, uint32_t height);
+void ff_read_header(uint32_t *width, uint32_t *height);
+void ff_write_header(uint32_t width, uint32_t height);
+
+int parse_mask(const char *, uint16_t mask[3]);
+
+#undef reallocarray
+void *reallocarray(void *, size_t, size_t);
+void *ereallocarray(void *optr, size_t nmemb, size_t size);
+
+#undef strtonum
+long long strtonum(const char *, long long, long long, const char **);
+long long estrtonum(const char *, long long, long long);