[comp.sources.bugs] tcsh 5.4 bugs

lew@gsg.UUCP (Paul Lew) (01/15/88)

Anyone know/fix this one?

	> tcsh -f

will "core dump", and leave terminal setting in strange state.
csh -f works fine.  I ran adb to find out why and I could not
get out because EOF char was mapped to NIL char!!
-- 
----------------------------------------------------------------------
Paul Lew			{olivea,harvard,decvax}!gsg!lew	(UUCP)
General Systems Group, 5 Manor Parkway, Salem, NH 03079	(603) 893-1000

michaelk@copper.TEK.COM (Michael D. Kersenbrock) (01/16/88)

Expires:

Sender:

Followup-To:


>Anyone know/fix this one?
>
>	> tcsh -f
>
>will "core dump", and leave terminal setting in strange state.
>csh -f works fine.  I ran adb to find out why and I could not
>get out because EOF char was mapped to NIL char!!
>-- 
>----------------------------------------------------------------------
>Paul Lew			{olivea,harvard,decvax}!gsg!lew	(UUCP)
>General Systems Group, 5 Manor Parkway, Salem, NH 03079	(603) 893-1000

A quick fix is the following patch (which causes Ed_init() to be called
even with the -f).  The core dump happens on line 48 of ed.refresh.c
(the first line of code in Vdraw() ).   Seems to fix the problem.


*** sh.C	Fri Jan 15 15:21:52 1988
--- sh.c	Fri Jan 15 15:23:46 1988
***************
*** 503,508
  	 */
  	setexit();
  	haderr = 0;		/* In case second time through */
  	if (!fast && reenter == 0) {
  		reenter++;
                  if (!fast && !arginp && !onelflg) { /* PWP setup stuff */

--- 503,513 -----
  	 */
  	setexit();
  	haderr = 0;		/* In case second time through */
+ 
+ 	if (reenter == 0  && !arginp && !onelflg) { 
+ 	    ed_Init();	/* init the new line editor */
+ 	}    
+ 
  	if (!fast && reenter == 0) {
  		reenter++;
  		/* Will have value("home") here because set fast if don't */
***************
*** 505,514
  	haderr = 0;		/* In case second time through */
  	if (!fast && reenter == 0) {
  		reenter++;
-                 if (!fast && !arginp && !onelflg) { /* PWP setup stuff */
- 		    ed_Init();	/* init the new line editor */
- 		    /* PWP: setup the editor BEFORE doing .cshrc, else bugs! */
- 		}    
  		/* Will have value("home") here because set fast if don't */
  		srccat(value("home"), "/.cshrc");	/* upward compat. */
  		if (!fast && !arginp && !onelflg)

--- 510,515 -----
  
  	if (!fast && reenter == 0) {
  		reenter++;
  		/* Will have value("home") here because set fast if don't */
  		srccat(value("home"), "/.cshrc");	/* upward compat. */
  		if (!fast && !arginp && !onelflg)

-- 
Mike Kersenbrock
Tektronix Microcomputer Development Products
Aloha, Oregon