/* #define PRINTF(x) if(printf x == 0) {fprintf(stderr, "printf failed");\ exit(EXIT_FAILURE);} */ #define PRINTF(x) if(printf x != 0) {fflush(stdout);} #define MALLOC(x,y) if((x = malloc(y)) == NULL) {PRINTF(("realloc failed"))\ exit(EXIT_FAILURE);} #define REALLOC(x,y) if((x = realloc(x,y)) == NULL) {PRINTF(("realloc failed")) exit(EXIT_FAILURE);}