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
case.
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
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;
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 ();
#include "tui.h"
-#include <string.h>
+#include "gdb_string.h"
/* A ``struct ui_file'' that is compatible with all the legacy
code. */
Comes from readline/complete.c */
static char *
-printable_part (pathname)
- char *pathname;
+printable_part (char *pathname)
{
char *temp;
} 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;
/* 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;
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*);
/* Initialize the IO for gdb in curses mode. */
void
-tui_initialize_io ()
+tui_initialize_io (void)
{
#ifdef SIGCONT
signal (SIGCONT, tui_cont_sig);
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 ();
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)
{
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;
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);
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)
{
}
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;
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;
#endif
#endif
-#include <string.h>
+#include "gdb_string.h"
#include <ctype.h>
#include <readline/readline.h>
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;
/* Update gdb's knowledge of the terminal size. */
void
-tui_update_gdb_sizes ()
+tui_update_gdb_sizes (void)
{
char cmd[50];
int screenheight, screenwidth;
{
if (win_info != NULL)
{
- register int i;
+ int i;
win_info->generic.content_in_use = FALSE;
tui_erase_source_content (win_info, display_prompt);
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;
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 */
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)
/* 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;