chiark / gitweb /
fix STRING macro
[ypp-sc-tools.db-test.git] / pctb / common.h
index 48483e238b58d82e9ede0eaedf89600301804f46..52f57d699c4cefd959d300bc44349038d7e4e5a8 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <locale.h>
 #include <stdarg.h>
+#include <math.h>
 #include <stdio.h>
 #include <errno.h>
 #include <assert.h>
@@ -39,6 +40,8 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <dirent.h>
+#include <pcre.h>
 #include <inttypes.h>
 
 #include <sys/wait.h>
@@ -46,6 +49,7 @@
 
 typedef struct {
   int w,h;
+  struct RgbImage *rgb;
   char d[];
 } CanonImage;
 
@@ -158,4 +162,11 @@ char *masprintf(const char *fmt, ...) FMT(1,2);
          "(Are you in the correct directory?)", helper);       \
   }while(0)
 
+
+#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*/