2 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
4 * $Id: echoAux.c,v 1.3 1999/03/01 09:02:04 sof Exp $
6 * Support functions for changing echoing
12 #ifdef HAVE_SYS_TYPES_H
13 #include <sys/types.h>
16 #ifdef HAVE_SYS_STAT_H
29 setTerminalEcho(ptr, on)
33 IOFileObject* fo = (IOFileObject*)ptr;
39 #ifndef mingw32_TARGET_OS
40 while ( (rc = tcgetattr(fd,&tios)) == -1) {
51 tios.c_lflag &= ~ECHO;
54 while ( (rc = tcsetattr(fd,TCSANOW,&tios)) == -1) {
69 IOFileObject* fo = (IOFileObject*)ptr;
75 #ifndef mingw32_TARGET_OS
76 while ( (rc = tcgetattr(fd,&tios)) == -1) {
83 return (tios.c_cflag & ECHO ? 1 : 0);
93 IOFileObject* fo = (IOFileObject*)ptr;
99 #ifndef mingw32_TARGET_OS
100 while ( (rc = tcgetattr(fd,&tios)) == -1) {
101 if (errno == ENOTTY) return 0;
102 if (errno != EINTR) {