This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "ui-out.h"
/* These are the CLI output functions. */
-static void tui_table_begin (struct ui_out *uiout, int nbrofcols,
- int nr_rows, const char *tblid);
+static void tui_table_begin (struct ui_out *uiout,
+ int nbrofcols, int nr_rows,
+ const char *tblid);
static void tui_table_body (struct ui_out *uiout);
static void tui_table_end (struct ui_out *uiout);
-static void tui_table_header (struct ui_out *uiout, int width,
- enum ui_align alig, const char *col_name,
+static void tui_table_header (struct ui_out *uiout,
+ int width, enum ui_align alig,
+ const char *col_name,
const char *colhdr);
-static void tui_begin (struct ui_out *uiout, enum ui_out_type type,
+static void tui_begin (struct ui_out *uiout,
+ enum ui_out_type type,
int level, const char *lstid);
-static void tui_end (struct ui_out *uiout, enum ui_out_type type, int level);
-static void tui_field_int (struct ui_out *uiout, int fldno, int width,
- enum ui_align alig, const char *fldname, int value);
-static void tui_field_skip (struct ui_out *uiout, int fldno, int width,
- enum ui_align alig, const char *fldname);
-static void tui_field_string (struct ui_out *uiout, int fldno, int width,
- enum ui_align alig, const char *fldname,
+static void tui_end (struct ui_out *uiout,
+ enum ui_out_type type, int level);
+static void tui_field_int (struct ui_out *uiout,
+ int fldno, int width,
+ enum ui_align alig,
+ const char *fldname, int value);
+static void tui_field_skip (struct ui_out *uiout,
+ int fldno, int width,
+ enum ui_align alig,
+ const char *fldname);
+static void tui_field_string (struct ui_out *uiout,
+ int fldno, int width,
+ enum ui_align alig,
+ const char *fldname,
const char *string);
static void tui_field_fmt (struct ui_out *uiout, int fldno,
int width, enum ui_align align,
- const char *fldname, const char *format,
- va_list args) ATTR_FORMAT (printf, 6, 0);
+ const char *fldname,
+ const char *format,
+ va_list args)
+ ATTR_FORMAT (printf, 6, 0);
static void tui_spaces (struct ui_out *uiout, int numspaces);
static void tui_text (struct ui_out *uiout, const char *string);
static void tui_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTR_FORMAT (printf, 3, 0);
-static void tui_wrap_hint (struct ui_out *uiout, char *identstring);
+static void tui_wrap_hint (struct ui_out *uiout,
+ char *identstring);
static void tui_flush (struct ui_out *uiout);
/* This is the CLI ui-out implementation functions vector. */
/* FIXME: This can be initialized dynamically after default is set to
handle initial output in main.c. */
-static struct ui_out_impl tui_ui_out_impl =
-{
+static struct ui_out_impl tui_ui_out_impl = {
tui_table_begin,
tui_table_body,
tui_table_end,
static void field_separator (void);
-static void out_field_fmt (struct ui_out *uiout, int fldno,
+static void out_field_fmt (struct ui_out *uiout,
+ int fldno,
const char *fldname,
- const char *format,...) ATTR_FORMAT (printf, 4, 5);
+ const char *format,...)
+ ATTR_FORMAT (printf, 4, 5);
/* local variables */
/* Mark beginning of a table. */
void
-tui_table_begin (struct ui_out *uiout, int nbrofcols,
+tui_table_begin (struct ui_out *uiout,
+ int nbrofcols,
int nr_rows,
const char *tblid)
{
/* Specify table header. */
void
-tui_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
+tui_table_header (struct ui_out *uiout,
+ int width,
+ enum ui_align alignment,
const char *col_name,
const char *colhdr)
{
/* Output an int field. */
void
-tui_field_int (struct ui_out *uiout, int fldno, int width,
+tui_field_int (struct ui_out *uiout,
+ int fldno, int width,
enum ui_align alignment,
- const char *fldname, int value)
+ const char *fldname,
+ int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
/* Used to ommit a field. */
void
-tui_field_skip (struct ui_out *uiout, int fldno, int width,
+tui_field_skip (struct ui_out *uiout,
+ int fldno, int width,
enum ui_align alignment,
const char *fldname)
{
void
tui_field_string (struct ui_out *uiout,
- int fldno,
- int width,
+ int fldno, int width,
enum ui_align align,
const char *fldname,
const char *string)
}
void
-tui_message (struct ui_out *uiout, int verbosity,
- const char *format, va_list args)
+tui_message (struct ui_out *uiout,
+ int verbosity,
+ const char *format,
+ va_list args)
{
tui_out_data *data = ui_out_data (uiout);
if (data->suppress_output)
/* VARARGS */
static void
-out_field_fmt (struct ui_out *uiout, int fldno,
+out_field_fmt (struct ui_out *uiout,
+ int fldno,
const char *fldname,
const char *format,...)
{