X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-client.h;h=ebd43e8d296ec775808f527b757b73c137528235;hp=467e1d84c6cf4a16febac2e588fe2df7219b8116;hb=690e36bacd5e53c45775586024ca70f069ca68ad;hpb=02112728433cb08ea2501d937a2ca3cb73a0d85b diff --git a/notmuch-client.h b/notmuch-client.h index 467e1d84..ebd43e8d 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -497,6 +497,11 @@ print_status_gzbytes (const char *loc, gzFile file, int bytes); +/* the __location__ macro is defined in talloc.h */ +#define ASSERT_GZBYTES(file, bytes) ((print_status_gzbytes (__location__, file, bytes)) ? exit (1) : 0) +#define GZPRINTF(file, fmt, ...) ASSERT_GZBYTES (file, gzprintf (file, fmt, ##__VA_ARGS__)); +#define GZPUTS(file, str) ASSERT_GZBYTES(file, gzputs (file, str)); + #include "command-line-arguments.h" extern const char *notmuch_requested_db_uuid;