Fix bug in interlisting option, added --file-start-context option.
[deliverable/binutils-gdb.git] / readline / terminal.c
index c28669659b02fd3ec7362ad505651e2bc8727597..a1fcc25400ea8de73a6110cffee65f38b676a8ee 100644 (file)
@@ -186,8 +186,10 @@ _rl_get_screen_size (tty, ignore_env)
       if (ignore_env == 0 && (ss = get_env_value ("COLUMNS")))
        screenwidth = atoi (ss);
 
+#if !defined(__DJGPP__)
       if (screenwidth <= 0 && term_string_buffer)
        screenwidth = tgetnum ("co");
+#endif
     }
 
   /* Environment variable LINES overrides setting of "li" if IGNORE_ENV
@@ -197,8 +199,10 @@ _rl_get_screen_size (tty, ignore_env)
       if (ignore_env == 0 && (ss = get_env_value ("LINES")))
        screenheight = atoi (ss);
 
+#if !defined(__DJGPP__)
       if (screenheight <= 0 && term_string_buffer)
        screenheight = tgetnum ("li");
+#endif
     }
 
   /* If all else fails, default to 80x24 terminal. */
@@ -232,6 +236,16 @@ _rl_set_screen_size (rows, cols)
   screenchars = screenwidth * screenheight;
 }
 
+void
+rl_resize_terminal ()
+{
+  if (readline_echoing_p)
+    {
+      _rl_get_screen_size (fileno (rl_instream), 1);
+      _rl_redisplay_after_sigwinch ();
+    }
+}
+
 struct _tc_string {
      char *tc_var;
      char **tc_value;
@@ -277,10 +291,12 @@ static void
 get_term_capabilities (bp)
      char **bp;
 {
+#if !defined(__DJGPP__)
   register int i;
 
   for (i = 0; i < NUM_TC_STRINGS; i++)
     *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp);
+#endif
   tcap_initialized = 1;
 }
 
@@ -530,16 +546,20 @@ ding ()
 void
 _rl_enable_meta_key ()
 {
+#if !defined(__DJGPP__)
   if (term_has_meta && term_mm)
     tputs (term_mm, 1, _rl_output_character_function);
+#endif
 }
 
 void
 _rl_control_keypad (on)
      int on;
 {
+#if !defined(__DJGPP__)
   if (on && term_ks)
     tputs (term_ks, 1, _rl_output_character_function);
   else if (!on && term_ke)
     tputs (term_ke, 1, _rl_output_character_function);
+#endif
 }
This page took 0.023377 seconds and 4 git commands to generate.