Sandy on Sun, 9 Jan 2000 10:34:34 -0500 (EST)


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

[PLUG] gcc screen unbuffered input


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