diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-01-06 00:57:05 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-01-06 00:57:05 +0000 |
commit | 9a2b4c1ba76f3dff85f08faff0dd08849c2905fb (patch) | |
tree | f1207a32403657c19e469f90bc242979ed26ed6e /gdb/tui/tui-source.c | |
parent | 493e2a69a40a30bcabe6ad5390dbae9bab98015d (diff) | |
download | binutils-gdb-9a2b4c1ba76f3dff85f08faff0dd08849c2905fb.tar.gz |
2011-01-05 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: Shorten lines of >= 80 columns.
* cli/cli-decode.c: Ditto.
* cli/cli-dump.c: Ditto.
* cli/cli-logging.c: Ditto.
* cli/cli-script.c: Ditto.
* cli/cli-setshow.c: Ditto.
* common/signals.c: Ditto.
* mi/mi-cmd-break.c: Ditto.
* mi/mi-cmd-disas.c: Ditto.
* mi/mi-cmd-stack.c: Ditto.
* mi/mi-cmd-var.c: Ditto.
* mi/mi-cmds.c: Ditto.
* mi/mi-common.h: Ditto.
* mi/mi-console.c: Ditto.
* mi/mi-interp.c: Ditto.
* mi/mi-main.c: Ditto.
* osf-share/cma_attr.c: Ditto.
* osf-share/cma_deb_core.h: Ditto.
* osf-share/cma_debug_client.h: Ditto.
* osf-share/cma_handle.h: Ditto.
* osf-share/cma_mutex.h: Ditto.
* osf-share/cma_stack_int.h: Ditto.
* osf-share/cma_tcb_defs.h: Ditto.
* python/py-auto-load.c: Ditto.
* python/py-breakpoint.c: Ditto.
* python/py-cmd.c: Ditto.
* python/py-frame.c: Ditto.
* python/py-objfile.c: Ditto.
* python/py-param.c: Ditto.
* python/py-progspace.c: Ditto.
* python/py-symbol.c: Ditto.
* python/py-value.c: Ditto.
* python/python-internal.h: Ditto.
* python/python.c: Ditto.
* tui/tui-data.c: Ditto.
* tui/tui-disasm.c: Ditto.
* tui/tui-hooks.c: Ditto.
* tui/tui-io.c: Ditto.
* tui/tui-layout.c: Ditto.
* tui/tui-regs.c: Ditto.
* tui/tui-source.c: Ditto.
* tui/tui-stack.c: Ditto.
* tui/tui-win.c: Ditto.
* tui/tui-windata.c: Ditto.
* tui/tui-winsource.c: Ditto.
Diffstat (limited to 'gdb/tui/tui-source.c')
-rw-r--r-- | gdb/tui/tui-source.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 53ae0b2eea7..a46797c966d 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -90,8 +90,10 @@ tui_set_source_content (struct symtab *s, else { 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; + struct tui_gen_win_info *locator + = tui_locator_win_info_ptr (); + struct tui_source_info *src + = &TUI_SRC_WIN->detail.source_info; if (TUI_SRC_WIN->generic.title) xfree (TUI_SRC_WIN->generic.title); @@ -116,7 +118,8 @@ tui_set_source_content (struct symtab *s, (threshold + 1) * sizeof (char)); while (cur_line < nlines) { - struct tui_win_element *element = (struct tui_win_element *) + struct tui_win_element *element + = (struct tui_win_element *) TUI_SRC_WIN->generic.content[cur_line]; /* Get the first character in the line. */ @@ -129,8 +132,8 @@ tui_set_source_content (struct symtab *s, /* Init the line with the line number. */ sprintf (src_line, "%-6d", cur_line_no); cur_len = strlen (src_line); - i = cur_len - - ((cur_len / tui_default_tab_len ()) * tui_default_tab_len ()); + i = cur_len - ((cur_len / tui_default_tab_len ()) + * tui_default_tab_len ()); while (i < tui_default_tab_len ()) { src_line[cur_len] = ' '; @@ -177,9 +180,11 @@ tui_set_source_content (struct symtab *s, overwrite our buffer. */ if (c == '\t') { - int j, max_tab_len = tui_default_tab_len (); + int j, max_tab_len + = tui_default_tab_len (); - for (j = i - ((i / max_tab_len) * max_tab_len); + for (j = i - ((i / max_tab_len) + * max_tab_len); j < max_tab_len && i < threshold; i++, j++) @@ -214,8 +219,8 @@ tui_set_source_content (struct symtab *s, /* Now copy the line taking the offset into account. */ if (strlen (src_line) > offset) - strcpy (((struct tui_win_element *) TUI_SRC_WIN->generic.content[ - cur_line])->which_element.source.line, + strcpy (((struct tui_win_element *) + TUI_SRC_WIN->generic.content[cur_line])->which_element.source.line, &src_line[offset]); else ((struct tui_win_element *) @@ -330,8 +335,10 @@ 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)); + && (strcmp (((struct tui_win_element *) + (tui_locator_win_info_ptr ())-> + content[0])->which_element.locator.file_name, + fname) == 0)); } @@ -360,7 +367,8 @@ tui_vertical_source_scroll (enum tui_scroll_direction scroll_direction, if (l.u.line_no > s->nlines) /* line = s->nlines - win_info->generic.content_size + 1; */ /* elz: fix for dts 23398. */ - l.u.line_no = content[0]->which_element.source.line_or_addr.u.line_no; + l.u.line_no + = content[0]->which_element.source.line_or_addr.u.line_no; } else { |