chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP island determination; pixmap handling in progress
[ypp-sc-tools.db-live.git]
/
pctb
/
common.h
diff --git
a/pctb/common.h
b/pctb/common.h
index 8b66cf5e94b416a1a3ce4c1aba9bb1c9cbe135da..635a53a7ddd2a70dfa6fffafcd2ca75ada342106 100644
(file)
--- a/
pctb/common.h
+++ b/
pctb/common.h
@@
-31,7
+31,16
@@
#define _GNU_SOURCE
#include <stdarg.h>
#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 {
#include <sys/types.h>
typedef struct {
@@
-51,12
+60,16
@@
typedef struct { /* both inclusive */
Point br;
} Rect;
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) \
#define DEBUG_FLAG_LIST \
DF(findypp) \
DF(pages) \
DF(rect) \
+ DF(pixmap) \
DF(struct) \
DF(ocr) \
DF(callout)
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 *mmalloc(size_t sz);
void *mrealloc(void *p, size_t sz);
+void fgetsline(FILE *f, char *lbuf, size_t lbufsz);
+
#endif /*COMMON_H*/
#endif /*COMMON_H*/