X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=common.h;h=be0910e33a23c728bbbac89f3c721a4cf0d89f31;hp=ac9d87ed34536dedcb5d436924fed43c484fa8f7;hb=e0fab1bd78914a12ee88f2a9fcfca9f28a1df0f2;hpb=30498ebe775df3854f28946b1373da948bd190a3 diff --git a/common.h b/common.h index ac9d87e..be0910e 100644 --- a/common.h +++ b/common.h @@ -25,4 +25,13 @@ #define abs(a) ((a)<=0 ? -(a) : (a)) #endif +#define CONDERROR(a) if((a)) {initerror = strdup(SDL_GetError());return 1;} +#define NULLERROR(a) CONDERROR((a) == NULL) + +#ifndef DEBUG +#define DEBUG 0 +#endif + +#define debug(x) if(DEBUG) { x; } + #endif // VOR_COMMON_H