Revert debugging change
[deliverable/binutils-gdb.git] / readline / terminal.c
index f3f5b6c47fb2011b9f7d7e982c74b8da13439844..ea3270e9683e02bfc54caa34b7922fc9f4c25eb6 100644 (file)
 #  include <sys/ioctl.h>
 #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
 
+#ifdef __MSDOS__
+# include <pc.h>
+#endif
+
 #include "rltty.h"
 #include "tcap.h"
 
 /*                                                                 */
 /* **************************************************************** */
 
+#ifndef __MSDOS__
 static char *term_buffer = (char *)NULL;
 static char *term_string_buffer = (char *)NULL;
 
+/* Non-zero means this terminal can't really do anything. */
+static int dumb_term;
+#endif /* !__MSDOS__ */
+
 static int tcap_initialized;
 
 #if !defined (__linux__)
@@ -372,6 +381,16 @@ _rl_init_terminal_io (terminal_name)
   if (term == 0)
     term = "dumb";
 
+#ifdef __MSDOS__
+  term_im = term_ei = term_ic = term_IC = (char *)NULL;
+  term_up = term_dc = term_DC = visible_bell = (char *)NULL;
+  term_ku = term_kd = term_kl = term_kr = (char *)NULL;
+  term_mm = term_mo = (char *)NULL;
+  terminal_can_insert = term_has_meta = _rl_term_autowrap = 0;
+  term_cr = "\r";
+
+  _rl_get_screen_size (tty, 0);
+#else  /* !__MSDOS__ */
   /* I've separated this out for later work on not calling tgetent at all
      if the calling application has supplied a custom redisplay function,
      (and possibly if the application has supplied a custom input function). */
@@ -466,6 +485,8 @@ _rl_init_terminal_io (terminal_name)
   if (!term_has_meta)
     _rl_term_mm = _rl_term_mo = (char *)NULL;
 
+#endif /* !__MSDOS__ */
+
   /* Attempt to find and bind the arrow keys.  Do not override already
      bound keys in an overzealous attempt, however. */
 
@@ -559,10 +580,12 @@ _rl_backspace (count)
 {
   register int i;
 
+#ifndef __MSDOS__
   if (_rl_term_backspace)
     for (i = 0; i < count; i++)
       tputs (_rl_term_backspace, 1, _rl_output_character_function);
   else
+#endif
     for (i = 0; i < count; i++)
       putc ('\b', _rl_out_stream);
   return 0;
@@ -592,11 +615,16 @@ rl_ding ()
        default:
          break;
        case VISIBLE_BELL:
+#ifdef __MSDOS__
+         ScreenVisualBell ();
+         break;
+#else
          if (_rl_visible_bell)
            {
              tputs (_rl_visible_bell, 1, _rl_output_character_function);
              break;
            }
+#endif
          /* FALLTHROUGH */
        case AUDIBLE_BELL:
          fprintf (stderr, "\007");
This page took 0.027516 seconds and 4 git commands to generate.