From: Geoff Wing <gcw@zsh.org>
To: Zsh Hackers <zsh-workers@zsh.org>
Subject: Re: termcap/terminfo includes
Date: Tue, 9 Feb 2010 09:45:25 +1100 [thread overview]
Message-ID: <20100208224525.GA24871@primenet.com.au> (raw)
In-Reply-To: <20100208105012.6417d49d@news01>
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);
prev parent reply other threads:[~2010-02-08 22:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 11:53 Roy Marples
2010-02-08 10:50 ` Peter Stephenson
2010-02-08 22:45 ` Geoff Wing [this message]
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=20100208224525.GA24871@primenet.com.au \
--to=gcw@zsh.org \
--cc=zsh-workers@zsh.org \
/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).