#define _GNU_SOURCE
#include <stdarg.h>
-
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <string.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include <sys/wait.h>
#include <sys/types.h>
typedef struct {
Point br;
} Rect;
+#define RECT_W(r) ((r).br.x - (r).tl.x + 1)
+#define RECT_H(r) ((r).br.y - (r).tl.y + 1)
+
#define DEBUG_FLAG_LIST \
DF(findypp) \
DF(pages) \
DF(rect) \
+ DF(pixmap) \
+ DF(struct) \
DF(ocr) \
DF(callout)
void sysassert_fail(const char *file, int line, const char *what)
__attribute__((noreturn));
+void waitpid_check_exitstatus(pid_t pid, const char *what);
+
void *mmalloc(size_t sz);
void *mrealloc(void *p, size_t sz);
+void fgetsline(FILE *f, char *lbuf, size_t lbufsz);
+
#endif /*COMMON_H*/