chiark / gitweb /
WIP island determination; pixmap handling in progress
[ypp-sc-tools.db-live.git] / pctb / common.h
index 8b66cf5..635a53a 100644 (file)
 #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 {
@@ -51,12 +60,16 @@ typedef struct { /* both inclusive */
   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)
@@ -117,5 +130,7 @@ 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*/