home *** CD-ROM | disk | FTP | other *** search
- --- os.h.rtr Mon Nov 20 13:03:04 1995
- +++ os.h Mon Nov 27 10:09:54 1995
- @@ -441,7 +441,8 @@
- * select stuff
- */
-
- -#if defined(M_XENIX) || defined(M_UNIX) || defined(_SEQUENT_)
- +/* #if defined(M_XENIX) || defined(M_UNIX) || defined(_SEQUENT_) */
- +#if 0
- #include <sys/select.h> /* for timeval + FD... */
- #endif
-
- --- pty.c.rtr Mon Nov 20 13:03:05 1995
- +++ pty.c Mon Nov 27 13:26:35 1995
- @@ -61,6 +61,9 @@
- #ifndef PTYRANGE1
- # define PTYRANGE1 "0123456789abcdef"
- #endif
- +#ifndef PTYRANGE2
- +# define PTYRANGE2 "\n\n"
- +#endif
-
- extern int eff_uid;
-
- @@ -282,7 +285,7 @@
- OpenPTY(ttyn)
- char **ttyn;
- {
- - register char *p, *q, *l, *d;
- + register char *p, *q, *l, *d, *e, *e_start;
- register int f;
-
- debug("OpenPTY: Using BSD style ptys.\n");
- @@ -296,35 +299,40 @@
- {
- for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++)
- {
- - debug1("OpenPTY tries '%s'\n", PtyName);
- - if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
- - continue;
- - q[0] = *l;
- - q[1] = *d;
- - if (eff_uid && access(TtyName, R_OK | W_OK))
- - {
- - close(f);
- - continue;
- - }
- -#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
- - /* Hack to ensure that the slave side of the pty is
- - * unused. May not work in anything other than SunOS4.1
- - */
- - {
- - int pgrp;
- -
- - /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
- - if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
- - {
- - close(f);
- - continue;
- - }
- - }
- -#endif
- - initpty(f);
- - *ttyn = TtyName;
- - return f;
- - }
- + for (e_start = (e = PTYRANGE2); ((p[2] = *e) != '\0') || (e == e_start ) ; e++)
- + {
- + debug1("OpenPTY tries '%s'\n", PtyName);
- + if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
- + continue;
- + q[0] = *l;
- + q[1] = *d;
- + q[2] = *e;
- + if (eff_uid && access(TtyName, R_OK | W_OK))
- + {
- + close(f);
- + continue;
- + }
- + #if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
- + /* Hack to ensure that the slave side of the pty is
- + * unused. May not work in anything other than SunOS4.1
- + */
- + {
- + int pgrp;
- +
- + /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
- + if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
- + {
- + close(f);
- + continue;
- + }
- + }
- + #endif
- + initpty(f);
- + *ttyn = TtyName;
- + return f;
- + }
- + }
- +
- }
- return -1;
- }
- --- resize.c.rtr Mon Nov 20 13:03:05 1995
- +++ resize.c Mon Nov 27 10:09:54 1995
- @@ -55,6 +55,8 @@
- extern int nethackflag;
- #endif
-
- +#include <sys/stream.h>
- +#include <sys/ptem.h> /* for winsize struct */
- #if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
- struct winsize glwz;
- #endif
- --- screen.c.rtr Mon Nov 20 13:03:05 1995
- +++ screen.c Mon Nov 27 10:09:53 1995
- @@ -28,6 +28,7 @@
- #include <sys/types.h>
- #include <ctype.h>
-
- +#include <sys/wait.h>
- #include <fcntl.h>
-
- #ifdef sgi
- --- tty.c.dist.rtr Mon Nov 20 13:06:17 1995
- +++ tty.c.dist Mon Nov 27 13:38:42 1995
- @@ -852,11 +852,11 @@
- {
- #ifdef POSIX
- debug("tcsendbreak\n");
- - if (tcsendbreak(wp->w_ptyfd, n) < 0)
- +/* if (tcsendbreak(wp->w_ptyfd, n) < 0)
- {
- Msg(errno, "cannot send BREAK");
- return;
- - }
- + } */
- #else
- if (!n)
- n++;
- --- window.c.rtr Mon Nov 20 13:03:05 1995
- +++ window.c Mon Nov 27 10:10:18 1995
- @@ -41,6 +41,8 @@
- #include "screen.h"
- #include "extern.h"
-
- +#include <sys/stream.h>
- +#include <sys/ptem.h> /* for winsize */
- extern struct display *displays, *display;
- extern struct win *windows, *fore, *wtab[], *console_window;
- extern char *ShellArgs[];
- --- osdef.h.in.rtr Tue Feb 11 09:41:30 1997
- +++ osdef.h.in Tue Feb 11 10:44:52 1997
- @@ -65,7 +65,7 @@
- union wait; /* for wait3 __P */
- extern int wait3 __P((union wait *, int, struct rusage *));
- #else
- -extern int waitpid __P((int, int *, int));
- +/* extern int waitpid __P((int, int *, int)); */
- #endif
-
- extern int getdtablesize __P((void));
- @@ -98,7 +98,7 @@
- extern int setpgid __P((int, int));
- extern int tcsetpgrp __P((int, int));
- #endif
- -extern int ioctl __P((int, int, char *));
- +/* extern int ioctl __P((int, int, char *)); */
-
- extern int kill __P((int, int));
-
-