🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.d
Article #167

Re: erase key in NN

#167
From: Dean Brooks
Date: Thu, 20 Jul 1989 02:28
38 lines
1742 bytes
pim@ctisbv.UUCP (Pim Zandbergen) writes:

>Normally, I use ^H as the erase key and DEL as the interrupt character.
>NN, however, will not do erase processing when it prompts me for filenames,
>newsgroups, etc. It will when I change the erase character to DEL
>and the interrupt character to ^C.

  We had the same problem with NN on our machine; in fact its the only
complaint I had about the entire package!  NN is a wonderful newsreader.

  Anyway, the one-line-fix below corrected the problem entirely for us.
Apparantely there was a problem with the CTRL-H key being trapped by the
key binding routines before it was identified as a back-space.

  Here is the fix.  The below one-line-fix is in "term.c", in the function
called "get_c()".  Simply add the one extra line.  It worked for us; we
are running UNIX 5.2 on Plexus hardware...  Hope it helps.

----
    
    while (--n >= 0) {
	c = *cp++;
#else    

    while ((n = read(0, &c, 1)) > 0) {
	c &= 0177;	/* done by ISTRIP on USG systems */
#endif
+	if (c == erase_key) goto got_char;  /* FIX for ERASE_KEY problem */
	
	any_multi = 0;
	for (i = multi_keys, mk = multi_key_list; --i >= 0; mk++)
	    if (mk->cur_key) {
----

dean@coplex.UUCP   Dean A. Brooks
                   Copper Electronics, Inc.
                   Louisville, Ky
UUCP: !mit-eddie!bloom-beacon!coplex!dean
Technical Details
Message-ID: <743@coplex.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!coplex!dean
References: <788@ctisbv.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!coplex!dean
From: dean@coplex.UUCP (Dean Brooks)
Newsgroups: comp.sources.d
Subject: Re: erase key in NN
Keywords: nn
Message-ID: <743@coplex.UUCP>
Date: 20 Jul 89 02:28:34 GMT
References: <788@ctisbv.UUCP>
Organization: Copper Electronics,  Louisville, Ky.
Lines: 38