X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=pctb%2Fcommon.h;h=635a53a7ddd2a70dfa6fffafcd2ca75ada342106;hp=8b66cf5e94b416a1a3ce4c1aba9bb1c9cbe135da;hb=74e4e249f2c3e848592984cb193aded6a77a341d;hpb=2aaae8ee04d0a6a8ab85751ceb67f222d259eba8 diff --git a/pctb/common.h b/pctb/common.h index 8b66cf5..635a53a 100644 --- a/pctb/common.h +++ b/pctb/common.h @@ -31,7 +31,16 @@ #define _GNU_SOURCE #include - +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include 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*/