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]
Other format: [Raw text]

[commit/tui] Clean up ARI probs


FYI,

Committed,

Andrew
2004-02-07  Andrew Cagney  <cagney@redhat.com>
	
	* tui/tui-command.c: Include "gdb_string.h", delete register
	attribute, use ISO-C function signatures.
	* tui/tui-disasm.c, tui/tui-file.c, tui/tui-io.c: Ditto.
	* tui/tui-layout.c, tui/tui-regs.c, tui/tui-source.c: Ditto.
	* tui/tui-stack.c, tui/tui-win.c, tui/tui-winsource.c: Ditto.
	* tui/tui.c: Ditto.

Index: tui/tui-command.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-command.c,v
retrieving revision 1.8
diff -u -r1.8 tui-command.c
--- tui/tui-command.c	8 Feb 2004 00:05:16 -0000	1.8
+++ tui/tui-command.c	8 Feb 2004 01:30:08 -0000
@@ -65,7 +65,7 @@
   else
     {
       unsigned int c = 0, ch_copy = ch;
-      register int i;
+      int i;
       char *term;
 
       /* If this is an xterm, page next/prev keys aren't returned
Index: tui/tui-disasm.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-disasm.c,v
retrieving revision 1.11
diff -u -r1.11 tui-disasm.c
--- tui/tui-disasm.c	8 Feb 2004 00:05:16 -0000	1.11
+++ tui/tui-disasm.c	8 Feb 2004 01:30:08 -0000
@@ -95,7 +95,7 @@
 static CORE_ADDR
 tui_find_disassembly_address (CORE_ADDR pc, int from)
 {
-  register CORE_ADDR new_low;
+  CORE_ADDR new_low;
   int max_lines;
   int i;
   struct tui_asm_line* lines;
@@ -176,9 +176,9 @@
 tui_set_disassem_content (CORE_ADDR pc)
 {
   enum tui_status ret = TUI_FAILURE;
-  register int i;
+  int i;
   int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
-  register int line_width, max_lines;
+  int line_width, max_lines;
   CORE_ADDR cur_pc;
   struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
   int tab_len = tui_default_tab_len ();
Index: tui/tui-file.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-file.c,v
retrieving revision 1.10
diff -u -r1.10 tui-file.c
--- tui/tui-file.c	19 Jan 2004 04:31:50 -0000	1.10
+++ tui/tui-file.c	8 Feb 2004 01:30:08 -0000
@@ -25,7 +25,7 @@
 
 #include "tui.h"
 
-#include <string.h>
+#include "gdb_string.h"
 
 /* A ``struct ui_file'' that is compatible with all the legacy
    code. */
Index: tui/tui-io.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-io.c,v
retrieving revision 1.7
diff -u -r1.7 tui-io.c
--- tui/tui-io.c	8 Feb 2004 00:05:16 -0000	1.7
+++ tui/tui-io.c	8 Feb 2004 01:30:08 -0000
@@ -322,8 +322,7 @@
 
    Comes from readline/complete.c  */
 static char *
-printable_part (pathname)
-     char *pathname;
+printable_part (char *pathname)
 {
   char *temp;
 
@@ -360,8 +359,7 @@
     } while (0)
 
 static int
-print_filename (to_print, full_pathname)
-     char *to_print, *full_pathname;
+print_filename (char *to_print, char *full_pathname)
 {
   int printed_len = 0;
   char *s;
@@ -376,7 +374,7 @@
 /* The user must press "y" or "n".  Non-zero return means "y" pressed.
    Comes from readline/complete.c  */
 static int
-get_y_or_n ()
+get_y_or_n (void)
 {
   extern int _rl_abort_internal ();
   int c;
@@ -402,9 +400,7 @@
    Comes from readline/complete.c and modified to write in
    the TUI command window using tui_putc/tui_puts.  */
 static void
-tui_rl_display_match_list (matches, len, max)
-     char **matches;
-     int len, max;
+tui_rl_display_match_list (char **matches, int len, int max)
 {
   typedef int QSFUNC (const void *, const void *);
   extern int _rl_qsort_string_compare (const void*, const void*);
@@ -598,7 +594,7 @@
 
 /* Initialize the IO for gdb in curses mode.  */
 void
-tui_initialize_io ()
+tui_initialize_io (void)
 {
 #ifdef SIGCONT
   signal (SIGCONT, tui_cont_sig);
Index: tui/tui-layout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-layout.c,v
retrieving revision 1.14
diff -u -r1.14 tui-layout.c
--- tui/tui-layout.c	8 Feb 2004 00:05:16 -0000	1.14
+++ tui/tui-layout.c	8 Feb 2004 01:30:09 -0000
@@ -418,8 +418,8 @@
 
   if (layout_name != (char *) NULL)
     {
-      register int i;
-      register char *buf_ptr;
+      int i;
+      char *buf_ptr;
       enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
       enum tui_register_display_type dpy_type = TUI_UNDEFINED_REGS;
       enum tui_layout_type cur_layout = tui_current_layout ();
Index: tui/tui-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-regs.c,v
retrieving revision 1.9
diff -u -r1.9 tui-regs.c
--- tui/tui-regs.c	8 Feb 2004 00:05:16 -0000	1.9
+++ tui/tui-regs.c	8 Feb 2004 01:30:09 -0000
@@ -111,7 +111,7 @@
 int
 tui_last_regs_line_no (void)
 {
-  register int num_lines = (-1);
+  int num_lines = (-1);
 
   if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
     {
@@ -282,7 +282,7 @@
   if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL &&
       TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
     {
-      register int i = start_element_no;
+      int i = start_element_no;
       int j, value_chars_wide, item_win_width, cur_y, label_width;
       enum precision_type precision;
 
@@ -367,11 +367,11 @@
   if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL &&
       TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
     {
-      register int element_no = start_element_no;
+      int element_no = start_element_no;
 
       if (start_element_no != 0 && start_line_no != 0)
 	{
-	  register int last_line_no, first_line_on_last_page;
+	  int last_line_no, first_line_on_last_page;
 
 	  last_line_no = tui_last_regs_line_no ();
 	  first_line_on_last_page = last_line_no - (TUI_DATA_WIN->generic.height - 2);
Index: tui/tui-source.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-source.c,v
retrieving revision 1.8
diff -u -r1.8 tui-source.c
--- tui/tui-source.c	8 Feb 2004 00:05:16 -0000	1.8
+++ tui/tui-source.c	8 Feb 2004 01:30:09 -0000
@@ -52,9 +52,9 @@
 
   if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
     {
-      register FILE *stream;
-      register int i, desc, c, line_width, nlines;
-      register char *src_line = 0;
+      FILE *stream;
+      int i, desc, c, line_width, nlines;
+      char *src_line = 0;
 
       if ((ret = tui_alloc_source_buffer (TUI_SRC_WIN)) == TUI_SUCCESS)
 	{
@@ -92,7 +92,7 @@
 		}
 	      else
 		{
-		  register int offset, cur_line_no, cur_line, cur_len, threshold;
+		  int offset, cur_line_no, cur_line, cur_len, threshold;
 		  struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
                   struct tui_source_info * src = &TUI_SRC_WIN->detail.source_info;
 
Index: tui/tui-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-stack.c,v
retrieving revision 1.10
diff -u -r1.10 tui-stack.c
--- tui/tui-stack.c	8 Feb 2004 00:05:16 -0000	1.10
+++ tui/tui-stack.c	8 Feb 2004 01:30:09 -0000
@@ -326,11 +326,11 @@
 tui_show_frame_info (struct frame_info *fi)
 {
   struct tui_win_info * win_info;
-  register int i;
+  int i;
 
   if (fi)
     {
-      register int start_line, i;
+      int start_line, i;
       CORE_ADDR low;
       struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
       int source_already_displayed;
Index: tui/tui-win.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
retrieving revision 1.14
diff -u -r1.14 tui-win.c
--- tui/tui-win.c	8 Feb 2004 00:05:16 -0000	1.14
+++ tui/tui-win.c	8 Feb 2004 01:30:09 -0000
@@ -54,7 +54,7 @@
 #endif
 #endif
 
-#include <string.h>
+#include "gdb_string.h"
 #include <ctype.h>
 #include <readline/readline.h>
 
@@ -241,7 +241,7 @@
    Returns 1 if the configuration has changed and the screen should
    be redrawn.  */
 int
-tui_update_variables ()
+tui_update_variables (void)
 {
   int need_redraw = 0;
   struct tui_translate *entry;
@@ -404,7 +404,7 @@
 
 /* Update gdb's knowledge of the terminal size.  */
 void
-tui_update_gdb_sizes ()
+tui_update_gdb_sizes (void)
 {
   char cmd[50];
   int screenheight, screenwidth;
Index: tui/tui-winsource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-winsource.c,v
retrieving revision 1.12
diff -u -r1.12 tui-winsource.c
--- tui/tui-winsource.c	8 Feb 2004 00:05:16 -0000	1.12
+++ tui/tui-winsource.c	8 Feb 2004 01:30:10 -0000
@@ -205,7 +205,7 @@
 {
   if (win_info != NULL)
     {
-      register int i;
+      int i;
 
       win_info->generic.content_in_use = FALSE;
       tui_erase_source_content (win_info, display_prompt);
@@ -372,7 +372,7 @@
    This is called whenever a breakpoint is inserted, removed or
    has its state changed.  */
 void
-tui_update_all_breakpoint_info ()
+tui_update_all_breakpoint_info (void)
 {
   struct tui_list *list = tui_source_windows ();
   int i;
@@ -558,8 +558,8 @@
 enum tui_status
 tui_alloc_source_buffer (struct tui_win_info *win_info)
 {
-  register char *src_line_buf;
-  register int i, line_width, max_lines;
+  char *src_line_buf;
+  int i, line_width, max_lines;
   enum tui_status ret = TUI_FAILURE;
 
   max_lines = win_info->generic.height;	/* less the highlight box */
Index: tui/tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.44
diff -u -r1.44 tui.c
--- tui/tui.c	8 Feb 2004 00:05:16 -0000	1.44
+++ tui/tui.c	8 Feb 2004 01:30:12 -0000
@@ -283,7 +283,7 @@
    the command window is cleaner.  It will be displayed if
    we temporarily leave the SingleKey mode.  */
 static int
-tui_rl_startup_hook ()
+tui_rl_startup_hook (void)
 {
   rl_already_prompted = 1;
   if (tui_current_key_mode != TUI_COMMAND_MODE)
@@ -305,7 +305,7 @@
 /* Initialize readline and configure the keymap for the switching
    key shortcut.  */
 void
-tui_initialize_readline ()
+tui_initialize_readline (void)
 {
   int i;
   Keymap tui_ctlx_keymap;

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