Skip to content

Commit 599192d

Browse files
committed
Always force OPOST | ONLCR
1 parent 358b3e7 commit 599192d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

elkscmd/inet/telnet.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,11 @@ main(int argc, char **argv)
220220

221221
struct termios termios;
222222
tcgetattr(0, &termios);
223+
termios.c_oflag |= (OPOST | ONLCR);
224+
termios.c_lflag &= ~ISIG; /* ISIG off to disable ^N/^O/^P */
223225
#ifdef RAWTELNET
224226
termios.c_iflag &= ~(ICRNL | IGNCR | INLCR | IXON | IXOFF);
225-
termios.c_oflag &= ~(OPOST);
226-
termios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG);
227-
#else
228-
termios.c_lflag &= ~ISIG; /* ISIG off to disable ^N/^O/^P */
227+
termios.c_lflag &= ~(ECHO | ECHONL | ICANON)
229228
#endif
230229
tcsetattr(0, TCSANOW, &termios);
231230
nonblock = 1;

0 commit comments

Comments
 (0)