diff options
Diffstat (limited to 'gdb/tui/tui-out.c')
-rw-r--r-- | gdb/tui/tui-out.c | 80 |
1 files changed, 51 insertions, 29 deletions
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c index 2a34473..834d092 100644 --- a/gdb/tui/tui-out.c +++ b/gdb/tui/tui-out.c @@ -40,33 +40,46 @@ typedef struct ui_out_data tui_out_data; /* 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. */ @@ -74,8 +87,7 @@ static void tui_flush (struct ui_out *uiout); /* 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, @@ -101,9 +113,11 @@ extern void _initialize_tui_out (void); 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 */ @@ -112,7 +126,8 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, /* 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) { @@ -149,7 +164,9 @@ tui_table_end (struct ui_out *uiout) /* 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) { @@ -187,9 +204,11 @@ tui_end (struct ui_out *uiout, /* 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? */ @@ -212,7 +231,8 @@ tui_field_int (struct ui_out *uiout, int fldno, int width, /* 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) { @@ -227,8 +247,7 @@ tui_field_skip (struct ui_out *uiout, int fldno, int width, 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) @@ -336,8 +355,10 @@ tui_text (struct ui_out *uiout, 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) @@ -369,7 +390,8 @@ tui_flush (struct ui_out *uiout) /* 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,...) { |