From a743e5423cbb33c02296c19756d1d08511c4da69 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 7 Jan 2011 20:24:18 +0000 Subject: [PATCH] 2011-01-07 Michael Snyder * mi/mi-cmd-disas.c (mi_cmd_disassemble): Mark up error message for i18n. * tui/tui-layout.c (tui_set_layout_for_display_command): Split line so that operator goes to beginning of line. * tui/tui-winsource.c (tui_horizontal_source_scroll): Move assignment out of if statement. --- gdb/ChangeLog | 9 +++++++++ gdb/mi/mi-cmd-disas.c | 8 ++++---- gdb/tui/tui-layout.c | 4 ++-- gdb/tui/tui-winsource.c | 5 +++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea1e853233c..b3b3a818191 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2011-01-07 Michael Snyder + + * mi/mi-cmd-disas.c (mi_cmd_disassemble): Mark up error message + for i18n. + * tui/tui-layout.c (tui_set_layout_for_display_command): + Split line so that operator goes to beginning of line. + * tui/tui-winsource.c (tui_horizontal_source_scroll): Move + assignment out of if statement. + 2011-01-07 Michael Snyder * ada-lang.c: Comment cleanup, mostly periods and spaces. diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c index 73d63739aef..1932ae26be2 100644 --- a/gdb/mi/mi-cmd-disas.c +++ b/gdb/mi/mi-cmd-disas.c @@ -128,12 +128,12 @@ mi_cmd_disassemble (char *command, char **argv, int argc) if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen) || (line_seen && file_seen && !num_seen && !start_seen && !end_seen) || (!line_seen && !file_seen && !num_seen && start_seen && end_seen))) - error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n " - "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode."); + error (_("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n " + "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.")); if (argc != 1) - error ("mi_cmd_disassemble: Usage: [-f filename -l " - "linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode."); + error (_("mi_cmd_disassemble: Usage: [-f filename -l linenum " + "[-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.")); mixed_source_and_assembly = atoi (argv[0]); if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1)) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 5bfce76c03a..80df011aca6 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -488,8 +488,8 @@ tui_set_layout_for_display_command (const char *layout_name) { if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_UNDEFINED_REGS) - dpy_type = - TUI_DATA_WIN->detail.data_display_info.regs_display_type; + dpy_type + = TUI_DATA_WIN->detail.data_display_info.regs_display_type; else dpy_type = TUI_GENERAL_REGS; } diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 8b7783634ab..139c669d82b 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -342,8 +342,9 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info, + num_to_scroll; else { - if ((offset = win_info->detail.source_info.horizontal_offset - - num_to_scroll) < 0) + offset = win_info->detail.source_info.horizontal_offset + - num_to_scroll; + if (offset < 0) offset = 0; } win_info->detail.source_info.horizontal_offset = offset; -- 2.30.2