]> git.cameronkatri.com Git - apple_cmds.git/blob - patch_cmds/diffstat/testing/case12.pat
atrun: Install LaunchDaemon
[apple_cmds.git] / patch_cmds / diffstat / testing / case12.pat
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
5 @@ -182,6 +182,10 @@
6 #undef CAPS_LOCK
7 #endif
8
9 +#ifdef CSRG_BASED
10 +#define USE_POSIX_TERMIOS
11 +#endif
12 +
13 #include <sys/ioctl.h>
14 #include <sys/stat.h>
15
16 @@ -199,6 +203,9 @@
17 #endif
18 #endif
19
20 +#ifdef USE_POSIX_TERMIOS
21 +#include <termios.h>
22 +#else
23 #ifdef USE_TERMIOS
24 #include <termios.h>
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 ?
33 NTTYDISC : 0;
34 ioctl(0, TIOCSETD, (char *)&ldisc);
35 -#endif /* !USE_SYSV_TERMIO */
36 +#endif /* !USE_SYSV_TERMIO && !USE_POSIX_TERMIOS */
37
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
44 @@ -87,19 +87,19 @@
45 #define USE_TERMINFO
46 #endif
47
48 -#ifdef MINIX
49 +#if defined(CSRG_BASED)
50 #define USE_TERMIOS
51 #endif
52
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 */
58 -#ifdef MINIX
59 -#include <termios.h>
60 -#else /* !MINIX */
61 -#include <sgtty.h>
62 -#endif /* MINIX */
63 +# ifdef USE_TERMIOS
64 +# include <termios.h>
65 +# else /* not USE_TERMIOS */
66 +# include <sgtty.h>
67 +# endif /* USE_TERMIOS */
68 #endif /* USE_SYSV_TERMIO */
69
70 #ifdef USE_USG_PTYS
71 @@ -127,8 +127,9 @@
72 #define bzero(s, n) memset(s, 0, n)
73 #endif /* USE_SYSV_TERMIO */
74
75 -#ifdef USE_TERMIOS
76 +#ifdef MINIX
77 #define USE_SYSV_TERMIO
78 +#include <sys/termios.h>
79 #define termio termios
80 #define TCGETA TCGETS
81 #define TCSETAW TCSETSW
82 @@ -190,7 +191,11 @@
83 #ifdef USE_SYSV_TERMIO
84 struct termio tioorig;
85 #else /* not USE_SYSV_TERMIO */
86 +# ifdef USE_TERMIOS
87 +struct termios tioorig;
88 +# else /* not USE_TERMIOS */
89 struct sgttyb sgorig;
90 +# endif /* USE_TERMIOS */
91 #endif /* USE_SYSV_TERMIO */
92 char *size[EMULATIONS] = {
93 "\033[%d;%dR",
94 @@ -244,7 +249,11 @@
95 #ifdef USE_SYSV_TERMIO
96 struct termio tio;
97 #else /* not USE_SYSV_TERMIO */
98 +#ifdef USE_TERMIOS
99 + struct termios tio;
100 +#else /* not USE_TERMIOS */
101 struct sgttyb sg;
102 +#endif /* USE_TERMIOS */
103 #endif /* USE_SYSV_TERMIO */
104 #ifdef USE_TERMCAP
105 char termcap [1024];
106 @@ -366,10 +375,20 @@
107 tio.c_cc[VMIN] = 6;
108 tio.c_cc[VTIME] = 1;
109 #else /* else not USE_SYSV_TERMIO */
110 +#if defined(USE_TERMIOS)
111 + tcgetattr(tty, &tioorig);
112 + tio = 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);
120 sg = sgorig;
121 sg.sg_flags |= RAW;
122 sg.sg_flags &= ~ECHO;
123 +#endif /* USE_TERMIOS */
124 #endif /* USE_SYSV_TERMIO */
125 signal(SIGINT, onintr);
126 signal(SIGQUIT, onintr);
127 @@ -377,7 +396,11 @@
128 #ifdef USE_SYSV_TERMIO
129 ioctl (tty, TCSETAW, &tio);
130 #else /* not USE_SYSV_TERMIO */
131 +#ifdef USE_TERMIOS
132 + tcsetattr(tty, TCSADRAIN, &tio);
133 +#else /* not USE_TERMIOS */
134 ioctl (tty, TIOCSETP, &sg);
135 +#endif /* USE_TERMIOS */
136 #endif /* USE_SYSV_TERMIO */
137
138 if (argc == 2) {
139 @@ -434,7 +457,11 @@
140 #ifdef USE_SYSV_TERMIO
141 ioctl (tty, TCSETAW, &tioorig);
142 #else /* not USE_SYSV_TERMIO */
143 +#ifdef USE_TERMIOS
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);
151 @@ -595,7 +622,11 @@
152 #ifdef USE_SYSV_TERMIO
153 ioctl (tty, TCSETAW, &tioorig);
154 #else /* not USE_SYSV_TERMIO */
155 +#ifdef USE_TERMIOS
156 + tcsetattr (tty, TCSADRAIN, &tioorig);
157 +#else /* not USE_TERMIOS */
158 ioctl (tty, TIOCSETP, &sgorig);
159 +#endif /* use TERMIOS */
160 #endif /* USE_SYSV_TERMIO */
161 exit(1);
162 }
163