home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / diffs / texinfo-.1 / info / terminal.c < prev   
Encoding:
C/C++ Source or Header  |  1993-11-28  |  4.3 KB  |  138 lines

  1. *** orig/texinfo-.1/info/terminal.c    Sun Aug 29 18:41:20 1993
  2. --- src/texinfo-.1/info/terminal.c    Sun Aug 29 19:04:00 1993
  3. ***************
  4. *** 29,34 ****
  5. --- 29,37 ----
  6.   #include <sys/types.h>
  7.   #include "terminal.h"
  8.   #include "termdep.h"
  9. + #if defined (__GO32__)
  10. + #include "pc_term.h"
  11. + #endif /* __GO32__ */
  12.   
  13.   extern void *xmalloc (), *xrealloc ();
  14.   
  15. ***************
  16. *** 43,48 ****
  17. --- 46,69 ----
  18.      function is called when appropriate instead of its namesake.  Your
  19.      function is called with exactly the same arguments that were passed
  20.      to the namesake function. */
  21. + #if defined (__GO32__)
  22. + VFunction *terminal_begin_inverse_hook       = pc_begin_inverse;
  23. + VFunction *terminal_end_inverse_hook         = pc_end_inverse;
  24. + VFunction *terminal_prep_terminal_hook       = pc_prep_terminal;
  25. + VFunction *terminal_unprep_terminal_hook     = pc_unprep_terminal;
  26. + VFunction *terminal_up_line_hook             = pc_up_line;
  27. + VFunction *terminal_down_line_hook           = pc_down_line;
  28. + VFunction *terminal_clear_screen_hook        = pc_clear_screen;
  29. + VFunction *terminal_clear_to_eol_hook        = pc_clear_to_eol;
  30. + VFunction *terminal_get_screen_size_hook     = pc_get_screen_size;
  31. + VFunction *terminal_goto_xy_hook             = pc_goto_xy;
  32. + VFunction *terminal_initialize_terminal_hook = pc_initialize_terminal;
  33. + VFunction *terminal_new_terminal_hook        = pc_new_terminal;
  34. + VFunction *terminal_put_text_hook            = pc_put_text;
  35. + VFunction *terminal_ring_bell_hook           = pc_ring_bell;
  36. + VFunction *terminal_write_chars_hook         = pc_write_chars;
  37. + VFunction *terminal_scroll_terminal_hook     = pc_scroll_terminal;
  38. + #else /* __GO32__ */
  39.   VFunction *terminal_begin_inverse_hook = (VFunction *)NULL;
  40.   VFunction *terminal_end_inverse_hook = (VFunction *)NULL;
  41.   VFunction *terminal_prep_terminal_hook = (VFunction *)NULL;
  42. ***************
  43. *** 59,64 ****
  44. --- 80,86 ----
  45.   VFunction *terminal_ring_bell_hook = (VFunction *)NULL;
  46.   VFunction *terminal_write_chars_hook = (VFunction *)NULL;
  47.   VFunction *terminal_scroll_terminal_hook = (VFunction *)NULL;
  48. + #endif /* __GO32__ */
  49.   
  50.   /* **************************************************************** */
  51.   /*                                    */
  52. ***************
  53. *** 135,140 ****
  54. --- 157,165 ----
  55.   static void
  56.   terminal_end_using_terminal ()
  57.   {
  58. + #if defined (__GO32__)
  59. +   terminal_clear_screen();  /* to end up with a clean screen for DOS */
  60. + #endif /* __GO32__ */
  61.     send_to_terminal (term_end_use);
  62.   }
  63.   
  64. ***************
  65. *** 514,520 ****
  66. --- 539,547 ----
  67.         ospeed = B9600;
  68.     }
  69.   #else
  70. + #if !defined(__MSDOS__)
  71.     ospeed = B9600;
  72. + #endif
  73.   #endif                /* !TIOCGETP */
  74.   
  75.     term_cr = tgetstr ("cr", &buffer);
  76. ***************
  77. *** 599,608 ****
  78. --- 626,637 ----
  79.   /* A buffer containing the terminal mode flags upon entry to info. */
  80.   struct termio original_termio, ttybuff;
  81.   #else /* !HAVE_TERMIO_H */
  82. + #if !defined (__MSDOS__)
  83.   /* Buffers containing the terminal mode flags upon entry to info. */
  84.   int original_tty_flags = 0;
  85.   int original_lmode;
  86.   struct sgttyb ttybuff;
  87. + #endif /* !__MSDOS__ */
  88.   #endif /* !HAVE_TERMIO_H */
  89.   
  90.   /* Prepare to start using the terminal to read characters singly. */
  91. ***************
  92. *** 638,643 ****
  93. --- 667,673 ----
  94.     ioctl (tty, TCSETA, &ttybuff);
  95.   
  96.   #else /* !HAVE_TERMIO_H */
  97. + #if !defined (__MSDOS__)
  98.   
  99.     ioctl (tty, TIOCGETP, &ttybuff);
  100.   
  101. ***************
  102. *** 702,707 ****
  103. --- 732,738 ----
  104.     ttybuff.sg_flags &= ~ECHO;
  105.     ttybuff.sg_flags |= CBREAK;
  106.     ioctl (tty, TIOCSETN, &ttybuff);
  107. + #endif /* !__MSDOS__ */
  108.   #endif /* !HAVE_TERMIO_H */
  109.   }
  110.   
  111. ***************
  112. *** 723,728 ****
  113. --- 754,760 ----
  114.   #if defined (HAVE_TERMIO_H)
  115.     ioctl (tty, TCSETA, &original_termio);
  116.   #else /* !HAVE_TERMIO_H */
  117. + #if !defined (__MSDOS__)
  118.     ioctl (tty, TIOCGETP, &ttybuff);
  119.     ttybuff.sg_flags = original_tty_flags;
  120.     ioctl (tty, TIOCSETN, &ttybuff);
  121. ***************
  122. *** 739,745 ****
  123.     ioctl (tty, TIOCLSET, &original_lmode);
  124.   #endif /* TIOCLGET && LPASS8 */
  125.   
  126.   #endif /* !HAVE_TERMIO_H */
  127.     terminal_end_using_terminal ();
  128.   }
  129. --- 771,777 ----
  130.     ioctl (tty, TIOCLSET, &original_lmode);
  131.   #endif /* TIOCLGET && LPASS8 */
  132.   
  133. + #endif /* !__MSDOS__ */
  134.   #endif /* !HAVE_TERMIO_H */
  135.     terminal_end_using_terminal ();
  136.   }
  137.