/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "unichar.h"
#include "doveadm-print-private.h"
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
struct doveadm_print_table_header {
const char *key;
const char *title;
};
struct doveadm_print_table_context {
unsigned int hdr_idx;
unsigned int columns;
};
static void
{
}
static void doveadm_calc_header_length(void)
{
/* find min and max lengths of fields */
for (i = 0; i < hdr_count; i++) {
}
}
}
/* +1 for space between fields */
max_length = 0;
for (i = 0; i < hdr_count; i++)
max_length--;
/* shrink something so we'll fit */
for (i = hdr_count - 1;; i--) {
/* we can finish with this */
max_length -= diff;
break;
}
if (diff > 0) {
/* take a bit off from it */
}
if (i == 0)
break;
}
if (max_length == orig_length) {
/* can't shrink it any more */
break;
}
}
for (i = 0; i < hdr_count; i++) {
i++;
break;
}
}
}
}
{
for (i = 0; str[i] != '\0'; i++) {
len++;
}
return len;
}
{
int value_padded_len;
else
printf("\n");
} else {
printf(" ");
}
}
static void doveadm_print_headers(void)
{
unsigned int i, count;
return;
/* if all headers are hidden, don't print any of them */
for (i = 0; i < count; i++) {
break;
}
if (i == count)
return;
for (i = 0; i < count; i++) {
if (i > 0) printf(" ");
} else {
}
}
printf("\n");
}
static void doveadm_buffer_flush(void)
{
const char *const *valuep;
}
{
unsigned int line_count;
if (!ctx->lengths_set) {
if (line_count < MAX_BUFFER_LINES) {
return;
}
}
}
static void
{
i_fatal("table formatter doesn't support multi-line values");
if (size != 0)
else {
}
}
static void doveadm_print_table_flush(void)
{
}
static void doveadm_print_table_init(void)
{
}
}
static void doveadm_print_table_deinit(void)
{
}
"table",
};