Mail Archives: djgpp/1992/01/30/16:18:42
I have the source code to a DES encryption program. I can compile it
successfully with DJGPP, except for the code fragment which turns off
keyboard echo while asking for a password. The code looks something
like this:
Tty = fopen("/dev/con", "r+");
ioctl(fileno(Tty), TIOCGETP, &ttyb);
ioctl(fileno(Tty), TIOCGETP, &Ttysav);
ttyb.sg_flags &= ~ECHO;
ioctl(fileno(Tty), TIOCSETP, &ttyb);
/* Get the password */
ioctl(fileno(Tty), TIOCSETP, &Ttysav);
There is no support for the ioctl() stuff in DJGPP. I have yet to
find another way to do this. Does anyone have a method of turning off
(and then back on) the keyboard echo? Thanks.
--
Eric Backus
ericb%hplsla AT hplabs DOT hp DOT com
(206) 335-2495
- Raw text -