mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-09 18:51:46 +01:00
Geoff: 27693: rename underscore to avoid name clash
This commit is contained in:
parent
4a0ddedf0a
commit
9fe0077305
4 changed files with 19 additions and 14 deletions
|
|
@ -1,6 +1,11 @@
|
|||
2010-02-09 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Geoff: 27693: Src/exec.c, Src/init.c, Src/params.c, Src/init.c:
|
||||
rename underscore to avoid name clash.
|
||||
|
||||
2010-02-08 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* unposte: Src/subst.c: comment about what colon in parameter
|
||||
* unposted: Src/subst.c: comment about what colon in parameter
|
||||
substitution might be doing.
|
||||
|
||||
* unposted: Completion/compinit,
|
||||
|
|
@ -12707,5 +12712,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.4887 $
|
||||
* $Revision: 1.4888 $
|
||||
*****************************************************
|
||||
|
|
|
|||
16
Src/exec.c
16
Src/exec.c
|
|
@ -2191,17 +2191,17 @@ setunderscore(char *str)
|
|||
int l = strlen(str) + 1, nl = (l + 31) & ~31;
|
||||
|
||||
if (nl > underscorelen || (underscorelen - nl) > 64) {
|
||||
zfree(underscore, underscorelen);
|
||||
underscore = (char *) zalloc(underscorelen = nl);
|
||||
zfree(zunderscore, underscorelen);
|
||||
zunderscore = (char *) zalloc(underscorelen = nl);
|
||||
}
|
||||
strcpy(underscore, str);
|
||||
strcpy(zunderscore, str);
|
||||
underscoreused = l;
|
||||
} else {
|
||||
if (underscorelen > 128) {
|
||||
zfree(underscore, underscorelen);
|
||||
underscore = (char *) zalloc(underscorelen = 32);
|
||||
zfree(zunderscore, underscorelen);
|
||||
zunderscore = (char *) zalloc(underscorelen = 32);
|
||||
}
|
||||
*underscore = '\0';
|
||||
*zunderscore = '\0';
|
||||
underscoreused = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -4506,7 +4506,7 @@ runshfunc(Eprog prog, FuncWrap wrap, char *name)
|
|||
|
||||
ou = zalloc(ouu = underscoreused);
|
||||
if (ou)
|
||||
memcpy(ou, underscore, underscoreused);
|
||||
memcpy(ou, zunderscore, underscoreused);
|
||||
|
||||
while (wrap) {
|
||||
wrap->module->wrapper++;
|
||||
|
|
@ -4750,7 +4750,7 @@ execsave(void)
|
|||
es->traplocallevel = traplocallevel;
|
||||
es->noerrs = noerrs;
|
||||
es->subsh_close = subsh_close;
|
||||
es->underscore = ztrdup(underscore);
|
||||
es->underscore = ztrdup(zunderscore);
|
||||
es->next = exstack;
|
||||
exstack = es;
|
||||
noerrs = cmdoutpid = 0;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ int noexitct = 0;
|
|||
/* buffer for $_ and its length */
|
||||
|
||||
/**/
|
||||
char *underscore;
|
||||
char *zunderscore;
|
||||
|
||||
/**/
|
||||
int underscorelen, underscoreused;
|
||||
|
|
@ -818,9 +818,9 @@ setupvals(void)
|
|||
ifs = ztrdup(DEFAULT_IFS);
|
||||
wordchars = ztrdup(DEFAULT_WORDCHARS);
|
||||
postedit = ztrdup("");
|
||||
underscore = (char *) zalloc(underscorelen = 32);
|
||||
zunderscore = (char *) zalloc(underscorelen = 32);
|
||||
underscoreused = 1;
|
||||
*underscore = '\0';
|
||||
*zunderscore = '\0';
|
||||
|
||||
zoptarg = ztrdup("");
|
||||
zoptind = 1;
|
||||
|
|
|
|||
|
|
@ -3974,7 +3974,7 @@ wordcharssetfn(UNUSED(Param pm), char *x)
|
|||
char *
|
||||
underscoregetfn(UNUSED(Param pm))
|
||||
{
|
||||
char *u = dupstring(underscore);
|
||||
char *u = dupstring(zunderscore);
|
||||
|
||||
untokenize(u);
|
||||
return u;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue