Example #1
0
static void
mi_open (struct ui_out *uiout,
	 const char *name,
	 enum ui_out_type type)
{
  struct ui_out_data *data = ui_out_data (uiout);
  field_separator (uiout);
  data->suppress_field_separator = 1;
  if (name)
    fprintf_unfiltered (data->buffer, "%s=", name);
  switch (type)
    {
    case ui_out_type_tuple:
      fputc_unfiltered ('{', data->buffer);
      break;
    case ui_out_type_list:
      if (data->mi_version == 0)
	fputc_unfiltered ('{', data->buffer);
      else
	fputc_unfiltered ('[', data->buffer);
      break;
    default:
      internal_error (__FILE__, __LINE__, "bad switch");
    }
}
static void
cli_flush (struct ui_out *uiout)
{
  cli_out_data *data = ui_out_data (uiout);

  gdb_flush (data->stream);
}
Example #3
0
static void
tui_field_string (struct ui_out *uiout,
		  int fldno, int width,
		  enum ui_align align,
		  const char *fldname,
		  const char *string)
{
  tui_out_data *data = (tui_out_data *) ui_out_data (uiout);

  if (data->base.suppress_output)
    return;

  if (fldname && data->line > 0 && strcmp (fldname, "fullname") == 0)
    {
      data->start_of_line ++;
      if (data->line > 0)
        {
          tui_show_source (string, data->line);
        }
      return;
    }
  
  data->start_of_line++;

  (*cli_ui_out_impl.field_string) (uiout, fldno,
				   width, align,
				   fldname, string);
}
Example #4
0
static void
cli_table_end (struct ui_out *uiout)
{
  cli_out_data *data = ui_out_data (uiout);

  data->suppress_output = 0;
}
Example #5
0
static void
cli_uiout_dtor (struct ui_out *ui_out)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (ui_out);

  delete data;
}
static void
field_separator (void)
{
  cli_out_data *data = ui_out_data (uiout);

  fputc_filtered (' ', data->stream);
}
Example #7
0
void
tui_field_string (struct ui_out *uiout,
		  int fldno,
		  int width,
		  enum ui_align align,
		  const char *fldname,
		  const char *string)
{
  int before = 0;
  int after = 0;

  tui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;

  if (fldname && data->line > 0 && strcmp (fldname, "file") == 0)
    {
      data->start_of_line ++;
      if (data->line > 0)
        {
          tui_show_source (string, data->line);
        }
      return;
    }
  
  data->start_of_line ++;
  if ((align != ui_noalign) && string)
    {
      before = width - strlen (string);
      if (before <= 0)
	before = 0;
      else
	{
	  if (align == ui_right)
	    after = 0;
	  else if (align == ui_left)
	    {
	      after = before;
	      before = 0;
	    }
	  else
	    /* ui_center */
	    {
	      after = before / 2;
	      before -= after;
	    }
	}
    }

  if (before)
    ui_out_spaces (uiout, before);
  if (string)
    out_field_fmt (uiout, fldno, fldname, "%s", string);
  if (after)
    ui_out_spaces (uiout, after);

  if (align != ui_noalign)
    field_separator ();
}
Example #8
0
File: mi-out.c Project: 0mp/freebsd
void
mi_table_end (struct ui_out *uiout)
{
  mi_out_data *data = ui_out_data (uiout);
  data->suppress_output = 0;
  mi_close (uiout, ui_out_type_list); /* body */
  mi_close (uiout, ui_out_type_tuple);
}
Example #9
0
struct ui_file *
cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
{
  cli_out_data *data = ui_out_data (uiout);
  struct ui_file *old = data->stream;
  data->stream = stream;
  return old;
}
Example #10
0
static void
field_separator (void)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (current_uiout);
  struct ui_file *stream = data->streams.back ();

  fputc_filtered (' ', stream);
}
Example #11
0
static void
cli_flush (struct ui_out *uiout)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
  struct ui_file *stream = data->streams.back ();

  gdb_flush (stream);
}
Example #12
0
void
mi_out_put (struct ui_out *uiout,
	    struct ui_file *stream)
{
  struct ui_out_data *data = ui_out_data (uiout);
  ui_file_put (data->buffer, do_write, stream);
  ui_file_rewind (data->buffer);
}
Example #13
0
void
cli_wrap_hint (struct ui_out *uiout, char *identstring)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  wrap_here (identstring);
}
Example #14
0
void
cli_spaces (struct ui_out *uiout, int numspaces)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  print_spaces_filtered (numspaces, data->stream);
}
Example #15
0
void
cli_text (struct ui_out *uiout, const char *string)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  fputs_filtered (string, data->stream);
}
Example #16
0
static void
field_separator (void)
{
  cli_out_data *data = ui_out_data (current_uiout);
  struct ui_file *stream = VEC_last (ui_filep, data->streams);

  fputc_filtered (' ', stream);
}
Example #17
0
static void
cli_uiout_dtor (struct ui_out *ui_out)
{
  cli_out_data *data = ui_out_data (ui_out);

  VEC_free (ui_filep, data->streams);
  xfree (data);
}
Example #18
0
static void
cli_flush (struct ui_out *uiout)
{
  cli_out_data *data = ui_out_data (uiout);
  struct ui_file *stream = VEC_last (ui_filep, data->streams);

  gdb_flush (stream);
}
Example #19
0
void
cli_end (struct ui_out *uiout,
	 enum ui_out_type type,
	 int level)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
}
Example #20
0
void
cli_table_body (struct ui_out *uiout)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  /* first, close the table header line */
  cli_text (uiout, "\n");
}
Example #21
0
static void
field_separator (struct ui_out *uiout)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_field_separator)
    data->suppress_field_separator = 0;
  else
    fputc_unfiltered (',', data->buffer);
}
Example #22
0
static void
cli_end (struct ui_out *uiout,
	 enum ui_out_type type)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);

  if (data->suppress_output)
    return;
}
Example #23
0
void
mi_field_skip (struct ui_out *uiout, int fldno, int width,
               enum ui_align alignment, const char *fldname)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  mi_field_string (uiout, fldno, width, alignment, fldname, "");
}
Example #24
0
void
cli_begin (struct ui_out *uiout,
	   enum ui_out_type type,
	   int level,
	   const char *id)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
}
Example #25
0
void
cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
		  const char *col_name,
		  const char *colhdr)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  cli_field_string (uiout, 0, width, alignment, 0, colhdr);
}
Example #26
0
File: mi-out.c Project: 0mp/freebsd
void
mi_table_body (struct ui_out *uiout)
{
  mi_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  /* close the table header line if there were any headers */
  mi_close (uiout, ui_out_type_list);
  mi_open (uiout, "body", ui_out_type_list);
}
Example #27
0
File: mi-out.c Project: 0mp/freebsd
void
mi_end (struct ui_out *uiout,
	enum ui_out_type type,
	int level)
{
  mi_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  mi_close (uiout, type);
}
Example #28
0
void
cli_message (struct ui_out *uiout, int verbosity,
	     const char *format, va_list args)
{
  struct ui_out_data *data = ui_out_data (uiout);
  if (data->suppress_output)
    return;
  if (ui_out_get_verblvl (uiout) >= verbosity)
    vfprintf_unfiltered (data->stream, format, args);
}
Example #29
0
static void
cli_begin (struct ui_out *uiout,
	   enum ui_out_type type,
	   const char *id)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);

  if (data->suppress_output)
    return;
}
Example #30
0
cli_message (struct ui_out *uiout, const char *format, va_list args)
{
  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);

  if (data->suppress_output)
    return;

  struct ui_file *stream = data->streams.back ();
  vfprintf_unfiltered (stream, format, args);
}