From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29322 invoked from network); 23 Jun 1997 22:17:26 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1997 22:17:26 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA16163; Mon, 23 Jun 1997 18:10:48 -0400 (EDT) Resent-Date: Mon, 23 Jun 1997 18:10:48 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199706232214.AAA25627@bolyai.cs.elte.hu> Subject: Re: zsh-3.0.4 released To: zsh-workers@math.gatech.edu (Zsh workers list) Date: Tue, 24 Jun 1997 00:14:35 +0200 (MET DST) Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"71DC91.0.Uy3.dHlhp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3293 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Wayne Davison wrote: > There's something wrong with the terminal init code in zsh-3.0.4. > If I use a custom terminfo directory (export TERMINFO=/home/wayne/etc) > so I can use a custom terminal name (export TERM=screen), zsh > fails to find this terminal when starting up (I run "zsh -f" and > the terminal is in dumb mode). If I then re-export the TERM > name, it starts to work correctly. This problem does not occur > if I use a terminal name that is in the global terminfo database. Please try this patch. Zoltan diff -c Src/params.c.orig Src/params.c *** Src/params.c.orig Mon Jun 23 13:09:14 1997 --- Src/params.c Mon Jun 23 18:09:40 1997 *************** *** 42,48 **** createparamtable(void) { Param ip, pm; ! char **old_environ, **envp, **envp2, **sigptr, **t; char buf[50], *str, *iname; int num_env; --- 42,48 ---- createparamtable(void) { Param ip, pm; ! char **new_environ, **envp, **envp2, **sigptr, **t; char buf[50], *str, *iname; int num_env; *************** *** 96,109 **** /* Copy the environment variables we are inheriting to dynamic * * memory, so we can do mallocs and frees on it. */ ! old_environ = environ; ! num_env = arrlen(old_environ); ! environ = (char **) zalloc(sizeof(char *) * (num_env + 1)); ! *environ = NULL; /* Now incorporate environment variables we are inheriting * * into the parameter hash table. */ ! for (envp = environ, envp2 = old_environ; *envp2; envp2++) { for (str = *envp2; *str && *str != '='; str++); if (*str == '=') { iname = NULL; --- 96,108 ---- /* Copy the environment variables we are inheriting to dynamic * * memory, so we can do mallocs and frees on it. */ ! num_env = arrlen(environ); ! new_environ = (char **) zalloc(sizeof(char *) * (num_env + 1)); ! *new_environ = NULL; /* Now incorporate environment variables we are inheriting * * into the parameter hash table. */ ! for (envp = new_environ, envp2 = environ; *envp2; envp2++) { for (str = *envp2; *str && *str != '='; str++); if (*str == '=') { iname = NULL; *************** *** 125,130 **** --- 124,130 ---- *str = '='; } } + environ = new_environ; pm = (Param) paramtab->getnode(paramtab, "HOME"); if (!(pm->flags & PM_EXPORTED)) {