Kyle Burton on Mon, 10 Jan 2000 10:36:37 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] gcc screen unbuffered input


I just saw that the manpage for ncurses says to do three things:

initscr(); cbreak(); noecho();

That's what it says most programs will probably want if they're doing full 
screen, because they usualy don't want to have input echoed back to the 
console...


Heh, I learn something new every day.  I guess I can go home and sleep till
tomorrow now that today's lesson is out of the way.

k




------------------------------------------------------------------------------
If God didn't mean for us to juggle, tennis balls wouldn't come three to a
can. 
    -- Unknown (http://slashdot.org)
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

On Sun, 9 Jan 2000, Sandy wrote:

> dear members:
> 
>   thank you all for your kind suggestions.  i really appreciate all of your
> help.
>   enclosed is the sample program that works.
>   
>     very truly,
>       sandy
> 
> /routine to shut off line buffering on the screen
> #include<curses.h>
> //  the curses.h file has the stdio.h file include
> #include<termios.h>
> #include<unistd.h>
> int main()
> {
> //FILE *out;
> size_t zero_t=0;
> int ch;
> // the next two statements are written up in ncurses & cbreak man pages
> initscr();
>  cbreak();
> 
> while ((ch=getch()) != '\n') 
>   {	
> 
> putc(ch,stderr);
>   }
> // this returns the screen to normal ftn
> endwin();
> return 0;
> }
> 
> 
> 
> 
> _______________________________________________
> PLUG maillist  -  PLUG@lists.nothinbut.net
> http://lists.nothinbut.net/mail/listinfo/plug
> 


_______________________________________________
PLUG maillist  -  PLUG@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug