1 Index: xc/programs/xterm/main.c
2 diff -u xc/programs/xterm/main.c:1.1.1.22 xc/programs/xterm/main.c:1.2
3 --- xc/programs/xterm/main.c:1.1.1.22 Tue Mar 19 07:36:38 1996
4 +++ xc/programs/xterm/main.c Sun Mar 24 01:10:29 1996
10 +#define USE_POSIX_TERMIOS
13 #include <sys/ioctl.h>
20 +#ifdef USE_POSIX_TERMIOS
25 /* this hacked termios support only works on SYSV */
26 @@ -3143,11 +3197,11 @@
27 shname_minus = malloc(strlen(shname) + 2);
28 (void) strcpy(shname_minus, "-");
29 (void) strcat(shname_minus, shname);
30 -#ifndef USE_SYSV_TERMIO
31 +#if !defined(USE_SYSV_TERMIO) && !defined(USE_POSIX_TERMIOS)
32 ldisc = XStrCmp("csh", shname + strlen(shname) - 3) == 0 ?
34 ioctl(0, TIOCSETD, (char *)&ldisc);
35 -#endif /* !USE_SYSV_TERMIO */
36 +#endif /* !USE_SYSV_TERMIO && !USE_POSIX_TERMIOS */
38 #ifdef USE_LOGIN_DASH_P
39 if (term->misc.login_shell && pw && added_utmp_entry)
40 Index: xc/programs/xterm/resize.c
41 diff -u xc/programs/xterm/resize.c:1.1.1.9 xc/programs/xterm/resize.c:1.2
42 --- xc/programs/xterm/resize.c:1.1.1.9 Wed Feb 14 21:58:14 1996
43 +++ xc/programs/xterm/resize.c Sun Mar 24 01:10:32 1996
49 +#if defined(CSRG_BASED)
53 #include <sys/ioctl.h>
54 #ifdef USE_SYSV_TERMIO
55 -#include <sys/termio.h>
56 +# include <sys/termio.h>
57 #else /* else not USE_SYSV_TERMIO */
64 +# include <termios.h>
65 +# else /* not USE_TERMIOS */
67 +# endif /* USE_TERMIOS */
68 #endif /* USE_SYSV_TERMIO */
72 #define bzero(s, n) memset(s, 0, n)
73 #endif /* USE_SYSV_TERMIO */
77 #define USE_SYSV_TERMIO
78 +#include <sys/termios.h>
79 #define termio termios
81 #define TCSETAW TCSETSW
83 #ifdef USE_SYSV_TERMIO
84 struct termio tioorig;
85 #else /* not USE_SYSV_TERMIO */
87 +struct termios tioorig;
88 +# else /* not USE_TERMIOS */
90 +# endif /* USE_TERMIOS */
91 #endif /* USE_SYSV_TERMIO */
92 char *size[EMULATIONS] = {
95 #ifdef USE_SYSV_TERMIO
97 #else /* not USE_SYSV_TERMIO */
100 +#else /* not USE_TERMIOS */
102 +#endif /* USE_TERMIOS */
103 #endif /* USE_SYSV_TERMIO */
106 @@ -366,10 +375,20 @@
109 #else /* else not USE_SYSV_TERMIO */
110 +#if defined(USE_TERMIOS)
111 + tcgetattr(tty, &tioorig);
113 + tio.c_iflag &= ~ICRNL;
114 + tio.c_lflag &= ~(ICANON | ECHO);
115 + tio.c_cflag |= CS8;
116 + tio.c_cc[VMIN] = 6;
117 + tio.c_cc[VTIME] = 1;
118 +#else /* not USE_TERMIOS */
119 ioctl (tty, TIOCGETP, &sgorig);
122 sg.sg_flags &= ~ECHO;
123 +#endif /* USE_TERMIOS */
124 #endif /* USE_SYSV_TERMIO */
125 signal(SIGINT, onintr);
126 signal(SIGQUIT, onintr);
128 #ifdef USE_SYSV_TERMIO
129 ioctl (tty, TCSETAW, &tio);
130 #else /* not USE_SYSV_TERMIO */
132 + tcsetattr(tty, TCSADRAIN, &tio);
133 +#else /* not USE_TERMIOS */
134 ioctl (tty, TIOCSETP, &sg);
135 +#endif /* USE_TERMIOS */
136 #endif /* USE_SYSV_TERMIO */
140 #ifdef USE_SYSV_TERMIO
141 ioctl (tty, TCSETAW, &tioorig);
142 #else /* not USE_SYSV_TERMIO */
144 + tcsetattr(tty, TCSADRAIN, &tioorig);
145 +#else /* not USE_TERMIOS */
146 ioctl (tty, TIOCSETP, &sgorig);
147 +#endif /* USE_TERMIOS */
148 #endif /* USE_SYSV_TERMIO */
149 signal(SIGINT, SIG_DFL);
150 signal(SIGQUIT, SIG_DFL);
152 #ifdef USE_SYSV_TERMIO
153 ioctl (tty, TCSETAW, &tioorig);
154 #else /* not USE_SYSV_TERMIO */
156 + tcsetattr (tty, TCSADRAIN, &tioorig);
157 +#else /* not USE_TERMIOS */
158 ioctl (tty, TIOCSETP, &sgorig);
159 +#endif /* use TERMIOS */
160 #endif /* USE_SYSV_TERMIO */