2 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
4 * $Id: echoAux.c,v 1.2 1998/12/02 13:27:18 simonm 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 while ( (rc = tcgetattr(fd,&tios)) == -1) {
50 tios.c_lflag &= ~ECHO;
53 while ( (rc = tcsetattr(fd,TCSANOW,&tios)) == -1) {
67 IOFileObject* fo = (IOFileObject*)ptr;
73 while ( (rc = tcgetattr(fd,&tios)) == -1) {
80 return (tios.c_cflag & ECHO ? 1 : 0);
87 IOFileObject* fo = (IOFileObject*)ptr;
93 while ( (rc = tcgetattr(fd,&tios)) == -1) {
94 if (errno == ENOTTY) return 0;