2 % (c) The GRASP/AQUA Project, Glasgow University, 1998
4 \subsection[echoAux.lc]{Support functions for changing echoing}
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
15 #ifdef HAVE_SYS_STAT_H
28 setTerminalEcho(ptr, on)
32 IOFileObject* fo = (IOFileObject*)ptr;
38 while ( (rc = tcgetattr(fd,&tios)) == -1) {
49 tios.c_lflag &= ~ECHO;
52 while ( (rc = tcsetattr(fd,TCSANOW,&tios)) == -1) {
66 IOFileObject* fo = (IOFileObject*)ptr;
72 while ( (rc = tcgetattr(fd,&tios)) == -1) {
79 return (tios.c_cflag & ECHO ? 1 : 0);
86 IOFileObject* fo = (IOFileObject*)ptr;
92 while ( (rc = tcgetattr(fd,&tios)) == -1) {
93 if (errno == ENOTTY) return 0;