Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!cmcl2!philabs!ttidca!lipman!derrell From: derrell@lipman.UUCP (derrell) Newsgroups: net.wanted.sources Subject: Re: BSD equivalents to System V curses functionality Message-ID: <123@lipman.UUCP> Date: Fri, 14-Mar-86 22:25:45 EST Article-I.D.: lipman.123 Posted: Fri Mar 14 22:25:45 1986 Date-Received: Mon, 17-Mar-86 03:37:19 EST References: <331@drivax.UUCP> Distribution: net Lines: 54 Bruce Holloway writes: > Our System V curses library has the following functions, but BSD curses > doesn't. We're just about to go from System V to BSD, and I'd like to > port some programs over that use these functions. Could anyone tell > me the equivalent BSD curses functions, or post the source to some > equivalents? > > Routine Function > =================== ========================================= > beep() Beeps the terminal > cbreak() Put the terminal into cbreak mode > saveterm() Save the current terminal characteristics > resetterm() Restore previously saved TTY chars > nocbreak() Remove cbreak mode > > Also, how do you tell when a character is ready on stdin in cbreak mode? > The only method that comes to mind is to test "feof(stdin)" frequently, > but that comes back "TRUE" in every case. > > -- The following functions in BSD curses are equivilent to the above: beep() { putchar(7); } crmode() is the equivalent to cbreak() savetty() is the equivalent to saveterm() resetty() is the equivalent to resetterm() nocrmode() is the equivalent to nocbreak() I hope this helps. -- ===================================================================== "The pioneers of a warless world are those young men, and women, who refuse military service." -- Albert Einstein Derrell Lipman Lipman Enterprises -- Windowing for Unix on standard ASCII terminals {ucbvax,ihnp4}!trwrb!ttidca!lipman!derrell