git/column.c

#include "git-compat-util.h"
#include "config.h"
#include "column.h"
#include "string-list.h"
#include "pager.h"
#include "parse-options.h"
#include "run-command.h"
#include "utf8.h"

#define XY2LINEAR(d, x, y)

struct column_data {};

/* return length of 's' in letters, ANSI escapes stripped */
static int item_length(const char *s)
{}

/*
 * Calculate cell width, rows and cols for a table of equal cells, given
 * table width and how many spaces between cells.
 */
static void layout(struct column_data *data, int *width)
{}

static void compute_column_width(struct column_data *data)
{}

/*
 * Shrink all columns by shortening them one row each time (and adding
 * more columns along the way). Hopefully the longest cell will be
 * moved to the next column, column is shrunk so we have more space
 * for new columns. The process ends when the whole thing no longer
 * fits in data->total_width.
 */
static void shrink_columns(struct column_data *data)
{}

/* Display without layout when not enabled */
static void display_plain(const struct string_list *list,
			  const char *indent, const char *nl)
{}

/* Print a cell to stdout with all necessary leading/trailing space */
static int display_cell(struct column_data *data, int initial_width,
			const char *empty_cell, int x, int y)
{}

/* Display COL_COLUMN or COL_ROW */
static void display_table(const struct string_list *list,
			  unsigned int colopts,
			  const struct column_options *opts)
{}

void print_columns(const struct string_list *list, unsigned int colopts,
		   const struct column_options *opts)
{}

int finalize_colopts(unsigned int *colopts, int stdout_is_tty)
{}

struct colopt {};

#define LAYOUT_SET
#define ENABLE_SET

static int parse_option(const char *arg, int len, unsigned int *colopts,
			int *group_set)
{}

static int parse_config(unsigned int *colopts, const char *value)
{}

static int column_config(const char *var, const char *value,
			 const char *key, unsigned int *colopts)
{}

int git_column_config(const char *var, const char *value,
		      const char *command, unsigned int *colopts)
{}

int parseopt_column_callback(const struct option *opt,
			     const char *arg, int unset)
{}

static int fd_out =;
static struct child_process column_process =;

int run_column_filter(int colopts, const struct column_options *opts)
{}

int stop_column_filter(void)
{}