X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=pctb%2Fcommon.h;h=210f23ac4834baa516d8b707025ca956e93e3083;hb=e78d72697e53d276737fae8519c921c70f0709f7;hp=48483e238b58d82e9ede0eaedf89600301804f46;hpb=ab4295d148c3112ab2859fac0349152d9b6987be;p=ypp-sc-tools.web-live.git diff --git a/pctb/common.h b/pctb/common.h index 48483e2..210f23a 100644 --- a/pctb/common.h +++ b/pctb/common.h @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -39,6 +40,8 @@ #include #include #include +#include +#include #include #include @@ -46,6 +49,7 @@ typedef struct { int w,h; + const 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*/