Need help with Curses

Alex M. Lee eckberg3 at ucselx.sdsu.edu
Sat Jun 9 04:49:03 AEST 1990


Dear Unix Wizards,

  I have the following simple program which use Curses package to read
a file name. The problem is when you want to use backspace to correct the 
input the  will be echoed on the screen. I tried setting different 
terminal mode without success. Does anyone know how to solve it?
Please E-mail me.

  Thanks in advance!!

  Alex (alee at ucselx.sdsu.edu)

----------------------------------------------------------------------
#include <curses.h>
#include <signal.h>

main(argc, argv)
int argc;
char *argv[];
{
  char str[8];
  int curline = 0, curcol = 0;
  initscr();
  nocbreak(); 
  move(curline, curcol);
  addstr("Enter the file name - ");
  refresh();
  getstr(str); 
  printw("\nThe file name is %s\n", str); 
  refresh();
  endwin();
}

-- 
------------------------------------------------------------------------------
Alex M. Lee 			Internet : alee at ucselx.sdsu.edu
10645 Glendover Lane            Uucp: ...!ucsd!sdsu!ucselx!alee  
San Diego, CA 92126	        Telephone: (619) 271-7055



More information about the Comp.unix.wizards mailing list