no echo when there should be echo

no echo when there should be echo

Post by Eric Enrigh » Thu, 21 Jun 2001 01:09:47



i'm writing a chat program, and have all the dirty work done, but when
trying to setup a nice screen layout with curses.h functions, the keyboard
is no longer echo'd

/* setup curses */
mywindow = initscr();
nocbreak();
echo();

btw, in case it matters, i'm using select() to tell if there is input on
keyboard/sockets.

 
 
 

no echo when there should be echo

Post by Nithyanandha » Thu, 21 Jun 2001 02:28:48



> i'm writing a chat program, and have all the dirty work done, but when
> trying to setup a nice screen layout with curses.h functions, the keyboard
> is no longer echo'd

> /* setup curses */
> mywindow = initscr();
> nocbreak();
> echo();

 initscr();
cbreak();
noecho();
//
//.....
// read the char
//......
echo();
nocbreak();
endwin();

is the normally used sequence. Find where you fail.

Quote:> btw, in case it matters, i'm using select() to tell if there is input on
> keyboard/sockets.

read 3.2 and 3.3 of FAQ for help.

--
Nithyanand.
Siemens, Bangalore, India.
(Opinions expressed are my own and do not reflect the opinions of my employer,
Siemens)

 
 
 

1. echo $$ ; (echo $$)


comp.unix.shell:
 > $ echo $$ ; (echo $$)
 > 11290
 > 11290

$$ is being expanded by the parent before the subshell is started.
If you really need to do this from the command line, try something
like

 $ echo $$ ; /bin/sh -c 'echo $$'
 13447
 13433

/* era */

--
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

2. question about directory sizes...

3. ICMP echo and port 7 echo service

4. General support for SCSI over Parallel

5. Local Echo vs Host Echo for tty's

6. Inittab

7. Linux 1.2.13: echo echoes \n

8. XFree86 configuration

9. what causes kdm to echo "*" vs. no echo for password

10. diff among echo a>f; command<f; echo $a|command; command << $a; EOF

11. Q: What echoes faster than /bin/echo?

12. Looking for a brain-dead echo - i.e., an echo-like command that will pass \n

13. telnet echo on/off causes strange crlf echo