Small curses test program

syspgm%ritcv at cs.rit.edu syspgm%ritcv at cs.rit.edu
Tue Jun 27 00:03:34 AEST 1989


	A while back I ran across a problem with the curses routine getstr.
Getstr in some operating systems' implementations disables the backspace/delete
key. I have since determined that the routine works on System V 
but does not work on Sun OS or Ultrix machines. I am curious if anyone with
later versions of these operating systems has any luck with the following
short program.

	Sun O.S. 4.0		(Sun 50/60 workstations)	-- NO
	Ultrix-32 V3.0		(Vax 11/780)			-- NO
	Unix System V/386	(AT&T 6386)			-- YES
	Unix System V 3.1.1	(AT&T 3B2 600)			-- YES
	VMS 5.1			(VAX 8800 cluster)		-- YES

### cut here
#include <curses.h>

/*
**  Dean S. Blodgett	Rochester Institute of Technology
**
**  the question is does this program allow you to use the backspace/delete
**  key without having ^H or ^? echoed to the screen and is the backspace
**  delete key functional ?
*/

main()

   {
   char line[132];

   initscr();
   getstr(line);
   printw("%s\n",line);
   refresh();
   endwin();
   }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| Dean Scott Blodgett		   |	Make it in Massachusetts,	       |
| Rochester Institute of Technology|    Spend it in New Hampshire	       |
| e-mail: cs.rit.edu		   |    (Go Sox)			       |



More information about the Comp.lang.c mailing list