forked from Imagelibrary/binutils-gdb
2010-05-16 Michael Snyder <msnyder@vmware.com>
* target.c: White space. * target-descriptions.c: White space. * target-memory.c: White space. * thread.c: White space. * top.c: White space. * tracepoint.c: White space. * trad-frame.c: White space. * tramp-frame.c: White space. * ui-file.c: White space. * ui-out.c: White space. * user-regs.c: White space. * utils.c: White space.
This commit is contained in:
12
gdb/ui-out.c
12
gdb/ui-out.c
@@ -124,6 +124,7 @@ push_level (struct ui_out *uiout,
|
||||
const char *id)
|
||||
{
|
||||
struct ui_out_level *current;
|
||||
|
||||
/* We had better not overflow the buffer. */
|
||||
uiout->level++;
|
||||
gdb_assert (uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS);
|
||||
@@ -371,6 +372,7 @@ ui_out_begin (struct ui_out *uiout,
|
||||
const char *id)
|
||||
{
|
||||
int new_level;
|
||||
|
||||
if (uiout->table.flag && !uiout->table.body_flag)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("table header or table_body expected; lists must be \
|
||||
@@ -387,6 +389,7 @@ specified after table_body."));
|
||||
int fldno;
|
||||
int width;
|
||||
int align;
|
||||
|
||||
verify_field (uiout, &fldno, &width, &align);
|
||||
}
|
||||
|
||||
@@ -406,6 +409,7 @@ ui_out_end (struct ui_out *uiout,
|
||||
enum ui_out_type type)
|
||||
{
|
||||
int old_level = pop_level (uiout, type);
|
||||
|
||||
uo_end (uiout, type, old_level);
|
||||
}
|
||||
|
||||
@@ -419,6 +423,7 @@ static void
|
||||
do_cleanup_end (void *data)
|
||||
{
|
||||
struct ui_out_end_cleanup_data *end_cleanup_data = data;
|
||||
|
||||
ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type);
|
||||
xfree (end_cleanup_data);
|
||||
}
|
||||
@@ -428,6 +433,7 @@ make_cleanup_ui_out_end (struct ui_out *uiout,
|
||||
enum ui_out_type type)
|
||||
{
|
||||
struct ui_out_end_cleanup_data *end_cleanup_data;
|
||||
|
||||
end_cleanup_data = XMALLOC (struct ui_out_end_cleanup_data);
|
||||
end_cleanup_data->uiout = uiout;
|
||||
end_cleanup_data->type = type;
|
||||
@@ -511,6 +517,7 @@ ui_out_field_stream (struct ui_out *uiout,
|
||||
long length;
|
||||
char *buffer = ui_file_xstrdup (buf->stream, &length);
|
||||
struct cleanup *old_cleanup = make_cleanup (xfree, buffer);
|
||||
|
||||
if (length > 0)
|
||||
ui_out_field_string (uiout, fldname, buffer);
|
||||
else
|
||||
@@ -589,9 +596,7 @@ ui_out_message (struct ui_out *uiout, int verbosity,
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
|
||||
uo_message (uiout, verbosity, format, args);
|
||||
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
@@ -651,7 +656,6 @@ ui_out_set_flags (struct ui_out *uiout, int mask)
|
||||
int oldflags = uiout->flags;
|
||||
|
||||
uiout->flags |= mask;
|
||||
|
||||
return oldflags;
|
||||
}
|
||||
|
||||
@@ -662,7 +666,6 @@ ui_out_clear_flags (struct ui_out *uiout, int mask)
|
||||
int oldflags = uiout->flags;
|
||||
|
||||
uiout->flags &= ~mask;
|
||||
|
||||
return oldflags;
|
||||
}
|
||||
|
||||
@@ -1145,6 +1148,7 @@ ui_out_new (struct ui_out_impl *impl, void *data,
|
||||
int flags)
|
||||
{
|
||||
struct ui_out *uiout = XMALLOC (struct ui_out);
|
||||
|
||||
uiout->data = data;
|
||||
uiout->impl = impl;
|
||||
uiout->flags = flags;
|
||||
|
||||
Reference in New Issue
Block a user