Small curses test program

Usenet file owner usenet at cps3xx.UUCP
Fri Jun 30 01:02:18 AEST 1989


in article <1173 at cs.rit.edu$, syspgm%ritcv at cs.rit.edu says:
$ 
$ 
$ 	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.
$ 
$ main()
$ 
$    {
$    char line[132];
$ 
$    initscr();
$    getstr(line);
$    printw("%s\n",line);
$    refresh();
$    endwin();
$    }

I suspect the problem is with Sys V using terminfo while the Berkeley
flavors use termcap. For kicks, I tried the test program under 
SCO XENIX 386 v2.3.1. Xenxix provides both termcap and terminfo. Using
terminfo, it worked fine. Using termcap, the program wouldn't work.
(it started up, but didn't clear the screen, interupting out of 
the program, I found I needed to kill myself..)

John H. Lawitzke           UUCP: Work: ...uunet!frith!dale1!jhl
Dale Computer Corp., R&D         Home  ...uunet!frith!ipecac!jhl
2367 Science Parkway       Internet:   jhl at frith.egr.msu.edu
Okemos, MI, 48864                             [35.8.8.108]



More information about the Comp.lang.c mailing list