/* Output generating routines for GDB.
- Copyright (C) 1999-2014 Free Software Foundation, Inc.
+ Copyright (C) 1999-2015 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
Written by Fernando Nasser for Cygnus.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include <string.h>
#include "expression.h" /* For language.h */
#include "language.h"
#include "ui-out.h"
-#include "gdb_assert.h"
/* table header structures */
{
int flags;
/* Specific implementation of ui-out. */
- struct ui_out_impl *impl;
+ const struct ui_out_impl *impl;
void *data;
/* Current level. */
/* This is the default ui-out implementation functions vector. */
-struct ui_out_impl default_ui_out_impl =
+const struct ui_out_impl default_ui_out_impl =
{
default_table_begin,
default_table_body,
static void
clear_table (struct ui_out *uiout)
{
- if (uiout->table.id)
- xfree (uiout->table.id);
+ xfree (uiout->table.id);
+ uiout->table.id = NULL;
clear_header_list (uiout);
}
/* Initalize private members at startup. */
struct ui_out *
-ui_out_new (struct ui_out_impl *impl, void *data,
+ui_out_new (const struct ui_out_impl *impl, void *data,
int flags)
{
struct ui_out *uiout = XNEW (struct ui_out);
current->field_count = 0;
VEC_safe_push (ui_out_level_p, uiout->levels, current);
+ uiout->table.id = NULL;
uiout->table.header_first = NULL;
uiout->table.header_last = NULL;
uiout->table.header_next = NULL;