1--- ed/ed.c
2+++ ed/ed.c
3@@ -68,7 +68,6 @@ static const char sccsid[] USED = "@(#)ed.sl 1.99 (gritter) 7/27/06";
4 #include <stdlib.h>
5 #include <signal.h>
6 #include "sigset.h"
7-#include <termios.h>
8 #include <setjmp.h>
9 #include <libgen.h>
10 #include <inttypes.h>
11@@ -77,7 +76,6 @@ static const char sccsid[] USED = "@(#)ed.sl 1.99 (gritter) 7/27/06";
12 #include <ctype.h>
13 #include <wctype.h>
14 #include <limits.h>
15-#include <termios.h>
16 static int FNSIZE;
17 static int LBSIZE;
18 static int RHSIZE;
19@@ -2273,22 +2271,10 @@ sclose(int fd)
20 static void
21 fspec(const char *lp)
22 {
23- struct termios ts;
24 const char *cp;
25
26 freetabs();
27 maxlength = 0;
28- if (tcgetattr(1, &ts) < 0
29-#ifdef TAB3
30- || (ts.c_oflag&TAB3) == 0
31-#endif
32- )
33- return;
34- while (lp[0]) {
35- if (lp[0] == '<' && lp[1] == ':')
36- break;
37- lp++;
38- }
39 if (lp[0]) {
40 lp += 2;
41 while ((cp = ftok(&lp)) != NULL) {
42--- ls/ls.c
43+++ ls/ls.c
44@@ -102,7 +102,6 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--";
45 #include <grp.h>
46 #include <errno.h>
47 #include <fcntl.h>
48-#include <termios.h>
49 #include <locale.h>
50 #include <limits.h>
51 #include <ctype.h>
52@@ -110,14 +109,6 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--";
53 #include <wchar.h>
54 #include <wctype.h>
55 #include "config.h"
56-#ifndef USE_TERMCAP
57-#ifndef sun
58-#include <curses.h>
59-#include <term.h>
60-#endif
61-#else /* USE_TERMCAP */
62-#include <termcap.h>
63-#endif /* USE_TERMCAP */
64
65 #ifdef _AIX
66 #include <sys/sysmacros.h>
67@@ -989,13 +980,6 @@ printname(const char *name, struct file *f, int doit)
68 bold++;
69 }
70 if (color) {
71-#ifndef USE_TERMCAP
72- if (bold)
73- vidattr(A_BOLD);
74-#else /* USE_TERMCAP */
75- if (Bold)
76- tputs(Bold, 1, putchar);
77-#endif /* USE_TERMCAP */
78 printf(color);
79 }
80 }
81@@ -1056,13 +1040,6 @@ printname(const char *name, struct file *f, int doit)
82 }
83 }
84 if (doit && color) {
85-#if !defined (USE_TERMCAP)
86- if (bold)
87- vidattr(A_NORMAL);
88-#else /* USE_TERMCAP */
89- if (Normal)
90- tputs(Normal, 1, putchar);
91-#endif /* USE_TERMCAP */
92 printf(fc_get(FC_NORMAL));
93 }
94 if (f)
95@@ -1598,16 +1575,12 @@ main(int argc, char **argv)
96 {
97 struct file *flist = nil, **aflist = &flist;
98 enum depth depth;
99- struct winsize ws;
100 int i;
101 char *cp;
102
103 #ifdef __GLIBC__
104 putenv("POSIXLY_CORRECT=1");
105 #endif
106- setlocale(LC_COLLATE, "");
107- setlocale(LC_CTYPE, "");
108- setlocale(LC_TIME, "");
109 #ifndef UCB
110 if (getenv("SYSV3") != NULL)
111 sysv3 = 1;
112@@ -1624,16 +1597,6 @@ main(int argc, char **argv)
113 }
114 if (istty || isatty(1)) {
115 istty = 1;
116-#if !defined (USE_TERMCAP)
117- setupterm(NULL, 1, &tinfostat);
118-#else /* USE_TERMCAP */
119- {
120- char buf[2048];
121- if ((cp = getenv("TERM")) != NULL)
122- if (tgetent(buf, cp) > 0)
123- tinfostat = 1;
124- }
125-#endif /* USE_TERMCAP */
126 field |= FL_STATUS;
127 }
128 while ((i = getopt(argc, argv, personalities[personality].per_opt))
129@@ -1753,12 +1716,6 @@ main(int argc, char **argv)
130 if ((cp = getenv("COLUMNS")) != NULL) {
131 ncols = atoi(cp);
132 } else if ((present('C') || present('x') || present('m')) && istty) {
133- if (ioctl(1, TIOCGWINSZ, &ws) == 0 && ws.ws_col > 0)
134- ncols = ws.ws_col - 1;
135-#if !defined (USE_TERMCAP)
136- else if (tinfostat == 1 && columns > 0)
137- ncols = columns;
138-#endif /* !USE_TERMCAP */
139 }
140 depth = SURFACE;
141 if (optind == argc) {