curses question

Richard L. Klappal rlk at chinet.UUCP
Mon Sep 9 17:57:05 AEST 1985


I am hoping for some curses(d) enlightenment!!

My system:
	Fortune 32:16
		For:Pro Version 1.7.4 (V7 + 4.?BSD + Fortune mods)
	C compiler:
		/usr/lib/libcurses.a	Fortune Systems Release 1.8 class C
		/usr/lib/libtermcap.a	Fortune Systems Release 1.8 class C
		/usr/lib/ccom		Fortune Systems Release 1.7
My problems:
	getstr() and scanw()/wscanw()

	If I use crmode() to set CBREAK and nl() to let the <return> key
	terminate a string, backspaces display as ^H on the screen, 0x08
	codes are imbedded in the string and the <return> key works.

	If I use nocrmode() and nl(), backspaces work CORRECTLY on the
	screen, 0x08 codes are imbedded in my input string, and <return>
	does NOT terminate a string, it just puts 0x0d's in the string
	(got to use the LF key).


Finally, the questions:
	Is this the way curses is supposed to act?

	Have I missed the obvious, and am doing something wrong?

	Is there something busted in the way that the Fortune does input?
	(All other programs, including vi seem to work fine)?

BTW: (flame):
	Why was the name crmode() chosen since it affects CBREAK, not CRMOD?
	Wouldn't cbreak() [or cbrk(), or half_baked(:->)] been a better
	choice? Then CRMOD could mean Carriage Return MODe.
				      -        -      ---
	(Now that I have everyone permanently mixed up on which does
	what, flame-off.  Sorry about that, got carried away.  I think I
	hear the guys with the butterfly nets & straight jackets
	coming.)


PS:	I don't have any of the sources to the distributed curses.  I
	do have the PD curses source, and as far as I can tell so far
	there is very little difference.  I haven't tried extracting
	objects from libcurses.a, and diffing them with the PD objects,
	but I'm about ready to.

-- 

Richard Klappal

UUCP:		..!ihnp4!chinet!uklpl!rlk  | "Money is truthful.  If a man
MCIMail:	rklappal		   | speaks of his honor, make him
Compuserve:	74106,1021		   | pay cash."
USPS:		1 S 299 Danby Street	   | 
		Villa Park IL 60181	   |	Lazarus Long 
TEL:		(312) 620-4988		   |	    (aka R. Heinlein)
-------------------------------------------------------------------------



More information about the Comp.unix.wizards mailing list