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.
This commit is contained in:
Andrew Cagney 2004-02-08 01:32:26 +00:00
parent 6ba8e26f70
commit d02c80cdf4
12 changed files with 38 additions and 35 deletions

View file

@ -1,4 +1,11 @@
2004-02-07 Andrew Cagney <cagney@redhat.com> 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.
* tui/tui-command.c: Change variable and function names to lower * tui/tui-command.c: Change variable and function names to lower
case. case.

View file

@ -65,7 +65,7 @@ tui_dispatch_ctrl_char (unsigned int ch)
else else
{ {
unsigned int c = 0, ch_copy = ch; unsigned int c = 0, ch_copy = ch;
register int i; int i;
char *term; char *term;
/* If this is an xterm, page next/prev keys aren't returned /* If this is an xterm, page next/prev keys aren't returned

View file

@ -95,7 +95,7 @@ tui_disassemble (struct tui_asm_line* lines, CORE_ADDR pc, int count)
static CORE_ADDR static CORE_ADDR
tui_find_disassembly_address (CORE_ADDR pc, int from) tui_find_disassembly_address (CORE_ADDR pc, int from)
{ {
register CORE_ADDR new_low; CORE_ADDR new_low;
int max_lines; int max_lines;
int i; int i;
struct tui_asm_line* lines; struct tui_asm_line* lines;
@ -176,9 +176,9 @@ enum tui_status
tui_set_disassem_content (CORE_ADDR pc) tui_set_disassem_content (CORE_ADDR pc)
{ {
enum tui_status ret = TUI_FAILURE; enum tui_status ret = TUI_FAILURE;
register int i; int i;
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset; 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; CORE_ADDR cur_pc;
struct tui_gen_win_info * locator = tui_locator_win_info_ptr (); struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
int tab_len = tui_default_tab_len (); int tab_len = tui_default_tab_len ();

View file

@ -25,7 +25,7 @@
#include "tui.h" #include "tui.h"
#include <string.h> #include "gdb_string.h"
/* A ``struct ui_file'' that is compatible with all the legacy /* A ``struct ui_file'' that is compatible with all the legacy
code. */ code. */

View file

@ -322,8 +322,7 @@ tui_readline_output (int code, gdb_client_data data)
Comes from readline/complete.c */ Comes from readline/complete.c */
static char * static char *
printable_part (pathname) printable_part (char *pathname)
char *pathname;
{ {
char *temp; char *temp;
@ -360,8 +359,7 @@ printable_part (pathname)
} while (0) } while (0)
static int static int
print_filename (to_print, full_pathname) print_filename (char *to_print, char *full_pathname)
char *to_print, *full_pathname;
{ {
int printed_len = 0; int printed_len = 0;
char *s; char *s;
@ -376,7 +374,7 @@ print_filename (to_print, full_pathname)
/* The user must press "y" or "n". Non-zero return means "y" pressed. /* The user must press "y" or "n". Non-zero return means "y" pressed.
Comes from readline/complete.c */ Comes from readline/complete.c */
static int static int
get_y_or_n () get_y_or_n (void)
{ {
extern int _rl_abort_internal (); extern int _rl_abort_internal ();
int c; int c;
@ -402,9 +400,7 @@ get_y_or_n ()
Comes from readline/complete.c and modified to write in Comes from readline/complete.c and modified to write in
the TUI command window using tui_putc/tui_puts. */ the TUI command window using tui_putc/tui_puts. */
static void static void
tui_rl_display_match_list (matches, len, max) tui_rl_display_match_list (char **matches, int len, int max)
char **matches;
int len, max;
{ {
typedef int QSFUNC (const void *, const void *); typedef int QSFUNC (const void *, const void *);
extern int _rl_qsort_string_compare (const void*, const void*); extern int _rl_qsort_string_compare (const void*, const void*);
@ -598,7 +594,7 @@ tui_cont_sig (int sig)
/* Initialize the IO for gdb in curses mode. */ /* Initialize the IO for gdb in curses mode. */
void void
tui_initialize_io () tui_initialize_io (void)
{ {
#ifdef SIGCONT #ifdef SIGCONT
signal (SIGCONT, tui_cont_sig); signal (SIGCONT, tui_cont_sig);

View file

@ -418,8 +418,8 @@ tui_set_layout_for_display_command (const char *layout_name)
if (layout_name != (char *) NULL) if (layout_name != (char *) NULL)
{ {
register int i; int i;
register char *buf_ptr; char *buf_ptr;
enum tui_layout_type new_layout = UNDEFINED_LAYOUT; enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
enum tui_register_display_type dpy_type = TUI_UNDEFINED_REGS; enum tui_register_display_type dpy_type = TUI_UNDEFINED_REGS;
enum tui_layout_type cur_layout = tui_current_layout (); enum tui_layout_type cur_layout = tui_current_layout ();

View file

@ -111,7 +111,7 @@ static void tui_scroll_regs_backward_command (char *, int);
int int
tui_last_regs_line_no (void) 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) if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
{ {
@ -282,7 +282,7 @@ tui_display_registers_from (int start_element_no)
if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL && 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) 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; int j, value_chars_wide, item_win_width, cur_y, label_width;
enum precision_type precision; enum precision_type precision;
@ -367,11 +367,11 @@ tui_display_reg_element_at_line (int start_element_no, int start_line_no)
if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL && 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) 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) 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 (); last_line_no = tui_last_regs_line_no ();
first_line_on_last_page = last_line_no - (TUI_DATA_WIN->generic.height - 2); first_line_on_last_page = last_line_no - (TUI_DATA_WIN->generic.height - 2);

View file

@ -52,9 +52,9 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
if (s != (struct symtab *) NULL && s->filename != (char *) NULL) if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
{ {
register FILE *stream; FILE *stream;
register int i, desc, c, line_width, nlines; int i, desc, c, line_width, nlines;
register char *src_line = 0; char *src_line = 0;
if ((ret = tui_alloc_source_buffer (TUI_SRC_WIN)) == TUI_SUCCESS) if ((ret = tui_alloc_source_buffer (TUI_SRC_WIN)) == TUI_SUCCESS)
{ {
@ -92,7 +92,7 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
} }
else 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_gen_win_info * locator = tui_locator_win_info_ptr ();
struct tui_source_info * src = &TUI_SRC_WIN->detail.source_info; struct tui_source_info * src = &TUI_SRC_WIN->detail.source_info;

View file

@ -326,11 +326,11 @@ void
tui_show_frame_info (struct frame_info *fi) tui_show_frame_info (struct frame_info *fi)
{ {
struct tui_win_info * win_info; struct tui_win_info * win_info;
register int i; int i;
if (fi) if (fi)
{ {
register int start_line, i; int start_line, i;
CORE_ADDR low; CORE_ADDR low;
struct tui_gen_win_info * locator = tui_locator_win_info_ptr (); struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
int source_already_displayed; int source_already_displayed;

View file

@ -54,7 +54,7 @@
#endif #endif
#endif #endif
#include <string.h> #include "gdb_string.h"
#include <ctype.h> #include <ctype.h>
#include <readline/readline.h> #include <readline/readline.h>
@ -241,7 +241,7 @@ translate (const char *name, struct tui_translate *table)
Returns 1 if the configuration has changed and the screen should Returns 1 if the configuration has changed and the screen should
be redrawn. */ be redrawn. */
int int
tui_update_variables () tui_update_variables (void)
{ {
int need_redraw = 0; int need_redraw = 0;
struct tui_translate *entry; struct tui_translate *entry;
@ -404,7 +404,7 @@ Usage: w <#lines>\n");
/* Update gdb's knowledge of the terminal size. */ /* Update gdb's knowledge of the terminal size. */
void void
tui_update_gdb_sizes () tui_update_gdb_sizes (void)
{ {
char cmd[50]; char cmd[50];
int screenheight, screenwidth; int screenheight, screenwidth;

View file

@ -205,7 +205,7 @@ tui_clear_source_content (struct tui_win_info * win_info, int display_prompt)
{ {
if (win_info != NULL) if (win_info != NULL)
{ {
register int i; int i;
win_info->generic.content_in_use = FALSE; win_info->generic.content_in_use = FALSE;
tui_erase_source_content (win_info, display_prompt); tui_erase_source_content (win_info, display_prompt);
@ -372,7 +372,7 @@ tui_set_is_exec_point_at (union tui_line_or_address l, struct tui_win_info * win
This is called whenever a breakpoint is inserted, removed or This is called whenever a breakpoint is inserted, removed or
has its state changed. */ has its state changed. */
void void
tui_update_all_breakpoint_info () tui_update_all_breakpoint_info (void)
{ {
struct tui_list *list = tui_source_windows (); struct tui_list *list = tui_source_windows ();
int i; int i;
@ -558,8 +558,8 @@ tui_update_exec_info (struct tui_win_info * win_info)
enum tui_status enum tui_status
tui_alloc_source_buffer (struct tui_win_info *win_info) tui_alloc_source_buffer (struct tui_win_info *win_info)
{ {
register char *src_line_buf; char *src_line_buf;
register int i, line_width, max_lines; int i, line_width, max_lines;
enum tui_status ret = TUI_FAILURE; enum tui_status ret = TUI_FAILURE;
max_lines = win_info->generic.height; /* less the highlight box */ max_lines = win_info->generic.height; /* less the highlight box */

View file

@ -283,7 +283,7 @@ tui_rl_next_keymap (int notused1, int notused2)
the command window is cleaner. It will be displayed if the command window is cleaner. It will be displayed if
we temporarily leave the SingleKey mode. */ we temporarily leave the SingleKey mode. */
static int static int
tui_rl_startup_hook () tui_rl_startup_hook (void)
{ {
rl_already_prompted = 1; rl_already_prompted = 1;
if (tui_current_key_mode != TUI_COMMAND_MODE) if (tui_current_key_mode != TUI_COMMAND_MODE)
@ -305,7 +305,7 @@ tui_set_key_mode (enum tui_key_mode mode)
/* Initialize readline and configure the keymap for the switching /* Initialize readline and configure the keymap for the switching
key shortcut. */ key shortcut. */
void void
tui_initialize_readline () tui_initialize_readline (void)
{ {
int i; int i;
Keymap tui_ctlx_keymap; Keymap tui_ctlx_keymap;