Skip to content

Commit

Permalink
doveadm: Code cleanup - add and use DOVEADM_PRINT_TYPE_PAGER macro
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Oct 26, 2016
1 parent 5baa99e commit 150b07f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-mail-fetch.c
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-master.c
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-print-pager.c
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/doveadm/doveadm-print.h
Expand Up @@ -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"
Expand Down

0 comments on commit 150b07f

Please sign in to comment.