chiark / gitweb /
cope with subpixel antialiasing (urgh)
[ypp-sc-tools.db-test.git] / pctb / common.h
index 23b8ca33972d29bf589cae1799896c70408392bf..210f23ac4834baa516d8b707025ca956e93e3083 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <locale.h>
 #include <stdarg.h>
+#include <math.h>
 #include <stdio.h>
 #include <errno.h>
 #include <assert.h>
@@ -48,7 +49,7 @@
 
 typedef struct {
   int w,h;
-  struct RgbImage *rgb;
+  const struct RgbImage *rgb;
   char d[];
 } CanonImage;
 
@@ -163,6 +164,9 @@ char *masprintf(const char *fmt, ...) FMT(1,2);
 
 
 #define ARRAYSIZE(a) ((sizeof((a)) / sizeof((a)[0])))
+#define FILLZERO(obj) (memset(&(obj),0,sizeof((obj))))
 
+#define STRING2(x) #x
+#define STRING(x) STRING2(x)
 
 #endif /*COMMON_H*/