Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-3.0.4 released
- X-seq: zsh-workers 3293
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh workers list)
- Subject: Re: zsh-3.0.4 released
- 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
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)) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author