aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2004-01-21 18:46:23 +0000
committerEli Zaretskii <eliz@gnu.org>2004-01-21 18:46:23 +0000
commitec1459659670db3b33965426bdadf471281f4ed7 (patch)
treeb745824d028296d289e6eea01150f4965e02eaf2
parent5843504f37f47171baafa9b6085ffc2114775084 (diff)
downloadgdb-ec1459659670db3b33965426bdadf471281f4ed7.zip
gdb-ec1459659670db3b33965426bdadf471281f4ed7.tar.gz
gdb-ec1459659670db3b33965426bdadf471281f4ed7.tar.bz2
* utils.c (init_page_info): Move declarations of `rows' and
`cols' before the __GO32__-specific code. Move the closing brace outside the #ifdef __GO32__..#endif block. [__GO32__]: Use `rows' and `cols' to avoid compiler warnings.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/utils.c12
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 434932c..f5b8fc5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-21 Eli Zaretskii <eliz@gnu.org>
+
+ * utils.c (init_page_info): Move declarations of `rows' and
+ `cols' before the __GO32__-specific code. Move the closing brace
+ outside the #ifdef __GO32__..#endif block.
+ [__GO32__]: Use `rows' and `cols' to avoid compiler warnings.
+
2004-01-21 Paul Brook <paul@codesourcery.com>
* infrun.c (handle_inferior_event): Check stop_stack_dummy if handling
diff --git a/gdb/utils.c b/gdb/utils.c
index 444d61f..556486b 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1582,12 +1582,14 @@ init_page_info (void)
if (!tui_get_command_dimension (&chars_per_line, &lines_per_page))
#endif
{
-#if defined(__GO32__)
- lines_per_page = ScreenRows ();
- chars_per_line = ScreenCols ();
-#else
int rows, cols;
+#if defined(__GO32__)
+ rows = ScreenRows ();
+ cols = ScreenCols ();
+ lines_per_page = rows;
+ chars_per_line = cols;
+#else
/* Make sure Readline has initialized its terminal settings. */
rl_reset_terminal (NULL);
@@ -1613,8 +1615,8 @@ init_page_info (void)
/* If the output is not a terminal, don't paginate it. */
if (!ui_file_isatty (gdb_stdout))
lines_per_page = UINT_MAX;
- }
#endif
+ }
set_screen_size ();
set_width ();