]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-client.h
cli/dump: define GZPRINTF macro and use it in place of gzprintf
[notmuch] / notmuch-client.h
index 467e1d84c6cf4a16febac2e588fe2df7219b8116..6cb8182090241b43d11749d3e45aab3fcbc286c8 100644 (file)
@@ -497,6 +497,10 @@ 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__));
+
 #include "command-line-arguments.h"
 
 extern const char *notmuch_requested_db_uuid;