diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-18 00:11:55 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-18 00:11:55 +0000 |
commit | 0a8fce9a7008fd51e7d0108a8dc539711f6c17b3 (patch) | |
tree | 45501e607421cb3ece55da6353a58c4c26c9ff17 /gdb/ui-out.c | |
parent | 61d05fada4eb158e59a638f9dafcaf885033c3ab (diff) | |
download | gdb-0a8fce9a7008fd51e7d0108a8dc539711f6c17b3.zip gdb-0a8fce9a7008fd51e7d0108a8dc539711f6c17b3.tar.gz gdb-0a8fce9a7008fd51e7d0108a8dc539711f6c17b3.tar.bz2 |
PR tui/9217
* tui/tui-out.c: Include cli-out.h.
(tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
(tui_begin, tui_end, tui_field_int, tui_field_skip)
(tui_field_string, tui_field_fmt, tui_spaces, tui_text)
(tui_message, tui_wrap_hint, tui_flush): Delete forward
declarations.
(struct ui_out_data): Rename to...
(struct tui_ui_out_data): ... this. Remove `stream' and
`suppress_output' fields, and inherit cli_ui_out_data.
(tui_out_data): New typedef.
(tui_ui_out_impl): Don't initialize fields staticaly.
(tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
(tui_begin, tui_end): Delete.
(tui_field_int): Adjust to delegate most work to the base type.
(tui_field_skip): Delete.
(tui_field_string, tui_field_fmt): Adjust comment. Adjust to
delegate most work to the base type.
(tui_spaces): Delete.
(tui_text): Adjust to delegate most work to the base type.
(tui_message): Delete.
(tui_wrap_hint): Delete.
(tui_flush): Delete.
(out_field_fmt): Delete.
(field_separator): Delete.
(tui_out_new): Adjust to initialize the base type.
(_initialize_tui_out): Initialize tui_ui_out_impl.
* cli-out.c (struct ui_out_data): Moved out to cli-out.h, renamed
cli_ui_out_data.
(cli_out_data): Adjust.
(cli_ui_out_impl): Make extern.
(cli_table_header, cli_field_int, cli_field_skip): Use
uo_field_string instead of cli_field_string.
(cli_redirect): Adjust to use cli_out_data.
(cli_out_data_ctor): New.
(cli_out_new): Use it.
* cli-out.h (struct ui_file): Remove forward declaration.
(struct cli_ui_out_data): New, moved from cli-out.c, and renamed.
(cli_ui_out_impl): Declare.
(cli_out_data_ctor): Declare.
* ui-out.c (struct ui_out) <data>: Change type to void pointer.
(uo_field_string): No longer static.
(ui_out_data): Change return type to void pointer.
(ui_out_new): Change `data' parameter type to void pointer.
* ui-out.h (struct ui_out_data): Don't forward declare.
(ui_out_data): Change return type to void pointer.
(ui_out_new): Change `data' parameter type to void pointer.
(uo_field_string): Declare.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r-- | gdb/ui-out.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c index e5fd474..c79e54e 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -100,7 +100,7 @@ struct ui_out int flags; /* specific implementation of ui-out */ struct ui_out_impl *impl; - struct ui_out_data *data; + void *data; /* Sub structure tracking the ui-out depth. */ int level; @@ -242,9 +242,6 @@ static void uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, int value); static void uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname); -static void uo_field_string (struct ui_out *uiout, int fldno, int width, - enum ui_align align, const char *fldname, - const char *string); static void uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, const char *fldname, const char *format, va_list args) @@ -1137,7 +1134,7 @@ ui_out_get_field_separator (struct ui_out *uiout) /* Access to ui-out members data */ -struct ui_out_data * +void * ui_out_data (struct ui_out *uiout) { return uiout->data; @@ -1146,8 +1143,7 @@ ui_out_data (struct ui_out *uiout) /* initalize private members at startup */ struct ui_out * -ui_out_new (struct ui_out_impl *impl, - struct ui_out_data *data, +ui_out_new (struct ui_out_impl *impl, void *data, int flags) { struct ui_out *uiout = XMALLOC (struct ui_out); |