zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: zsh-workers@math.gatech.edu (Zsh workers list)
Subject: Re: zsh-3.0.4 released
Date: Tue, 24 Jun 1997 00:14:35 +0200 (MET DST)	[thread overview]
Message-ID: <199706232214.AAA25627@bolyai.cs.elte.hu> (raw)

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)) {


             reply	other threads:[~1997-06-23 22:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-23 22:14 Zoltan Hidvegi [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-06-23  5:32 Zoltan Hidvegi
1997-06-23 17:08 ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199706232214.AAA25627@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).