From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 15636 invoked from network); 11 Sep 2023 08:57:45 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2023 08:57:45 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694422666;
b=jEdCP79LbmE9K7HpmyGt1jM9lZlDlOHqu74QmwWkvjt3W3ZHNx9GcDWLgkg9+Zir6rJBoXWiJu
pnRq6p6fzFDS/tU3c1dUBc3sPTTVtaM/EhiiTLOjLaUU6941BGO8pfMRR4Yj9khdeqXzmzGWJG
4NolQS61CbfJSBxTtPYu380vwXUmjUf20b2cQms9w6dKEUQd0ckT/+Qq67zYlIzCVPRRrjbiyU
d63PGOXrWY8NTKyuODtbNNC++dBd0YgPwVXr5u2SiX+oJXoANpOIfJAjtsn6ZzjO6fvbHvSpBr
65G6bMorw+CU43/0hh+IEAliClrArS2EVV/jq/jAZKXg2Q==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (csmtpq3-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.34;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1694422666;
bh=x824+f8Id5geQvTxn14SNUezyDoYdYhoLeQ7rb+ajys=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=cDTm8kRO03oS12MAo/XR6kKjJ/XeEoclJ19i6P5hOFdOWLLBFQcYufpqj3Cm3LbnwWaS1hInVl
e4K5j5kearCCA38/Y/8aSzkFZuCbdGSXYs6QJyf33ESyn7slQMZpsv5A0o5N0PIBfnLiyEZVZ0
2DaWMQ2FgAtAhRAjzPKJx7jdqUpOD55U+ujjLaPNz+O+4LB1LfibJkxpmkrh0zpC21T6eSR/6h
mgCZJb2hZZnjYCEDSYxyzmuWzwD64HqPCDoPz9vW81vpIze34ERF3HMxJkhkfP5KtvhCVu1OSs
cDMvIlEJ8mDuulEOBEuYXc5ZnypJ3Wkba5LciYjEntYuiQ==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org;
s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:
List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=btTcoHvyEC5h70gaNE+Kf+GCG8vGF0rUnRvwtv7W8bY=; b=J4K9AyV83PdQiwJzEpE75PV1cF
f9mmn4y+zXcQRXYMzuUgg2aDN0kgDfuLUEJWZ22iqSndNAzII/ULZtsc/XpSbc5lmrzF0p2xolGKV
ka6MBuL8X/Aw73KfNMtMUkGHMPet5FrEpaW+jRAxTaIGy7QWb5PkraxaxcsQ5uIo+0AAlLygs4S1S
Eh0V28tyL67RIMNwAI8fk18iIn9VRLCOVRfMo57UwLAQpNnMHsSl/DXzh+6mYw8lBgQoTx0bzw00o
pypxPPbhY6qcpUFBHwnfILi1lz4L518yvtSPdWIReFTpLPxRvfhJ4G25WC6xqCsEkbzYs/RXN0uQv
8Ln2sBPw==;
Received: by zero.zsh.org with local
id 1qfcjp-000INY-IU;
Mon, 11 Sep 2023 08:57:45 +0000
Authentication-Results: zsh.org;
iprev=pass (csmtpq3-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.34;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from csmtpq3-prd-nl1-vmo.edge.unified.services ([84.116.50.34]:62707)
by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256)
id 1qfcjU-000I3s-9x;
Mon, 11 Sep 2023 08:57:25 +0000
Received: from oxsmtp1-prd-nl1-vmo.nl1.unified.services ([100.107.83.138])
by csmtpq3-prd-nl1-vmo.edge.unified.services with esmtp (Exim 4.93)
(envelope-from
)
id 1qfcjS-0099Ns-KL
for zsh-workers@zsh.org; Mon, 11 Sep 2023 10:57:22 +0200
Received: from oxbe18-prd-nl1-vmo.nl1.unified.services ([100.107.83.141])
by oxsmtp1-prd-nl1-vmo.nl1.unified.services with ESMTP
id fcjSqapaxzc6ZfcjSqOsUR; Mon, 11 Sep 2023 10:57:22 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 100.107.83.141
X-CNFS-Analysis: v=2.4 cv=OMHhnwWB c=1 sm=1 tr=0 ts=64fed672 cx=a_exe
a=Geqx+NPbHKPVi5Wvcymeew==:117 a=wbvTLvLwOfMA:10 a=IkcTkHD0fZMA:10
a=NLZqzBF-AAAA:8 a=3Z19HiyUrDy1zEEjJjwA:9 a=QEXdDO2ut3YA:10
a=RchoEgWomvYJfgJ0MydD:22
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1694422642;
bh=x824+f8Id5geQvTxn14SNUezyDoYdYhoLeQ7rb+ajys=;
h=Date:From:To:In-Reply-To:References:Subject;
b=qOFwJ0nKc3PPKs9rZUr+cdcZRihIYesHA8rUeOnDsEcN5V0In/rpCKuJ65a+6PqbN
K13AtUobH75p+o+0Y//fpyGojGWPckkDzr3D6QgTtnMzKn/8N2bD0QaWeRNjMJiT8q
ybNxnWDki2RgOOW35R1dLmMbW/iM4Ds3kmBetU5ZyCo0ROPQw94KtP/qeXqieIsexW
Nf1hrV01YoRBaNmwheb+nfDxdZ5B9dO3RihbjF0i5+EZi1Q6IxjmgZNabJEN6hTTue
s1RgjxmBxNzIQ+zJn/0xpdY+dGH/LRzJKibvlenOldGFZSSfuHrLQtSp7NhS1z8GJA
qFjPrx60ybyPA==
Date: Mon, 11 Sep 2023 09:57:22 +0100 (BST)
From: Peter Stephenson
To: "Jun. T" , zsh-workers@zsh.org
Message-ID: <968697743.3642134.1694422642580@mail.virginmedia.com>
In-Reply-To: <64346084-434A-4A42-AD56-44809DA2E54C@kba.biglobe.ne.jp>
References: <20230830072753.hhveg7teosubwzq7@chazelas.org>
<88812889-04BC-412A-85BE-BDAA2326B29B@kba.biglobe.ne.jp>
<899459233.232418.1694104433053@mail.virginmedia.com>
<64346084-434A-4A42-AD56-44809DA2E54C@kba.biglobe.ne.jp>
Subject: Re: (LC_ALL=C; set -x 128 129; printf "%s\n" ${(#)@} | hexdump -C)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer
X-Originating-IP: 147.161.167.85
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfESpROcc1RNX1WM7rQmIkOlrH+9Paalc94IydNQM4KAk13q0g5xV1XCbAevYTUB/gIq7rm3feMor4remDFR60aI73NLlTIBA1ck1WVBbsz0zgWy8z26j
Ndu/cvNMfVnXQ1CtJvbxsxLMQvB7ykUIJsgVdnAYnx27knRuYq8QjZ8YUbGpRVl0P4M17EYTi5z0Ke5BWm1ofGcCOUYTCkhw4D/o708EYh1mve5YOdgk4cde
1xBTKgE05M3uXDg7rydVAi6Ws2yAldgkMLG1mYpYL8c=
X-Seq: 52128
Archived-At:
X-Loop: zsh-workers@zsh.org
Errors-To: zsh-workers-owner@zsh.org
Precedence: list
Precedence: bulk
Sender: zsh-workers-request@zsh.org
X-no-archive: yes
List-Id:
List-Help: ,
List-Subscribe: ,
List-Unsubscribe: ,
List-Post:
List-Owner:
List-Archive:
> On 08/09/2023 17:30 Jun. T wrote:
> > 2023/09/08 1:33, Peter Stephenson wrote:
> >
> > Looks like these are the only calls to substevalchar(), so perhaps
> > the changes could be made internal to that.
>
> I changed paramsubst() just because we can assume errflag=0 at the
> start of the block (and would make the things simpler.).
>
> But, anyway, my previous patch was not complete.
> Either with or without my previous patch (in any locale):
>
> % echo ${(#X):-@}
> zsh: bad math expression: illegal character: @
>
> This is OK. But:
>
> % printf "%s\n" ${(#):-@} | hexdump -C
> 00000000 22 0a 22 |"."|
> 00000003
>
> The quote removal is done in remnulargs() ( at subst.c:169).
> So it seems that if noerrs is set (without (X) flag) then we should not
> quit from prefork() at line 146. This means, I guess, substevalchar()
> should not return NULL if noerrs is set. But if we want to continue
> even if we have a bad math expression, only thing we can do is just
> to return "" instead of NULL. The patch below (hopefuly) does this.
> Any comment is welcome.
I think that's fine --- it's the sort of thing where we'll only find
out if there are issues when someone comes up with a new corner case.
Thanks.
pws