rlk@chinet.UUCP (Richard L. Klappal) (09/09/85)
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) -------------------------------------------------------------------------
arnold@ucsfcgl.UUCP (Ken Arnold%CGL) (09/12/85)
In article <178@chinet.UUCP> rlk@chinet.UUCP (Richard L. Klappal) writes: >I am hoping for some curses(d) enlightenment!! > >My problems: > getstr() and scanw()/wscanw() You have problems with getst() and scanw() because they were never fully debugged because nobody I knew ever found them useful enough to use. I (and everyone I ever knew) always wrote my own input handling routines, especially since most curses programs do very special things with certain input, so general routines are pretty useless. These comments do not necessarily apply to System Vr2 curses, since that was written independently by Mark Horton Ken Arnold