home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2732 / emacs.pat2-sco
Encoding:
Text File  |  1991-02-10  |  3.0 KB  |  137 lines

  1.  
  2. *** P1/emacs.c    Wed Feb  6 11:27:04 1991
  3. --- emacs.c    Thu Feb  7 11:44:05 1991
  4. ***************
  5. *** 43,46 ****
  6. --- 43,50 ----
  7.   #endif
  8.   
  9. + #ifdef HAVE_TERMIOS
  10. + #include <termios.h>
  11. + #endif
  12.   #ifdef APOLLO
  13.   #ifndef APOLLO_SR10
  14. ***************
  15. *** 109,116 ****
  16.        int sig;
  17.   {
  18. - #ifdef BSD
  19. -   int tpgrp;
  20. - #endif /* BSD */
  21.     fatal_error_code = sig;
  22.     signal (sig, SIG_DFL);
  23. --- 113,116 ----
  24. ***************
  25. *** 123,135 ****
  26.   
  27.     /* If we are controlling the terminal, reset terminal modes */
  28. ! #ifdef BSD
  29. !   if (ioctl(0, TIOCGPGRP, &tpgrp) == 0
  30.         && tpgrp == getpgrp (0))
  31. ! #endif /* BSD */
  32. !     {
  33. !       reset_sys_modes ();
  34. !       if (sig != SIGTERM)
  35. !     fprintf (stderr, "Fatal error (%d).", sig);
  36. !     }
  37.   
  38.     /* Clean up */
  39. --- 123,143 ----
  40.   
  41.     /* If we are controlling the terminal, reset terminal modes */
  42. ! #if defined(TIOCGPGRP) || defined(HAVE_TERMIOS)
  43. !   {
  44. !     int tpgrp;
  45. !     if (
  46. ! #ifdef HAVE_TERMIOS
  47. !     (tpgrp = tcgetpgrp (0)) != -1
  48. ! #else
  49. !     ioctl(0, TIOCGPGRP, &tpgrp) == 0
  50. ! #endif
  51.         && tpgrp == getpgrp (0))
  52. !       {
  53. !     reset_sys_modes ();
  54. !     if (sig != SIGTERM)
  55. !       fprintf (stderr, "Fatal error (%d).", sig);
  56. !       }
  57. !   }
  58. ! #endif /* uses pgrp */
  59.   
  60.     /* Clean up */
  61.  
  62. *** P1/process.c    Wed Feb  6 11:46:28 1991
  63. --- process.c    Thu Feb  7 11:52:45 1991
  64. ***************
  65. *** 46,50 ****
  66. --- 46,54 ----
  67.   #endif /* BSD or STRIDE */
  68.   #ifdef USG
  69. + #ifdef HAVE_TERMIOS
  70. + #include <termios.h>
  71. + #else
  72.   #include <termio.h>
  73. + #endif
  74.   #include <fcntl.h>
  75.   #endif /* USG */
  76. ***************
  77. *** 2006,2022 ****
  78.       current_group = Qnil;
  79.   
  80. ! #ifdef TIOCGPGRP        /* Not sure about this! (fnf) */
  81.     /* If we are using pgrps, get a pgrp number and make it negative.  */
  82.     if (!NULL (current_group))
  83.       {
  84. !       ioctl (XFASTINT (p->infd), TIOCGPGRP, &gid);
  85. !       gid = - gid;
  86.       }
  87. -   else
  88. -     gid = - XFASTINT (p->pid);
  89. - #else /* not using pgrps */
  90. -   /* Can't select pgrps on this system, so we know that
  91. -      the child itself heads the pgrp.  */
  92. -   gid = - XFASTINT (p->pid);
  93.   #endif /* not using pgrps */
  94.   
  95. --- 2010,2030 ----
  96.       current_group = Qnil;
  97.   
  98. !   /* Assume that we can't select pgrps on this system,
  99. !      so the child itself heads the pgrp.  */
  100. !   gid = - XFASTINT (p->pid);
  101. ! #if defined(TIOCGPGRP) || defined(HAVE_TERMIOS)
  102.     /* If we are using pgrps, get a pgrp number and make it negative.  */
  103.     if (!NULL (current_group))
  104.       {
  105. !       int i;
  106. ! #ifdef HAVE_TERMIOS
  107. !       if ((i = tcgetpgrp (XFASTINT (p->infd))) != -1)
  108. !     gid = -i;
  109. ! #else
  110. !       if (ioctl (XFASTINT (p->infd), TIOCGPGRP, &i) == 0)
  111. !     gid = -i;
  112. ! #endif
  113.       }
  114.   #endif /* not using pgrps */
  115.   
  116.  
  117. *** P1/sysdep.c    Wed Feb  6 11:34:32 1991
  118. --- sysdep.c    Thu Feb  7 11:58:07 1991
  119. ***************
  120. *** 458,462 ****
  121.   {
  122.   #ifdef HAVE_TERMIOS
  123. !   tcflush (channel, TCOFLUSH);
  124.   #else
  125.   #ifdef TCFLSH
  126. --- 458,464 ----
  127.   {
  128.   #ifdef HAVE_TERMIOS
  129. !   /* If we try this, we get hit with SIGTTIN, because
  130. !      the child's tty belongs to the child's pgrp. */
  131. !   /* tcflush (channel, TCOFLUSH); */
  132.   #else
  133.   #ifdef TCFLSH
  134.