aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-15 00:19:44 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-15 00:19:44 +0000
commite5908723e599e3788a3fbceeef35804024a03af7 (patch)
tree430eb9a83e3edec1f52b027b8edbc092c1e1ec46 /gdb
parent8676c0493c4cd9793b684402ecf8775cc4f6b763 (diff)
downloadgdb-e5908723e599e3788a3fbceeef35804024a03af7.zip
gdb-e5908723e599e3788a3fbceeef35804024a03af7.tar.gz
gdb-e5908723e599e3788a3fbceeef35804024a03af7.tar.bz2
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c, tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c, tui-wingeneral.c, tui-winsource.c: Coding standard, && and || go at beginning of new line.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/tui/tui-command.c3
-rw-r--r--gdb/tui/tui-data.c7
-rw-r--r--gdb/tui/tui-disasm.c3
-rw-r--r--gdb/tui/tui-file.c4
-rw-r--r--gdb/tui/tui-io.c7
-rw-r--r--gdb/tui/tui-layout.c73
-rw-r--r--gdb/tui/tui-regs.c27
-rw-r--r--gdb/tui/tui-source.c31
-rw-r--r--gdb/tui/tui-win.c63
-rw-r--r--gdb/tui/tui-windata.c15
-rw-r--r--gdb/tui/tui-wingeneral.c8
-rw-r--r--gdb/tui/tui-winsource.c26
13 files changed, 156 insertions, 116 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5885772..bd452f2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2007-08-14 Michael Snyder <msnyder@access-company.com>
+ * tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
+ tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
+ tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
+ go at beginning of new line.
+
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index 5c58b11..7b9d529 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -73,7 +73,8 @@ tui_dispatch_ctrl_char (unsigned int ch)
{
for (i = 0; term[i]; i++)
term[i] = toupper (term[i]);
- if ((strcmp (term, "XTERM") == 0) && key_is_start_sequence (ch))
+ if ((strcmp (term, "XTERM") == 0)
+ && key_is_start_sequence (ch))
{
unsigned int page_ch = 0;
unsigned int tmp_char;
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 93fb1f2..e5268db 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -342,7 +342,8 @@ tui_next_win (struct tui_win_info *cur_win)
type = cur_win->generic.type + 1;
while (type != cur_win->generic.type && (next_win == NULL))
{
- if (tui_win_list[type] && tui_win_list[type]->generic.is_visible)
+ if (tui_win_list[type]
+ && tui_win_list[type]->generic.is_visible)
next_win = tui_win_list[type];
else
{
@@ -401,8 +402,8 @@ tui_partial_win_by_name (char *name)
if (tui_win_list[i] != 0)
{
char *cur_name = tui_win_name (&tui_win_list[i]->generic);
- if (strlen (name) <= strlen (cur_name) &&
- strncmp (name, cur_name, strlen (name)) == 0)
+ if (strlen (name) <= strlen (cur_name)
+ && strncmp (name, cur_name, strlen (name)) == 0)
win_info = tui_win_list[i];
}
i++;
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 1678a62..3ce2da5 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -283,7 +283,8 @@ tui_show_disassem (CORE_ADDR start_addr)
/* If the focus was in the src win, put it in the asm win, if the
source view isn't split. */
- if (tui_current_layout () != SRC_DISASSEM_COMMAND && win_with_focus == TUI_SRC_WIN)
+ if (tui_current_layout () != SRC_DISASSEM_COMMAND
+ && win_with_focus == TUI_SRC_WIN)
tui_set_win_focus_to (TUI_DISASM_WIN);
return;
diff --git a/gdb/tui/tui-file.c b/gdb/tui/tui-file.c
index 84bc0be..45ac281 100644
--- a/gdb/tui/tui-file.c
+++ b/gdb/tui/tui-file.c
@@ -78,8 +78,8 @@ tui_file_delete (struct ui_file *file)
if (tmpstream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_delete: bad magic number"));
- if ((tmpstream->ts_streamtype == astring) &&
- (tmpstream->ts_strbuf != NULL))
+ if ((tmpstream->ts_streamtype == astring)
+ && (tmpstream->ts_strbuf != NULL))
{
xfree (tmpstream->ts_strbuf);
}
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index d627ecd..1371384 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -73,7 +73,8 @@ key_is_command_char (int ch)
|| (ch == KEY_LEFT) || (ch == KEY_RIGHT)
|| (ch == KEY_UP) || (ch == KEY_DOWN)
|| (ch == KEY_SF) || (ch == KEY_SR)
- || (ch == (int)'\f') || key_is_start_sequence (ch));
+ || (ch == (int)'\f')
+ || key_is_start_sequence (ch));
}
/* Use definition from readline 4.3. */
@@ -329,7 +330,9 @@ printable_part (char *pathname)
temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL;
#if defined (__MSDOS__)
- if (rl_filename_completion_desired && temp == 0 && isalpha (pathname[0]) && pathname[1] == ':')
+ if (rl_filename_completion_desired
+ && temp == 0 && isalpha (pathname[0])
+ && pathname[1] == ':')
temp = pathname + 1;
#endif
return (temp ? ++temp : pathname);
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index cffa217..9da0f3c 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -91,7 +91,8 @@ show_layout (enum tui_layout_type layout)
source/asm. */
tui_free_all_source_wins_content ();
tui_clear_source_windows ();
- if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND)
+ if (layout == SRC_DATA_COMMAND
+ || layout == DISASSEM_DATA_COMMAND)
{
show_data (layout);
tui_refresh_all (tui_win_list);
@@ -137,33 +138,37 @@ tui_set_layout (enum tui_layout_type layout_type,
{
enum tui_status status = TUI_SUCCESS;
- if (layout_type != UNDEFINED_LAYOUT || regs_display_type != TUI_UNDEFINED_REGS)
+ if (layout_type != UNDEFINED_LAYOUT
+ || regs_display_type != TUI_UNDEFINED_REGS)
{
- enum tui_layout_type cur_layout = tui_current_layout (), new_layout = UNDEFINED_LAYOUT;
+ enum tui_layout_type cur_layout = tui_current_layout (),
+ new_layout = UNDEFINED_LAYOUT;
int regs_populate = FALSE;
CORE_ADDR addr = extract_display_start_addr ();
struct tui_win_info *win_with_focus = tui_win_with_focus ();
struct tui_layout_def *layout_def = tui_layout_def ();
- if (layout_type == UNDEFINED_LAYOUT &&
- regs_display_type != TUI_UNDEFINED_REGS)
+ if (layout_type == UNDEFINED_LAYOUT
+ && regs_display_type != TUI_UNDEFINED_REGS)
{
if (cur_layout == SRC_DISASSEM_COMMAND)
new_layout = DISASSEM_DATA_COMMAND;
- else if (cur_layout == SRC_COMMAND || cur_layout == SRC_DATA_COMMAND)
+ else if (cur_layout == SRC_COMMAND
+ || cur_layout == SRC_DATA_COMMAND)
new_layout = SRC_DATA_COMMAND;
- else if (cur_layout == DISASSEM_COMMAND ||
- cur_layout == DISASSEM_DATA_COMMAND)
+ else if (cur_layout == DISASSEM_COMMAND
+ || cur_layout == DISASSEM_DATA_COMMAND)
new_layout = DISASSEM_DATA_COMMAND;
}
else
new_layout = layout_type;
- regs_populate = (new_layout == SRC_DATA_COMMAND ||
- new_layout == DISASSEM_DATA_COMMAND ||
- regs_display_type != TUI_UNDEFINED_REGS);
- if (new_layout != cur_layout || regs_display_type != TUI_UNDEFINED_REGS)
+ regs_populate = (new_layout == SRC_DATA_COMMAND
+ || new_layout == DISASSEM_DATA_COMMAND
+ || regs_display_type != TUI_UNDEFINED_REGS);
+ if (new_layout != cur_layout
+ || regs_display_type != TUI_UNDEFINED_REGS)
{
if (new_layout != cur_layout)
{
@@ -241,9 +246,9 @@ tui_set_layout (enum tui_layout_type layout_type,
/*
* Now update the window content.
*/
- if (!regs_populate &&
- (new_layout == SRC_DATA_COMMAND ||
- new_layout == DISASSEM_DATA_COMMAND))
+ if (!regs_populate
+ && (new_layout == SRC_DATA_COMMAND
+ || new_layout == DISASSEM_DATA_COMMAND))
tui_display_all_data ();
tui_update_source_windows_with_addr (addr);
@@ -271,9 +276,9 @@ tui_add_win_to_layout (enum tui_win_type type)
switch (type)
{
case SRC_WIN:
- if (cur_layout != SRC_COMMAND &&
- cur_layout != SRC_DISASSEM_COMMAND &&
- cur_layout != SRC_DATA_COMMAND)
+ if (cur_layout != SRC_COMMAND
+ && cur_layout != SRC_DISASSEM_COMMAND
+ && cur_layout != SRC_DATA_COMMAND)
{
tui_clear_source_windows_detail ();
if (cur_layout == DISASSEM_DATA_COMMAND)
@@ -283,9 +288,9 @@ tui_add_win_to_layout (enum tui_win_type type)
}
break;
case DISASSEM_WIN:
- if (cur_layout != DISASSEM_COMMAND &&
- cur_layout != SRC_DISASSEM_COMMAND &&
- cur_layout != DISASSEM_DATA_COMMAND)
+ if (cur_layout != DISASSEM_COMMAND
+ && cur_layout != SRC_DISASSEM_COMMAND
+ && cur_layout != DISASSEM_DATA_COMMAND)
{
tui_clear_source_windows_detail ();
if (cur_layout == SRC_DATA_COMMAND)
@@ -295,8 +300,8 @@ tui_add_win_to_layout (enum tui_win_type type)
}
break;
case DATA_WIN:
- if (cur_layout != SRC_DATA_COMMAND &&
- cur_layout != DISASSEM_DATA_COMMAND)
+ if (cur_layout != SRC_DATA_COMMAND
+ && cur_layout != DISASSEM_DATA_COMMAND)
{
if (cur_layout == DISASSEM_COMMAND)
show_layout (DISASSEM_DATA_COMMAND);
@@ -424,7 +429,8 @@ tui_set_layout_for_display_command (const char *layout_name)
buf_ptr[i] = toupper (buf_ptr[i]);
/* First check for ambiguous input. */
- if (strlen (buf_ptr) <= 1 && (*buf_ptr == 'S' || *buf_ptr == '$'))
+ if (strlen (buf_ptr) <= 1
+ && (*buf_ptr == 'S' || *buf_ptr == '$'))
{
warning (_("Ambiguous command input."));
status = TUI_FAILURE;
@@ -437,13 +443,14 @@ tui_set_layout_for_display_command (const char *layout_name)
new_layout = DISASSEM_COMMAND;
else if (subset_compare (buf_ptr, "SPLIT"))
new_layout = SRC_DISASSEM_COMMAND;
- else if (subset_compare (buf_ptr, "REGS") ||
- subset_compare (buf_ptr, TUI_GENERAL_SPECIAL_REGS_NAME) ||
- subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME) ||
- subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME) ||
- subset_compare (buf_ptr, TUI_SPECIAL_REGS_NAME))
+ else if (subset_compare (buf_ptr, "REGS")
+ || subset_compare (buf_ptr, TUI_GENERAL_SPECIAL_REGS_NAME)
+ || subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME)
+ || subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME)
+ || subset_compare (buf_ptr, TUI_SPECIAL_REGS_NAME))
{
- if (cur_layout == SRC_COMMAND || cur_layout == SRC_DATA_COMMAND)
+ if (cur_layout == SRC_COMMAND
+ || cur_layout == SRC_DATA_COMMAND)
new_layout = SRC_DATA_COMMAND;
else
new_layout = DISASSEM_DATA_COMMAND;
@@ -455,10 +462,8 @@ tui_set_layout_for_display_command (const char *layout_name)
up this code. - edie epstein */
if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME))
{
- if (TUI_DATA_WIN->detail.data_display_info.regs_display_type !=
- TUI_SFLOAT_REGS &&
- TUI_DATA_WIN->detail.data_display_info.regs_display_type !=
- TUI_DFLOAT_REGS)
+ if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS
+ && TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS)
dpy_type = TUI_SFLOAT_REGS;
else
dpy_type =
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 1bad41d..74128f3 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -321,8 +321,8 @@ tui_display_registers_from (int start_element_no)
{
struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info;
- if (display_info->regs_content != (tui_win_content) NULL &&
- display_info->regs_content_count > 0)
+ if (display_info->regs_content != (tui_win_content) NULL
+ && display_info->regs_content_count > 0)
{
int i = start_element_no;
int j, value_chars_wide, item_win_width, cur_y;
@@ -365,12 +365,13 @@ tui_display_registers_from (int start_element_no)
/* Now create each data "sub" window, and write the display into
it. */
cur_y = 1;
- while (i < display_info->regs_content_count &&
- cur_y <= TUI_DATA_WIN->generic.viewport_height)
+ while (i < display_info->regs_content_count
+ && cur_y <= TUI_DATA_WIN->generic.viewport_height)
{
for (j = 0;
- (j < display_info->regs_column_count &&
- i < display_info->regs_content_count); j++)
+ j < display_info->regs_column_count
+ && i < display_info->regs_content_count;
+ j++)
{
struct tui_gen_win_info *data_item_win;
struct tui_data_element *data_element_ptr;
@@ -420,8 +421,8 @@ void
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)
+ 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)
{
int element_no = start_element_no;
@@ -438,8 +439,8 @@ tui_display_reg_element_at_line (int start_element_no,
the element_no causes us to scroll past the end of the
registers, adjust what element to really start the
display at. */
- if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0 &&
- start_line_no > first_line_on_last_page)
+ if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0
+ && start_line_no > first_line_on_last_page)
element_no = tui_first_reg_element_no_inline (first_line_on_last_page);
}
tui_display_registers_from (element_no);
@@ -496,12 +497,14 @@ tui_display_registers_from_line (int line_no,
void
tui_check_register_values (struct frame_info *frame)
{
- if (TUI_DATA_WIN != NULL && TUI_DATA_WIN->generic.is_visible)
+ if (TUI_DATA_WIN != NULL
+ && TUI_DATA_WIN->generic.is_visible)
{
struct tui_data_info *display_info
= &TUI_DATA_WIN->detail.data_display_info;
- if (display_info->regs_content_count <= 0 && display_info->display_regs)
+ if (display_info->regs_content_count <= 0
+ && display_info->display_regs)
tui_show_registers (display_info->current_group);
else
{
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 0ea54a1..240a82c 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -146,17 +146,17 @@ tui_set_source_content (struct symtab *s,
cur_line_no;
element->which_element.source.is_exec_point =
(strcmp (((struct tui_win_element *)
- locator->content[0])->which_element.locator.file_name,
+ locator->content[0])->which_element.locator.file_name,
s->filename) == 0
&& cur_line_no == ((struct tui_win_element *)
- locator->content[0])->which_element.locator.line_no);
+ locator->content[0])->which_element.locator.line_no);
if (c != EOF)
{
i = strlen (src_line) - 1;
do
{
- if ((c != '\n') &&
- (c != '\r') && (++i < threshold))
+ if ((c != '\n') && (c != '\r')
+ && (++i < threshold))
{
if (c < 040 && c != '\t')
{
@@ -178,10 +178,9 @@ tui_set_source_content (struct symtab *s,
{
int j, max_tab_len = tui_default_tab_len ();
- for (j = i - (
- (i / max_tab_len) * max_tab_len);
- ((j < max_tab_len) &&
- i < threshold);
+ for (j = i - ((i / max_tab_len) * max_tab_len);
+ j < max_tab_len
+ && i < threshold;
i++, j++)
src_line[i] = ' ';
i--;
@@ -197,8 +196,9 @@ tui_set_source_content (struct symtab *s,
while (c != EOF && c != '\n' && c != '\r')
c = fgetc (stream);
/* Handle non-'\n' end-of-line. */
- if (c == '\r' &&
- (c = fgetc (stream)) != '\n' && c != EOF)
+ if (c == '\r'
+ && (c = fgetc (stream)) != '\n'
+ && c != EOF)
{
ungetc (c, stream);
c = '\r';
@@ -206,8 +206,9 @@ tui_set_source_content (struct symtab *s,
}
}
- while (c != EOF && c != '\n' && c != '\r' &&
- i < threshold && (c = fgetc (stream)));
+ while (c != EOF && c != '\n' && c != '\r'
+ && i < threshold
+ && (c = fgetc (stream)));
}
/* Now copy the line taking the offset into
account. */
@@ -326,9 +327,9 @@ tui_show_symtab_source (struct symtab *s,
int
tui_source_is_displayed (char *fname)
{
- return (TUI_SRC_WIN->generic.content_in_use &&
- (strcmp (((struct tui_win_element *) (tui_locator_win_info_ptr ())->
- content[0])->which_element.locator.file_name, fname) == 0));
+ return (TUI_SRC_WIN->generic.content_in_use
+ && (strcmp (((struct tui_win_element *) (tui_locator_win_info_ptr ())->
+ content[0])->which_element.locator.file_name, fname) == 0));
}
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index d7ea4eb..9c411a1 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -556,7 +556,8 @@ tui_scroll_left (struct tui_win_info *win_to_scroll,
"psuedo" scroll since not all of the source is in memory,
only what is in the viewport. If win_to_scroll is the command
window do nothing since the term should handle it. */
- if (win_to_scroll == TUI_SRC_WIN || win_to_scroll == TUI_DISASM_WIN)
+ if (win_to_scroll == TUI_SRC_WIN
+ || win_to_scroll == TUI_DISASM_WIN)
tui_horizontal_source_scroll (win_to_scroll, LEFT_SCROLL, _num_to_scroll);
}
}
@@ -577,7 +578,8 @@ tui_scroll_right (struct tui_win_info *win_to_scroll,
"psuedo" scroll since not all of the source is in memory,
only what is in the viewport. If win_to_scroll is the command
window do nothing since the term should handle it. */
- if (win_to_scroll == TUI_SRC_WIN || win_to_scroll == TUI_DISASM_WIN)
+ if (win_to_scroll == TUI_SRC_WIN
+ || win_to_scroll == TUI_DISASM_WIN)
tui_horizontal_source_scroll (win_to_scroll, RIGHT_SCROLL, _num_to_scroll);
}
}
@@ -618,7 +620,8 @@ tui_refresh_all_win (void)
tui_refresh_all (tui_win_list);
for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++)
{
- if (tui_win_list[type] && tui_win_list[type]->generic.is_visible)
+ if (tui_win_list[type]
+ && tui_win_list[type]->generic.is_visible)
{
switch (type)
{
@@ -671,8 +674,9 @@ tui_resize_all (void)
tui_update_gdb_sizes ();
tui_set_term_height_to (screenheight);
tui_set_term_width_to (screenwidth);
- if (cur_layout == SRC_DISASSEM_COMMAND ||
- cur_layout == SRC_DATA_COMMAND || cur_layout == DISASSEM_DATA_COMMAND)
+ if (cur_layout == SRC_DISASSEM_COMMAND
+ || cur_layout == SRC_DATA_COMMAND
+ || cur_layout == DISASSEM_DATA_COMMAND)
num_wins_displayed++;
split_diff = height_diff / num_wins_displayed;
cmd_split_diff = split_diff;
@@ -783,7 +787,8 @@ tui_resize_all (void)
they get created again when called for with the new size. */
for (win_type = SRC_WIN; (win_type < MAX_MAJOR_WINDOWS); win_type++)
{
- if (win_type != CMD_WIN && (tui_win_list[win_type] != NULL)
+ if (win_type != CMD_WIN
+ && (tui_win_list[win_type] != NULL)
&& !tui_win_list[win_type]->generic.is_visible)
{
tui_free_window (tui_win_list[win_type]);
@@ -895,7 +900,8 @@ tui_set_focus (char *arg, int from_tty)
else
win_info = tui_partial_win_by_name (buf_ptr);
- if (win_info == (struct tui_win_info *) NULL || !win_info->generic.is_visible)
+ if (win_info == (struct tui_win_info *) NULL
+ || !win_info->generic.is_visible)
warning (_("Invalid window specified. \n\
The window name specified must be valid and visible.\n"));
else
@@ -930,7 +936,8 @@ tui_all_windows_info (char *arg, int from_tty)
struct tui_win_info *win_with_focus = tui_win_with_focus ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
- if (tui_win_list[type] && tui_win_list[type]->generic.is_visible)
+ if (tui_win_list[type]
+ && tui_win_list[type]->generic.is_visible)
{
if (win_with_focus == tui_win_list[type])
printf_filtered (" %s\t(%d lines) <has focus>\n",
@@ -998,7 +1005,8 @@ tui_set_win_height (char *arg, int from_tty)
wname[i] = toupper (wname[i]);
win_info = tui_partial_win_by_name (wname);
- if (win_info == (struct tui_win_info *) NULL || !win_info->generic.is_visible)
+ if (win_info == (struct tui_win_info *) NULL
+ || !win_info->generic.is_visible)
warning (_("Invalid window specified. \n\
The window name specified must be valid and visible.\n"));
else
@@ -1081,9 +1089,9 @@ tui_xdb_set_win_height (char *arg, int from_tty)
{ /* Add 1 for the locator. */
int new_height = tui_term_height () - (input_no + 1);
- if (!new_height_ok (tui_win_list[CMD_WIN], new_height) ||
- tui_adjust_win_heights (tui_win_list[CMD_WIN],
- new_height) == TUI_FAILURE)
+ if (!new_height_ok (tui_win_list[CMD_WIN], new_height)
+ || tui_adjust_win_heights (tui_win_list[CMD_WIN],
+ new_height) == TUI_FAILURE)
warning (_("Invalid window height specified.\n%s"),
XDBWIN_HEIGHT_USAGE);
}
@@ -1121,7 +1129,8 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
enum tui_layout_type cur_layout = tui_current_layout ();
diff = (new_height - primary_win_info->generic.height) * (-1);
- if (cur_layout == SRC_COMMAND || cur_layout == DISASSEM_COMMAND)
+ if (cur_layout == SRC_COMMAND
+ || cur_layout == DISASSEM_COMMAND)
{
struct tui_win_info *src_win_info;
@@ -1393,12 +1402,12 @@ new_height_ok (struct tui_win_info *primary_win_info,
diff = (new_height - primary_win_info->generic.height) * (-1);
if (cur_layout == SRC_COMMAND || cur_layout == DISASSEM_COMMAND)
{
- ok = ((primary_win_info->generic.type == CMD_WIN &&
- new_height <= (tui_term_height () - 4) &&
- new_height >= MIN_CMD_WIN_HEIGHT) ||
- (primary_win_info->generic.type != CMD_WIN &&
- new_height <= (tui_term_height () - 2) &&
- new_height >= MIN_WIN_HEIGHT));
+ ok = ((primary_win_info->generic.type == CMD_WIN
+ && new_height <= (tui_term_height () - 4)
+ && new_height >= MIN_CMD_WIN_HEIGHT)
+ || (primary_win_info->generic.type != CMD_WIN
+ && new_height <= (tui_term_height () - 2)
+ && new_height >= MIN_WIN_HEIGHT));
if (ok)
{ /* Check the total height. */
struct tui_win_info *win_info;
@@ -1439,12 +1448,13 @@ new_height_ok (struct tui_win_info *primary_win_info,
/* Locator included since first & second win share a line. */
ok = ((first_win->generic.height +
second_win->generic.height + diff) >=
- (MIN_WIN_HEIGHT * 2) &&
- new_height >= MIN_CMD_WIN_HEIGHT);
+ (MIN_WIN_HEIGHT * 2)
+ && new_height >= MIN_CMD_WIN_HEIGHT);
if (ok)
{
- total_height = new_height + (first_win->generic.height +
- second_win->generic.height + diff);
+ total_height = new_height +
+ (first_win->generic.height +
+ second_win->generic.height + diff);
min_height = MIN_CMD_WIN_HEIGHT;
}
}
@@ -1479,7 +1489,8 @@ new_height_ok (struct tui_win_info *primary_win_info,
/* Now make sure that the proposed total height doesn't
exceed the old total height. */
if (ok)
- ok = (new_height >= min_height && total_height <= cur_total_height);
+ ok = (new_height >= min_height
+ && total_height <= cur_total_height);
}
}
@@ -1541,8 +1552,8 @@ parse_scrolling_args (char *arg,
wname[i] = toupper (wname[i]);
*win_to_scroll = tui_partial_win_by_name (wname);
- if (*win_to_scroll == (struct tui_win_info *) NULL ||
- !(*win_to_scroll)->generic.is_visible)
+ if (*win_to_scroll == (struct tui_win_info *) NULL
+ || !(*win_to_scroll)->generic.is_visible)
error (_("Invalid window specified. \n\
The window name specified must be valid and visible.\n"));
else if (*win_to_scroll == TUI_CMD_WIN)
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index 846a499..940cb63 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -51,13 +51,16 @@ tui_first_data_item_displayed (void)
int element_no = (-1);
int i;
- for (i = 0; (i < TUI_DATA_WIN->generic.content_size && element_no < 0); i++)
+ for (i = 0;
+ i < TUI_DATA_WIN->generic.content_size && element_no < 0;
+ i++)
{
struct tui_gen_win_info *data_item_win;
data_item_win = &((tui_win_content)
TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
- if (data_item_win->handle != (WINDOW *) NULL && data_item_win->is_visible)
+ if (data_item_win->handle != (WINDOW *) NULL
+ && data_item_win->is_visible)
element_no = i;
}
@@ -140,8 +143,8 @@ tui_display_all_data (void)
/* Then display the other data. */
if (TUI_DATA_WIN->detail.data_display_info.data_content !=
- (tui_win_content) NULL &&
- TUI_DATA_WIN->detail.data_display_info.data_content_count > 0)
+ (tui_win_content) NULL
+ && TUI_DATA_WIN->detail.data_display_info.data_content_count > 0)
{
}
}
@@ -238,7 +241,9 @@ tui_check_data_values (struct frame_info *frame)
{
int i;
- for (i = 0; TUI_DATA_WIN->detail.data_display_info.data_content_count; i++)
+ for (i = 0;
+ TUI_DATA_WIN->detail.data_display_info.data_content_count;
+ i++)
{
#ifdef LATER
tui_data_element_ptr data_element_ptr;
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index ab41336..2609a45 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -113,7 +113,8 @@ box_win (struct tui_gen_win_info *win_info,
void
tui_unhighlight_win (struct tui_win_info *win_info)
{
- if (win_info != NULL && win_info->generic.handle != (WINDOW *) NULL)
+ if (win_info != NULL
+ && win_info->generic.handle != (WINDOW *) NULL)
{
box_win ((struct tui_gen_win_info *) win_info, NO_HILITE);
wrefresh (win_info->generic.handle);
@@ -190,8 +191,9 @@ make_visible (struct tui_gen_win_info *win_info, int visible)
win_info->is_visible = TRUE;
}
}
- else if (!visible &&
- win_info->is_visible && win_info->handle != (WINDOW *) NULL)
+ else if (!visible
+ && win_info->is_visible
+ && win_info->handle != (WINDOW *) NULL)
{
win_info->is_visible = FALSE;
tui_delete_win (win_info->handle);
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 54da755..06c4777 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -118,8 +118,8 @@ tui_update_source_window_as_is (struct tui_win_info *win_info,
set_current_source_symtab_and_line (&sal);
/* If the focus was in the asm win, put it in the src win if
we don't have a split layout. */
- if (tui_win_with_focus () == TUI_DISASM_WIN &&
- tui_current_layout () != SRC_DISASSEM_COMMAND)
+ if (tui_win_with_focus () == TUI_DISASM_WIN
+ && tui_current_layout () != SRC_DISASSEM_COMMAND)
tui_set_win_focus_to (TUI_SRC_WIN);
}
}
@@ -631,14 +631,15 @@ tui_line_is_displayed (int line,
else
threshold = 0;
i = 0;
- while (i < win_info->generic.content_size - threshold && !is_displayed)
+ while (i < win_info->generic.content_size - threshold
+ && !is_displayed)
{
is_displayed = (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.loa
+ win_info->generic.content[i])->which_element.source.line_or_addr.loa
== LOA_LINE)
- && (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.u.line_no
- == (int) line);
+ && (((struct tui_win_element *)
+ win_info->generic.content[i])->which_element.source.line_or_addr.u.line_no
+ == (int) line);
i++;
}
@@ -661,14 +662,15 @@ tui_addr_is_displayed (CORE_ADDR addr,
else
threshold = 0;
i = 0;
- while (i < win_info->generic.content_size - threshold && !is_displayed)
+ while (i < win_info->generic.content_size - threshold
+ && !is_displayed)
{
is_displayed = (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.loa
+ win_info->generic.content[i])->which_element.source.line_or_addr.loa
== LOA_ADDRESS)
- && (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.u.addr
- == addr);
+ && (((struct tui_win_element *)
+ win_info->generic.content[i])->which_element.source.line_or_addr.u.addr
+ == addr);
i++;
}