More little bug fixes

This commit is contained in:
rsc 2004-05-14 17:45:39 +00:00
parent 1a8f27c350
commit f1bfc54e12
9 changed files with 31 additions and 7 deletions

View file

@ -23,12 +23,20 @@ readenv(void)
Word *w;
for(p = environ; *p; p++){
/* rsc 5/5/2004 -- This misparses fn#cd={whatever}
s = shname(*p);
if(*s == '=') {
*s = 0;
w = newword(s+1);
} else
w = newword("");
*/
s = strchr(*p, '=');
if(s){
*s = 0;
w = newword(s+1);
} else
w = newword("");
if (symlook(*p, S_INTERNAL, 0))
continue;
s = strdup(*p);