Path: utzoo!utgpu!attcan!uunet!husc6!mailrus!iuvax!pur-ee!j.cc.purdue.edu!mace.cc.purdue.edu!mtr From: mtr@mace.cc.purdue.edu (Miek Rowan) Newsgroups: comp.windows.x Subject: xterm diffs for a Sequent Keywords: getpseudotty() Message-ID: <875@mace.cc.purdue.edu> Date: 17 Oct 88 14:57:12 GMT Organization: Unix Groupie Lines: 68 Appended are the diffs for xterm to make it use the getpseudotty() library call (which uses a ioctl to get the next availble tty) I have tested it on both a Balance and a Symmetry (both running 3.0) The diffs are from the base distributed version plus fixes1-33. *** /tmp/,RCSt1010276 Mon Oct 17 09:42:12 1988 --- main.c Mon Oct 17 08:50:05 1988 *************** *** 1,5 **** #ifndef lint ! static char rcs_id[] = "$Header: /bob10/X11/clients/xterm/RCS/main.c,v 11.2.0.2 88/09/11 13:53:46 mtr Exp Locker: mtr $"; #endif /* lint */ /* --- 1,5 ---- #ifndef lint ! static char rcs_id[] = "$Header: /userb/src/X11/clients/xterm/main.c,v 11.2.0.3 88/09/11 13:53:46 mtr Exp $"; #endif /* lint */ /* *************** *** 650,657 **** */ int *pty, *tty; { ! int devindex, letter = 0; while (letter < 11) { ttydev [strlen(ttydev) - 2] = ptydev [strlen(ptydev) - 2] = PTYCHAR1 [letter++]; --- 650,671 ---- */ int *pty, *tty; { ! #ifdef sequent ! char *pchSlave, ! *pchMaster; + if(0 > (*pty = getpseudotty(&pchSlave, &pchMaster))) { + fprintf (stderr,"%s: Not enough available pty's\n", xterm_name); + exit (ERROR_PTYS); + } + if (0 > (*tty = open (pchSlave, O_RDWR))) { + fprintf (stderr,"%s: Not enough available pty's\n", xterm_name); + exit (ERROR_PTYS); + } + return; + #else !sequent + int devindex, letter = 0; + while (letter < 11) { ttydev [strlen(ttydev) - 2] = ptydev [strlen(ptydev) - 2] = PTYCHAR1 [letter++]; *************** *** 672,677 **** --- 686,692 ---- fprintf (stderr, "%s: Not enough available pty's\n", xterm_name); exit (ERROR_PTYS); + #endif sequent } get_terminal ()