curses and carriage returns

Jeremy Nussbaum jeremy at jeremy.prime.com
Tue Dec 19 06:56:19 AEST 1989


I just brought up a package called index on an sgi 4d running 3.2.  The package
uses berkeley curses.  By defining NOMACROS and a couple of other odds
and ends I have it up and running, with one problem.  It ignores
carriage returns, and insists upon line feeds.  The program is looking
for "\n".  What do I need to tell curses to have the enter key mapped
to a \n?  Characters are read in by getchar(), and the modes set
upon entry are noecho and cbreak.  Adding nl doesn't seem to help.

Any hints would be appreciated.  I could change all instances of checking
for \n to check for ^m also, but there must be a better way.

--

Jeremy Nussbaum
jeremy at jeremy.prime.com, ...!harvard!prmcad!jeremy
Prime Computer
2 Crosby Drive MS 16-2 
Bedford, Ma. 01730
(617)275-1800 x6745



More information about the Comp.sys.sgi mailing list