zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Bugs on SourceForge
Date: Thu, 29 Mar 2001 12:27:35 +0100	[thread overview]
Message-ID: <Tc0a88d015296cae983@mailsweeper01.cambridgesiliconradio.com> (raw)
In-Reply-To: Your message of "Thu, 29 Mar 2001 06:53:34 -0000." <1010329065334.ZM17730@candle.brasslantern.com>

> We should at least address 219457 and 219459 before 4.0.1, not because I
> submitted them, but because they're shell-crashers.

This should fix any lurking problems with %m in a prompt crashing the
shell.  We don't assume we can write to the return value of getsparam() any
more, which probably wasn't a good assumption at the best of times.  This
is general enough that I haven't looked further down, but I would assume
that we were getting back a "", which gcc would have put in the text
segment, but behaviour with other compilers would differ.  Hence the
variable experiences.

Index: Src/prompt.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prompt.c,v
retrieving revision 1.4
diff -u -r1.4 prompt.c
--- Src/prompt.c	2001/01/16 13:44:20	1.4
+++ Src/prompt.c	2001/03/29 11:18:23
@@ -392,10 +392,7 @@
 		    for (ss = hostnam; *ss; ss++)
 			if (*ss == '.' && !--arg)
 			    break;
-		    t0 = *ss;
-		    *ss = '\0';
-		    stradd(hostnam);
-		    *ss = t0;
+		    stradd(*ss ? dupstrpfx(hostnam, ss - hostnam) : hostnam);
 		}
 		unqueue_signals();
 		break;

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


  parent reply	other threads:[~2001-03-29 11:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-29  6:53 Bart Schaefer
2001-03-29 10:19 ` Peter Stephenson
2001-03-29 11:27 ` Peter Stephenson [this message]
2001-03-29 14:36 ` Peter Stephenson
2001-03-29  9:51 Sven Wischnowsky
2001-05-14 15:23 (Fwd) " Peter Stephenson
2001-05-14 16:21 ` Bart Schaefer
2001-05-14 18:09   ` Jason Price
     [not found]   ` <20010516130705.A25104@oobleck.gatech.edu>
     [not found]     ` <1010516194927.ZM15038@candle.brasslantern.com>
2001-05-16 21:24       ` Jason Price

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=Tc0a88d015296cae983@mailsweeper01.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /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).