[comp.os.minix] V1.4a shell: echoing bug and fix

nfs@notecnirp.Princeton.EDU (Norbert Schlenker) (07/18/89)

The following cdiff fixes a problem with the v1.4a shell (the problem was
first noted by Bruce Evans).  The problem is that the shell refuses to
echo the setting of variables when echoing is requested (via the -x flag
or set -x).  Note that the patch will not apply to the base v1.3 shell;
it must be applied after Andy Tanenbaums's v1.4a patches.

------------------------------ Cut here ---------------------------------
*** sh3.c.orig	Wed Jun 21 01:54:32 1989
--- sh3.c	Wed Jun 21 02:34:02 1989
***************
*** 223,229 ****
  		/* strip all initial assignments */
  		/* not correct wrt PATH=yyy command  etc */
  		if (flag['x'])
! 			echo(wp);
  		if (cp == NULL && t->ioact == NULL) {
  			while ((cp = *owp++) != NULL && assign(cp, COPYV))
  				;
--- 223,229 ----
  		/* strip all initial assignments */
  		/* not correct wrt PATH=yyy command  etc */
  		if (flag['x'])
! 			echo (cp ? wp: owp);
  		if (cp == NULL && t->ioact == NULL) {
  			while ((cp = *owp++) != NULL && assign(cp, COPYV))
  				;