File: util.h

package info (click to toggle)
farbfeld 4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 196 kB
  • sloc: ansic: 622; sh: 65; makefile: 59
file content (28 lines) | stat: -rw-r--r-- 784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);