Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: termcap/terminfo includes
On Monday 2010-02-08 10:50 +0000, Peter Stephenson output:
:Please could you send a minimal change to fix your problem? A generic
:solution is obviously better (though fraught for the reasons above) but
:we'll certainly make do with a system-specific test.
For the longer term, changing the name of the variable "underscore" works.
Regards,
Geoff
--- exec.c.org 2009-12-18 04:31:16.000000000 +1100
+++ exec.c 2010-02-05 13:27:22.000000000 +1100
@@ -2191,17 +2191,17 @@
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 @@
ou = zalloc(ouu = underscoreused);
if (ou)
- memcpy(ou, underscore, underscoreused);
+ memcpy(ou, zunderscore, underscoreused);
while (wrap) {
wrap->module->wrapper++;
@@ -4750,7 +4750,7 @@
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;
--- init.c.org 2010-02-05 04:34:51.000000000 +1100
+++ init.c 2010-02-05 13:26:29.000000000 +1100
@@ -42,7 +42,7 @@
/* buffer for $_ and its length */
/**/
-char *underscore;
+char *zunderscore;
/**/
int underscorelen, underscoreused;
@@ -818,9 +818,9 @@
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;
--- params.c.org 2010-01-14 04:30:16.000000000 +1100
+++ params.c 2010-02-05 13:27:39.000000000 +1100
@@ -3974,7 +3974,7 @@
char *
underscoregetfn(UNUSED(Param pm))
{
- char *u = dupstring(underscore);
+ char *u = dupstring(zunderscore);
untokenize(u);
return u;
--- utils.c.org 2009-12-18 04:31:20.000000000 +1100
+++ utils.c 2010-02-05 13:27:47.000000000 +1100
@@ -1356,7 +1356,7 @@
usav = zalloc(underscoreused);
if (usav)
- memcpy(usav, underscore, underscoreused);
+ memcpy(usav, zunderscore, underscoreused);
setunderscore(*s);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author