Import of readline 4.3.
[deliverable/binutils-gdb.git] / gdb / tui / tuiWin.c
index b82ce2f153dab84b0c07d730eb8ad38d8f14b320..9ad82f57a65577d023d89772daae606ef3dd1444 100644 (file)
@@ -46,6 +46,7 @@
 
 #include <string.h>
 #include <ctype.h>
+#include <readline/readline.h>
 #include "defs.h"
 #include "command.h"
 #include "symtab.h"
@@ -417,8 +418,9 @@ void
 tui_update_gdb_sizes ()
 {
   char cmd[50];
-  extern int screenheight, screenwidth;                /* in readline */
+  int screenheight, screenwidth;
 
+  rl_get_screen_size (&screenheight, &screenwidth);
   /* Set to TUI command window dimension or use readline values.  */
   sprintf (cmd, "set width %d",
            tui_active ? cmdWin->generic.width : screenwidth);
@@ -634,8 +636,9 @@ void
 tuiResizeAll (void)
 {
   int heightDiff, widthDiff;
-  extern int screenheight, screenwidth;                /* in readline */
+  int screenheight, screenwidth;
 
+  rl_get_screen_size (&screenheight, &screenwidth);
   widthDiff = screenwidth - termWidth ();
   heightDiff = screenheight - termHeight ();
   if (heightDiff || widthDiff)
This page took 0.025717 seconds and 4 git commands to generate.