X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/7b6280353fe359353a769975fffca1be5a99ee2a..822015dda8008714e520ca557865c28023adbc83:/sshtty.c diff --git a/sshtty.c b/sshtty.c index 78498908..0b17c3e2 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,4 +1,3 @@ -/* $OpenBSD: sshtty.c,v 1.1 2001/04/14 16:33:20 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,19 +35,14 @@ */ #include "includes.h" +RCSID("$OpenBSD: sshtty.c,v 1.6 2004/05/08 00:01:37 deraadt Exp $"); -#include "sshtty.h" +#include "sshpty.h" #include "log.h" static struct termios _saved_tio; static int _in_raw_mode = 0; -int -in_raw_mode(void) -{ - return _in_raw_mode; -} - struct termios get_saved_tio(void) { @@ -64,8 +58,6 @@ leave_raw_mode(void) perror("tcsetattr"); else _in_raw_mode = 0; - - fatal_remove_cleanup((void (*) (void *)) leave_raw_mode, NULL); } void @@ -80,6 +72,9 @@ enter_raw_mode(void) _saved_tio = tio; tio.c_iflag |= IGNPAR; tio.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF); +#ifdef IUCLC + tio.c_iflag &= ~IUCLC; +#endif tio.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL); #ifdef IEXTEN tio.c_lflag &= ~IEXTEN; @@ -91,6 +86,4 @@ enter_raw_mode(void) perror("tcsetattr"); else _in_raw_mode = 1; - - fatal_add_cleanup((void (*) (void *)) leave_raw_mode, NULL); }