mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 05:00:01 +00:00
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:
parent
6ba8e26f70
commit
d02c80cdf4
@ -1,4 +1,11 @@
|
||||
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.
|
||||
|
@ -65,7 +65,7 @@ tui_dispatch_ctrl_char (unsigned int ch)
|
||||
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
|
||||
|
@ -95,7 +95,7 @@ tui_disassemble (struct tui_asm_line* lines, CORE_ADDR pc, int count)
|
||||
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 @@ enum tui_status
|
||||
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 ();
|
||||
|
@ -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. */
|
||||
|
@ -322,8 +322,7 @@ tui_readline_output (int code, gdb_client_data data)
|
||||
|
||||
Comes from readline/complete.c */
|
||||
static char *
|
||||
printable_part (pathname)
|
||||
char *pathname;
|
||||
printable_part (char *pathname)
|
||||
{
|
||||
char *temp;
|
||||
|
||||
@ -360,8 +359,7 @@ printable_part (pathname)
|
||||
} 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 @@ print_filename (to_print, full_pathname)
|
||||
/* 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 @@ get_y_or_n ()
|
||||
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 @@ tui_cont_sig (int sig)
|
||||
|
||||
/* Initialize the IO for gdb in curses mode. */
|
||||
void
|
||||
tui_initialize_io ()
|
||||
tui_initialize_io (void)
|
||||
{
|
||||
#ifdef SIGCONT
|
||||
signal (SIGCONT, tui_cont_sig);
|
||||
|
@ -418,8 +418,8 @@ tui_set_layout_for_display_command (const char *layout_name)
|
||||
|
||||
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 ();
|
||||
|
@ -111,7 +111,7 @@ static void tui_scroll_regs_backward_command (char *, int);
|
||||
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 @@ tui_display_registers_from (int start_element_no)
|
||||
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 @@ 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 &&
|
||||
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);
|
||||
|
@ -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)
|
||||
{
|
||||
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 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
||||
}
|
||||
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;
|
||||
|
||||
|
@ -326,11 +326,11 @@ void
|
||||
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;
|
||||
|
@ -54,7 +54,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "gdb_string.h"
|
||||
#include <ctype.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
|
||||
be redrawn. */
|
||||
int
|
||||
tui_update_variables ()
|
||||
tui_update_variables (void)
|
||||
{
|
||||
int need_redraw = 0;
|
||||
struct tui_translate *entry;
|
||||
@ -404,7 +404,7 @@ Usage: w <#lines>\n");
|
||||
|
||||
/* Update gdb's knowledge of the terminal size. */
|
||||
void
|
||||
tui_update_gdb_sizes ()
|
||||
tui_update_gdb_sizes (void)
|
||||
{
|
||||
char cmd[50];
|
||||
int screenheight, screenwidth;
|
||||
|
@ -205,7 +205,7 @@ tui_clear_source_content (struct tui_win_info * win_info, int display_prompt)
|
||||
{
|
||||
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 @@ 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
|
||||
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 @@ tui_update_exec_info (struct tui_win_info * win_info)
|
||||
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 */
|
||||
|
@ -283,7 +283,7 @@ tui_rl_next_keymap (int notused1, int notused2)
|
||||
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 @@ tui_set_key_mode (enum tui_key_mode 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;
|
||||
|
Loading…
Reference in New Issue
Block a user