Similarly to GZPRINTF, this is a drop in replacement that can be
improved where needd.
/* 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__));
/* 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"
#include "command-line-arguments.h"
NOTMUCH_DUMP_VERSION);
if (include & DUMP_INCLUDE_CONFIG) {
NOTMUCH_DUMP_VERSION);
if (include & DUMP_INCLUDE_CONFIG) {
- gzputs (output, "config");
+ GZPUTS (output, "config");
sep = ",";
}
if (include & DUMP_INCLUDE_PROPERTIES) {
sep = ",";
}
if (include & DUMP_INCLUDE_PROPERTIES) {
if (include & DUMP_INCLUDE_TAGS) {
GZPRINTF (output, "%stags", sep);
}
if (include & DUMP_INCLUDE_TAGS) {
GZPRINTF (output, "%stags", sep);
}
const char *tag_str = notmuch_tags_get (tags);
if (! first)
const char *tag_str = notmuch_tags_get (tags);
if (! first)
first = 0;
if (output_format == DUMP_FORMAT_SUP) {
first = 0;
if (output_format == DUMP_FORMAT_SUP) {
- gzputs (output, tag_str);
+ GZPUTS (output, tag_str);
} else {
if (hex_encode (ctx, tag_str,
buffer_p, size_p) != HEX_SUCCESS) {
} else {
if (hex_encode (ctx, tag_str,
buffer_p, size_p) != HEX_SUCCESS) {
}
if (output_format == DUMP_FORMAT_SUP) {
}
if (output_format == DUMP_FORMAT_SUP) {
- gzputs (output, ")\n");
+ GZPUTS (output, ")\n");
} else {
if (make_boolean_term (ctx, "id", message_id,
buffer_p, size_p)) {
} else {
if (make_boolean_term (ctx, "id", message_id,
buffer_p, size_p)) {