diff options
author | Marvin Borner | 2020-06-11 14:53:23 +0200 |
---|---|---|
committer | Marvin Borner | 2020-06-11 14:53:23 +0200 |
commit | cfc61f4fa5a5b2236439ec1ebe416f23e31d8092 (patch) | |
tree | 96f4fd5f4d57e6835dd6f105caca30c65d7160e5 /.repos/farbfeld/util.h | |
parent | d05b17617eb83377f980c24f29079229697504cc (diff) |
Soo many features added
weeee so much efficiencyyyy
Diffstat (limited to '.repos/farbfeld/util.h')
-rw-r--r-- | .repos/farbfeld/util.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.repos/farbfeld/util.h b/.repos/farbfeld/util.h new file mode 100644 index 0000000..f6e32c6 --- /dev/null +++ b/.repos/farbfeld/util.h @@ -0,0 +1,28 @@ +/* See LICENSE file for copyright and license details. */ +#include <stdint.h> +#include <stdio.h> + +#define LEN(x) (sizeof (x) / sizeof *(x)) + +extern char *argv0; + +void warn(const char *, ...); +void die(const char *, ...); + +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]); + +int fshut(FILE *, const char *); + +void efread(void *, size_t, size_t, FILE *); +void efwrite(const void *, size_t, size_t, FILE *); + +#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); |