]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-client.h
lib: add regression test for n_m_get_date; clarify API
[notmuch] / notmuch-client.h
index 467e1d84c6cf4a16febac2e588fe2df7219b8116..ebd43e8d296ec775808f527b757b73c137528235 100644 (file)
@@ -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;