Skip to content

Commit 9cf9009

Browse files
committed
eliminate termios library
1 parent 49559d8 commit 9cf9009

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

kirc.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <stdlib.h>
99
#include <string.h>
1010
#include <fcntl.h>
11-
#include <termios.h>
1211
#include <poll.h>
1312
#include <errno.h>
1413

@@ -252,14 +251,6 @@ main(int argc, char **argv) {
252251
if (pass) raw("PASS %s\r\n", pass);
253252
if (inic) raw("%s\r\n", inic);
254253

255-
struct termios tp, save;
256-
257-
tcgetattr(STDIN_FILENO, &tp);
258-
save = tp;
259-
tp.c_cc[VERASE] = 127;
260-
261-
if (tcsetattr(STDIN_FILENO, TCSANOW, &tp) < 0) return 2;
262-
263254
struct pollfd fds[2];
264255
fds[0].fd = STDIN_FILENO;
265256
fds[1].fd = conn;
@@ -278,7 +269,6 @@ main(int argc, char **argv) {
278269

279270
if (fds[1].revents & POLLIN) {
280271
int rc = handle_server_message();
281-
/* Has the server closed the connection? */
282272
if (rc != 0) {
283273
if (rc == -2) return_code = EXIT_FAILURE;
284274
goto end;
@@ -293,7 +283,5 @@ main(int argc, char **argv) {
293283
}
294284

295285
end:
296-
if (tcsetattr(STDIN_FILENO, TCSANOW, &save) < 0) return 2;
297-
298286
return return_code;
299287
}

0 commit comments

Comments
 (0)