#include #define err_ret(r, fmt, ...) do { \ fprintf(stderr, "[%s:%d] " fmt "\n", \ __FILE__, __LINE__, ##__VA_ARGS__); \ return r; \ } while (0)