Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 from ihnp4 4.3bsd-beta 6/6/85; site chinet.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!chinet!rlk From: rlk@chinet.UUCP (Richard L. Klappal) Newsgroups: net.unix-wizards,net.lang.c Subject: curses question Message-ID: <178@chinet.UUCP> Date: Mon, 9-Sep-85 03:57:05 EDT Article-I.D.: chinet.178 Posted: Mon Sep 9 03:57:05 1985 Date-Received: Tue, 10-Sep-85 04:53:19 EDT Distribution: na Organization: chinet, Public Access UN*X, Chicago, IL Lines: 58 Keywords: getstr() Xref: watmath net.unix-wizards:14776 net.lang.c:6313 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 key terminate a string, backspaces display as ^H on the screen, 0x08 codes are imbedded in the string and the key works. If I use nocrmode() and nl(), backspaces work CORRECTLY on the screen, 0x08 codes are imbedded in my input string, and 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) -------------------------------------------------------------------------