Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!mit-eddie!snorkelwacker!usc!cs.utexas.edu!samsung!uunet!vtserf!groupw.cns.vt.edu From: benchoff@groupw.cns.vt.edu (Phil Benchoff) Newsgroups: comp.unix.ultrix Subject: Problem with getstr() Message-ID: <128@vtserf.cc.vt.edu> Date: 16 Jul 90 13:34:00 GMT Sender: news@vtserf.cc.vt.edu Organization: Va Tech Communications Resources Lines: 38 getstr() is supposed to read a string terminated with carriage return or newline, and use editing characters from termcap. This works on other Unix systems, but under Ultrix I have to use ^h for delete and have to end lines with newline. Enclosed is a sample program to demonstrate the problem. Works: NeXT, AIX Doesn't work: Ultrix V3.1D (Rev. 54) Is this a bug in Ultrix, or are there some other things I should check? Everything seems to work (vi, etc) except for a program called Display, which is part of the Internet Rover package from merit.edu. ---------------------------------------- /* ** curtest.c ** ** Compile with cc -O -o curtest curtest.c -lcurses -ltermcap ** ** Demonstrates a bug in getstr() function in the curses library. The man ** pages claim that getstr() will read a string terminated with either ** carriage return or newline. Only newline works. */ #include #include main() { char buf[255]; initscr(); getstr(buf); printf("You Typed: %s\n",buf); endwin(); } --------------------------------- Phil Benchoff, benchoff@groupw.cns.vt.edu