This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch/mi] Output ``[]'' when a list


Hello,

The attatched patch tweeks gdb/mi so that it will output ``[...]'' when 
a list.  It doesn't affect anything since, at present, nothing is 
producing lists.

	Andrew
2001-05-12  Andrew Cagney  <ac131313@redhat.com>

	* mi-out.c (mi_close, mi_open): Output ``[]'' when a list.

Index: mi-out.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-out.c,v
retrieving revision 1.9
diff -p -r1.9 mi-out.c
*** mi-out.c	2001/05/12 04:08:24	1.9
--- mi-out.c	2001/05/14 16:56:36
*************** mi_open (struct ui_out *uiout,
*** 307,313 ****
  	 enum ui_out_type type)
  {
    struct ui_out_data *data = ui_out_data (uiout);
!   fputc_unfiltered ('{', data->buffer);
  }
  
  static void
--- 307,323 ----
  	 enum ui_out_type type)
  {
    struct ui_out_data *data = ui_out_data (uiout);
!   switch (type)
!     {
!     case ui_out_type_tuple:
!       fputc_unfiltered ('{', data->buffer);
!       break;
!     case ui_out_type_list:
!       fputc_unfiltered ('[', data->buffer);
!       break;
!     default:
!       internal_error (__FILE__, __LINE__, "bad switch");
!     }
  }
  
  static void
*************** mi_close (struct ui_out *uiout,
*** 315,321 ****
  	  enum ui_out_type type)
  {
    struct ui_out_data *data = ui_out_data (uiout);
!   fputc_unfiltered ('}', data->buffer);
  }
  
  /* add a string to the buffer */
--- 325,341 ----
  	  enum ui_out_type type)
  {
    struct ui_out_data *data = ui_out_data (uiout);
!   switch (type)
!     {
!     case ui_out_type_tuple:
!       fputc_unfiltered ('}', data->buffer);
!       break;
!     case ui_out_type_list:
!       fputc_unfiltered (']', data->buffer);
!       break;
!     default:
!       internal_error (__FILE__, __LINE__, "bad switch");
!     }
  }
  
  /* add a string to the buffer */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]