doveadm-print-tab.c revision 738e548a4b1c7d214626e875491a48fcf1cddd1c
/* Copyright (c) 2010-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "doveadm-print-private.h"
#include <stdio.h>
struct doveadm_print_tab_context {
unsigned int header_idx, header_count;
unsigned int header_written:1;
};
static struct doveadm_print_tab_context ctx;
static void doveadm_print_tab_flush_header(void)
{
if (!ctx.header_written) {
printf("\n");
}
}
static void
{
ctx.header_count++;
if (!doveadm_print_hide_titles) {
printf("\t");
}
}
static void doveadm_print_tab_print(const char *value)
{
if (ctx.header_idx > 0)
printf("\t");
ctx.header_idx = 0;
printf("\n");
}
}
static void
{
if (size == 0) {
return;
}
if (ctx.header_idx > 0)
printf("\t");
}
static void doveadm_print_tab_flush(void)
{
}
struct doveadm_print_vfuncs doveadm_print_tab_vfuncs = {
"tab",
NULL,
NULL,
};