From ron.johnston at mcgill.ca Thu Nov 6 19:24:59 2008 From: ron.johnston at mcgill.ca (Ron Johnston) Date: Thu, 6 Nov 2008 12:24:59 -0500 Subject: tcsh bug Message-ID: $%name returns $name when name is environmental. Using sunOS. Ron Johnston Library Technology Services McGill University From christos at zoulas.com Fri Nov 7 18:11:02 2008 From: christos at zoulas.com (Christos Zoulas) Date: Fri, 7 Nov 2008 11:11:02 -0500 Subject: tcsh bug In-Reply-To: from Ron Johnston (Nov 6, 12:24pm) Message-ID: <20081107161102.D4D975654E@rebar.astron.com> On Nov 6, 12:24pm, ron.johnston at mcgill.ca (Ron Johnston) wrote: -- Subject: tcsh bug | $%name returns $name when name is environmental. Using sunOS. | | Ron Johnston | Library Technology Services | McGill University | thanks, christos Index: sh.dol.c =================================================================== RCS file: /p/tcsh/cvsroot/tcsh/sh.dol.c,v retrieving revision 3.74 diff -u -u -r3.74 sh.dol.c --- sh.dol.c 14 May 2008 20:10:30 -0000 3.74 +++ sh.dol.c 7 Nov 2008 16:10:33 -0000 @@ -587,9 +587,13 @@ cleanup_until(name); fixDolMod(); - xfree(env_val); - env_val = Strsave(np); - setDolp(env_val); + if (length) { + addla(putn(Strlen(np))); + } else { + xfree(env_val); + env_val = Strsave(np); + setDolp(env_val); + } goto eatbrac; } udvar(name->s);