]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Code cleanup - add and use DOVEADM_PRINT_TYPE_PAGER macro
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 25 Oct 2016 17:54:17 +0000 (20:54 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 26 Oct 2016 10:10:37 +0000 (13:10 +0300)
src/doveadm/doveadm-mail-fetch.c
src/doveadm/doveadm-master.c
src/doveadm/doveadm-print-pager.c
src/doveadm/doveadm-print.h

index 3da8b8954b3dc311b3d502f45b3259b8141318d4..bf64aed9083ce3b47eac260f353721f328992b7b 100644 (file)
@@ -663,7 +663,7 @@ static struct doveadm_mail_cmd_context *cmd_fetch_alloc(void)
        ctx = doveadm_mail_cmd_alloc(struct fetch_cmd_context);
        ctx->ctx.v.init = cmd_fetch_init;
        ctx->ctx.v.run = cmd_fetch_run;
-       doveadm_print_init("pager");
+       doveadm_print_init(DOVEADM_PRINT_TYPE_PAGER);
        return &ctx->ctx;
 }
 
index 1ff76f381abed2a5c984a50043f828143a53db79..6c777362de0370cc60c5b30b7a57551b0bc28768 100644 (file)
@@ -158,7 +158,7 @@ static void cmd_service_status(struct doveadm_cmd_context *cctx)
 
        struct istream *input = master_service_send_cmd("SERVICE-STATUS");
 
-       doveadm_print_init("pager");
+       doveadm_print_init(DOVEADM_PRINT_TYPE_PAGER);
        doveadm_print_header_simple("name");
        doveadm_print_header_simple("process_count");
        doveadm_print_header_simple("process_avail");
index 7c9e65d4556fa8c30bd55d65e1279e1285aa6941..75849bd154fdfa53303dfabc85dd55f2a5731668 100644 (file)
@@ -102,7 +102,7 @@ static void doveadm_print_pager_deinit(void)
 }
 
 struct doveadm_print_vfuncs doveadm_print_pager_vfuncs = {
-       "pager",
+       DOVEADM_PRINT_TYPE_PAGER,
 
        doveadm_print_pager_init,
        doveadm_print_pager_deinit,
index 35b415d9c03352e9daffe34e53c362cfbe5edcb6..cf99aaca875d41c457d6f5fb6b141e85df31b37b 100644 (file)
@@ -3,6 +3,7 @@
 
 #define DOVEADM_PRINT_TYPE_TAB "tab"
 #define DOVEADM_PRINT_TYPE_FLOW "flow"
+#define DOVEADM_PRINT_TYPE_PAGER "pager"
 #define DOVEADM_PRINT_TYPE_TABLE "table"
 #define DOVEADM_PRINT_TYPE_SERVER "server"
 #define DOVEADM_PRINT_TYPE_JSON "json"