From: Timo Sirainen Date: Mon, 25 Aug 2025 09:49:50 +0000 (+0300) Subject: doveadm: Add doveadm_print_empty() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85b19174d0ad259e9d0dfe2df4ddf94da90a3159;p=thirdparty%2Fdovecot%2Fcore.git doveadm: Add doveadm_print_empty() --- diff --git a/src/doveadm/doveadm-print.c b/src/doveadm/doveadm-print.c index 7cad3265ca..428cbfee9f 100644 --- a/src/doveadm/doveadm-print.c +++ b/src/doveadm/doveadm-print.c @@ -93,6 +93,12 @@ void doveadm_print(const char *value) ctx->header_idx++; } +void doveadm_print_empty(unsigned int count) +{ + for (unsigned int i = 0; i < count; i++) + doveadm_print(""); +} + void doveadm_print_num(uintmax_t value) { T_BEGIN { diff --git a/src/doveadm/doveadm-print.h b/src/doveadm/doveadm-print.h index 81509ac70d..4cb96599de 100644 --- a/src/doveadm/doveadm-print.h +++ b/src/doveadm/doveadm-print.h @@ -33,6 +33,8 @@ void doveadm_print_header_simple(const char *key_title); unsigned int doveadm_print_get_headers_count(void); void doveadm_print(const char *value); +/* Print count number of empty fields */ +void doveadm_print_empty(unsigned int count); void doveadm_print_num(uintmax_t value); /* Stream for same field continues until len=0 */ void doveadm_print_stream(const void *value, size_t size);