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] More s/char */const char */ for ui-out


Just FYI,

The previous cleanup makes this one possible.

	Andrew
2001-06-11  Andrew Cagney  <ac131313@redhat.com>

	* ui-out.h (ui_out_table_begin): Make char* parameters constant.
	(ui_out_table_header, ui_out_field_int): Ditto.
	(ui_out_field_core_addr, ui_out_field_string): Ditto.
	(ui_out_field_stream, ui_out_field_fmt): Ditto.
	(ui_out_field_skip, ui_out_text, ui_out_message): Ditto.
	* ui-out.c (ui_out_table_begin, ui_out_table_header): Update.
	(ui_out_field_core_addr, ui_out_field_stream): Update.
	(ui_out_field_string, ui_out_field_fmt): Update.
	(ui_out_text, ui_out_message): Update.
	(append_header_to_list): Make char* parameters constant.
	(uo_table_header, uo_table_begin): Ditto.
	(uo_field_int, uo_field_skip): Ditto.
	(uo_field_string, uo_field_fmt): Ditto.
	(uo_text, uo_message): Ditto.

Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.13
diff -p -r1.13 ui-out.c
*** ui-out.c	2001/06/10 00:22:40	1.13
--- ui-out.c	2001/06/11 16:28:41
*************** struct ui_out *uiout = &def_uiout;
*** 208,218 ****
  
  /* These are the interfaces to implementation functions */
  
! static void uo_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
  static void uo_table_body (struct ui_out *uiout);
  static void uo_table_end (struct ui_out *uiout);
  static void uo_table_header (struct ui_out *uiout, int width,
! 			     enum ui_align align, char *colhdr);
  static void uo_begin (struct ui_out *uiout,
  		      enum ui_out_type type,
  		      int level, const char *id);
--- 208,219 ----
  
  /* These are the interfaces to implementation functions */
  
! static void uo_table_begin (struct ui_out *uiout, int nbrofcols,
! 			    const char *tblid);
  static void uo_table_body (struct ui_out *uiout);
  static void uo_table_end (struct ui_out *uiout);
  static void uo_table_header (struct ui_out *uiout, int width,
! 			     enum ui_align align, const char *colhdr);
  static void uo_begin (struct ui_out *uiout,
  		      enum ui_out_type type,
  		      int level, const char *id);
*************** static void uo_end (struct ui_out *uiout
*** 220,244 ****
  		    enum ui_out_type type,
  		    int level);
  static void uo_field_int (struct ui_out *uiout, int fldno, int width,
! 			  enum ui_align align, char *fldname, int value);
  static void uo_field_skip (struct ui_out *uiout, int fldno, int width,
! 			   enum ui_align align, char *fldname);
  static void uo_field_string (struct ui_out *uiout, int fldno, int width,
! 			  enum ui_align align, char *fldname, const char *string);
  static void uo_field_fmt (struct ui_out *uiout, int fldno, int width,
! 			  enum ui_align align, char *fldname,
! 			  char *format, va_list args);
  static void uo_spaces (struct ui_out *uiout, int numspaces);
! static void uo_text (struct ui_out *uiout, char *string);
  static void uo_message (struct ui_out *uiout, int verbosity,
! 			char *format, va_list args);
  static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
  static void uo_flush (struct ui_out *uiout);
  
  /* Prototypes for local functions */
  
  extern void _initialize_ui_out (void);
! static void append_header_to_list (struct ui_out *uiout, int width, int alignment, char *colhdr);
  static int get_curr_header (struct ui_out *uiout, int *colno, int *width,
  			    int *alignment, char **colhdr);
  static void clear_header_list (struct ui_out *uiout);
--- 221,247 ----
  		    enum ui_out_type type,
  		    int level);
  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);
  static void uo_spaces (struct ui_out *uiout, int numspaces);
! static void uo_text (struct ui_out *uiout, const char *string);
  static void uo_message (struct ui_out *uiout, int verbosity,
! 			const char *format, va_list args);
  static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
  static void uo_flush (struct ui_out *uiout);
  
  /* Prototypes for local functions */
  
  extern void _initialize_ui_out (void);
! static void append_header_to_list (struct ui_out *uiout, int width,
! 				   int alignment, const char *colhdr);
  static int get_curr_header (struct ui_out *uiout, int *colno, int *width,
  			    int *alignment, char **colhdr);
  static void clear_header_list (struct ui_out *uiout);
*************** static void init_ui_out_state (struct ui
*** 252,258 ****
  /* Mark beginning of a table */
  
  void
! ui_out_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
  {
    if (uiout->table_flag)
      internal_error (__FILE__, __LINE__,
--- 255,262 ----
  /* Mark beginning of a table */
  
  void
! ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
! 		    const char *tblid)
  {
    if (uiout->table_flag)
      internal_error (__FILE__, __LINE__,
*************** ui_out_table_end (struct ui_out *uiout)
*** 311,317 ****
  
  void
  ui_out_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
! 		     char *colhdr)
  {
    if (!uiout->table_flag || uiout->body_flag)
      internal_error (__FILE__, __LINE__,
--- 315,321 ----
  
  void
  ui_out_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
! 		     const char *colhdr)
  {
    if (!uiout->table_flag || uiout->body_flag)
      internal_error (__FILE__, __LINE__,
*************** make_cleanup_ui_out_list_begin_end (stru
*** 420,426 ****
  }
  
  void
! ui_out_field_int (struct ui_out *uiout, char *fldname, int value)
  {
    int fldno;
    int width;
--- 424,432 ----
  }
  
  void
! ui_out_field_int (struct ui_out *uiout,
! 		  const char *fldname,
! 		  int value)
  {
    int fldno;
    int width;
*************** ui_out_field_int (struct ui_out *uiout, 
*** 438,444 ****
  }
  
  void
! ui_out_field_core_addr (struct ui_out *uiout, char *fldname, CORE_ADDR address)
  {
    char addstr[20];
  
--- 444,452 ----
  }
  
  void
! ui_out_field_core_addr (struct ui_out *uiout,
! 			const char *fldname,
! 			CORE_ADDR address)
  {
    char addstr[20];
  
*************** ui_out_field_core_addr (struct ui_out *u
*** 450,456 ****
  }
  
  void
! ui_out_field_stream (struct ui_out *uiout, char *fldname, struct ui_stream *buf)
  {
    long length;
    char *buffer = ui_file_xstrdup (buf->stream, &length);
--- 458,466 ----
  }
  
  void
! ui_out_field_stream (struct ui_out *uiout,
! 		     const char *fldname,
! 		     struct ui_stream *buf)
  {
    long length;
    char *buffer = ui_file_xstrdup (buf->stream, &length);
*************** ui_out_field_stream (struct ui_out *uiou
*** 466,472 ****
  /* used to ommit a field */
  
  void
! ui_out_field_skip (struct ui_out *uiout, char *fldname)
  {
    int fldno;
    int width;
--- 476,483 ----
  /* used to ommit a field */
  
  void
! ui_out_field_skip (struct ui_out *uiout,
! 		   const char *fldname)
  {
    int fldno;
    int width;
*************** ui_out_field_skip (struct ui_out *uiout,
*** 485,491 ****
  
  void
  ui_out_field_string (struct ui_out *uiout,
! 		     char *fldname,
  		     const char *string)
  {
    int fldno;
--- 496,502 ----
  
  void
  ui_out_field_string (struct ui_out *uiout,
! 		     const char *fldname,
  		     const char *string)
  {
    int fldno;
*************** ui_out_field_string (struct ui_out *uiou
*** 505,511 ****
  
  /* VARARGS */
  void
! ui_out_field_fmt (struct ui_out *uiout, char *fldname, char *format,...)
  {
    va_list args;
    int fldno;
--- 516,524 ----
  
  /* VARARGS */
  void
! ui_out_field_fmt (struct ui_out *uiout,
! 		  const char *fldname,
! 		  const char *format, ...)
  {
    va_list args;
    int fldno;
*************** ui_out_spaces (struct ui_out *uiout, int
*** 535,547 ****
  }
  
  void
! ui_out_text (struct ui_out *uiout, char *string)
  {
    uo_text (uiout, string);
  }
  
  void
! ui_out_message (struct ui_out *uiout, int verbosity, char *format,...)
  {
    va_list args;
  
--- 548,562 ----
  }
  
  void
! ui_out_text (struct ui_out *uiout,
! 	     const char *string)
  {
    uo_text (uiout, string);
  }
  
  void
! ui_out_message (struct ui_out *uiout, int verbosity,
! 		const char *format,...)
  {
    va_list args;
  
*************** default_flush (struct ui_out *uiout)
*** 789,795 ****
  /* Interface to the implementation functions */
  
  void
! uo_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
  {
    if (!uiout->impl->table_begin)
      return;
--- 804,811 ----
  /* Interface to the implementation functions */
  
  void
! uo_table_begin (struct ui_out *uiout, int nbrofcols,
! 		const char *tblid)
  {
    if (!uiout->impl->table_begin)
      return;
*************** uo_table_end (struct ui_out *uiout)
*** 813,819 ****
  }
  
  void
! uo_table_header (struct ui_out *uiout, int width, enum ui_align align, char *colhdr)
  {
    if (!uiout->impl->table_header)
      return;
--- 829,836 ----
  }
  
  void
! uo_table_header (struct ui_out *uiout, int width, enum ui_align align,
! 		 const char *colhdr)
  {
    if (!uiout->impl->table_header)
      return;
*************** uo_end (struct ui_out *uiout,
*** 842,848 ****
  }
  
  void
! uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname, int value)
  {
    if (!uiout->impl->field_int)
      return;
--- 859,867 ----
  }
  
  void
! uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align,
! 	      const char *fldname,
! 	      int value)
  {
    if (!uiout->impl->field_int)
      return;
*************** uo_field_int (struct ui_out *uiout, int 
*** 850,856 ****
  }
  
  void
! uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname)
  {
    if (!uiout->impl->field_skip)
      return;
--- 869,876 ----
  }
  
  void
! uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align,
! 	       const char *fldname)
  {
    if (!uiout->impl->field_skip)
      return;
*************** uo_field_skip (struct ui_out *uiout, int
*** 859,865 ****
  
  void
  uo_field_string (struct ui_out *uiout, int fldno, int width,
! 		 enum ui_align align, char *fldname, const char *string)
  {
    if (!uiout->impl->field_string)
      return;
--- 879,887 ----
  
  void
  uo_field_string (struct ui_out *uiout, int fldno, int width,
! 		 enum ui_align align,
! 		 const char *fldname,
! 		 const char *string)
  {
    if (!uiout->impl->field_string)
      return;
*************** uo_field_string (struct ui_out *uiout, i
*** 867,873 ****
  }
  
  void
! uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname, char *format, va_list args)
  {
    if (!uiout->impl->field_fmt)
      return;
--- 889,898 ----
  }
  
  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)
  {
    if (!uiout->impl->field_fmt)
      return;
*************** uo_spaces (struct ui_out *uiout, int num
*** 883,889 ****
  }
  
  void
! uo_text (struct ui_out *uiout, char *string)
  {
    if (!uiout->impl->text)
      return;
--- 908,915 ----
  }
  
  void
! uo_text (struct ui_out *uiout,
! 	 const char *string)
  {
    if (!uiout->impl->text)
      return;
*************** uo_text (struct ui_out *uiout, char *str
*** 891,897 ****
  }
  
  void
! uo_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
  {
    if (!uiout->impl->message)
      return;
--- 917,925 ----
  }
  
  void
! uo_message (struct ui_out *uiout, int verbosity,
! 	    const char *format,
! 	    va_list args)
  {
    if (!uiout->impl->message)
      return;
*************** static void
*** 937,943 ****
  append_header_to_list (struct ui_out *uiout,
  		       int width,
  		       int alignment,
! 		       char *colhdr)
  {
    struct ui_out_hdr *temphdr;
  
--- 965,971 ----
  append_header_to_list (struct ui_out *uiout,
  		       int width,
  		       int alignment,
! 		       const char *colhdr)
  {
    struct ui_out_hdr *temphdr;
  
Index: ui-out.h
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.h,v
retrieving revision 1.10
diff -p -r1.10 ui-out.h
*** ui-out.h	2001/06/10 00:22:40	1.10
--- ui-out.h	2001/06/11 16:28:41
*************** extern struct cleanup *ui_out_begin_clea
*** 89,98 ****
     field, ... }, ... ] }'' */
  
  extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
! 				char *tblid);
  
  extern void ui_out_table_header (struct ui_out *uiout, int width,
! 				 enum ui_align align, char *colhdr);
  
  extern void ui_out_table_body (struct ui_out *uiout);
  
--- 89,98 ----
     field, ... }, ... ] }'' */
  
  extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
! 				const char *tblid);
  
  extern void ui_out_table_header (struct ui_out *uiout, int width,
! 				 enum ui_align align, const char *colhdr);
  
  extern void ui_out_table_body (struct ui_out *uiout);
  
*************** extern void ui_out_tuple_end (struct ui_
*** 114,141 ****
  extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
  							    const char *id);
  
! extern void ui_out_field_int (struct ui_out *uiout, char *fldname, int value);
  
! extern void ui_out_field_core_addr (struct ui_out *uiout, char *fldname,
  				    CORE_ADDR address);
  
! extern void ui_out_field_string (struct ui_out * uiout, char *fldname,
  				 const char *string);
  
! extern void ui_out_field_stream (struct ui_out *uiout, char *fldname,
  				 struct ui_stream *buf);
  
! extern void ui_out_field_fmt (struct ui_out *uiout, char *fldname,
! 			      char *format, ...);
  
! extern void ui_out_field_skip (struct ui_out *uiout, char *fldname);
  
  extern void ui_out_spaces (struct ui_out *uiout, int numspaces);
  
! extern void ui_out_text (struct ui_out *uiout, char *string);
  
  extern void ui_out_message (struct ui_out *uiout, int verbosity,
! 			    char *format, ...);
  
  extern struct ui_stream *ui_out_stream_new (struct ui_out *uiout);
  
--- 114,142 ----
  extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
  							    const char *id);
  
! extern void ui_out_field_int (struct ui_out *uiout, const char *fldname,
! 			      int value);
  
! extern void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname,
  				    CORE_ADDR address);
  
! extern void ui_out_field_string (struct ui_out * uiout, const char *fldname,
  				 const char *string);
  
! extern void ui_out_field_stream (struct ui_out *uiout, const char *fldname,
  				 struct ui_stream *buf);
  
! extern void ui_out_field_fmt (struct ui_out *uiout, const char *fldname,
! 			      const char *format, ...);
  
! extern void ui_out_field_skip (struct ui_out *uiout, const char *fldname);
  
  extern void ui_out_spaces (struct ui_out *uiout, int numspaces);
  
! extern void ui_out_text (struct ui_out *uiout, const char *string);
  
  extern void ui_out_message (struct ui_out *uiout, int verbosity,
! 			    const char *format, ...);
  
  extern struct ui_stream *ui_out_stream_new (struct ui_out *uiout);
  

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