Problem with curses ``getstr()''.

Erik Freed freed at aum.UUCP
Sat Oct 26 02:27:26 AEST 1985


> In article <137 at oberon.UUCP> mcooper at oberon.UUCP (Michael Cooper) writes:
> >Ahh, yes.  Another curses problem.  Or at least it is a problem 
> >that curses is having with me!  I am trying to get a string from a window
> >with wgetstr(win, buf).  Now I checked both in the documentation and
> >getstr.c and both say that getstr reads up to a newline ('\n') or EOF.
> >When I put this into practice, though, it just plain doesn't work.  It
> >keeps reading everything in.  This includes newlines, SIGINTR, SIGKILL,
> >SIGSUSP.  The only way to get out of it is to use another terminal and kill
> >the program's process.

I can suggest one possible problem; If you don't set to crmode specifically
I think that getstr() sets the terminal to RAW mode. Try calling cbreak or
crmode. 
-- 
-------------------------------------------------------------------------------
                           Erik James Freed
			   Aurora Systems
			   San Francisco, CA
			   {dual,ptsfa}!aum!freed



More information about the Comp.unix.wizards mailing list