[comp.unix.questions] Need help with Curses

eckberg3@ucselx.sdsu.edu (Alex M. Lee) (06/09/90)

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@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@ucselx.sdsu.edu
10645 Glendover Lane            Uucp: ...!ucsd!sdsu!ucselx!alee  
San Diego, CA 92126	        Telephone: (619) 271-7055