Index: bsdiff.c --- bsdiff.c.orig 2005-08-17 00:13:52.000000000 +0200 +++ bsdiff.c 2005-08-17 09:17:36.626825000 +0200 @@ -31,12 +31,12 @@ #include #include -#include #include #include #include #include #include +#include "err.h" #define MIN(x,y) (((x)<(y)) ? (x) : (y)) Index: bspatch.c --- bspatch.c.orig 2005-08-17 00:14:00.000000000 +0200 +++ bspatch.c 2005-08-17 09:17:36.627758000 +0200 @@ -32,9 +32,9 @@ #include #include #include -#include #include #include +#include "err.h" static off_t offtin(u_char *buf) { Index: err.h --- /dev/null 2005-08-17 09:19:51.000000000 +0200 +++ err.h 2005-08-17 09:19:51.704744000 +0200 @@ -0,0 +1,10 @@ +#ifndef __ERR_H__ +#define __ERR_H__ + +#include +#include + +#define err(bla, ...) { fprintf(stderr, __VA_ARGS__); fputs("\n", stderr); exit(EXIT_FAILURE); } +#define errx(bla, ...) { fprintf(stderr, __VA_ARGS__); fputs("\n", stderr); exit(EXIT_FAILURE); } + +#endif /* __ERR_H__ */