From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 493 invoked from network); 23 Sep 1999 09:13:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Sep 1999 09:13:36 -0000 Received: (qmail 10320 invoked by alias); 23 Sep 1999 09:13:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8019 Received: (qmail 10312 invoked from network); 23 Sep 1999 09:13:26 -0000 Date: Thu, 23 Sep 1999 11:13:26 +0200 (MET DST) Message-Id: <199909230913.LAA23608@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 23 Sep 1999 10:39:25 +0900 Subject: Re: Chatty little precompiler for _arguments Tanaka Akira wrote: > In article <199909200843.KAA06289@beta.informatik.hu-berlin.de>, > Sven Wischnowsky writes: > > > I would be against this because its much less useful in cases where > > you stuff together string from multiple parameters. However, in its > > first life `:q' did that and we could use the doubled-flag convention > > so that `${(qq)foo}' would emit stuff in single quotes. (Tripled for > > double quotes?) > > I found a problem about quoting. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% a=$'\n\n\n\n\n\n' > is27e1u11% print -lr - ${(q)a} > zsh: segmentation fault (core dumped) Src/zsh -f > > Also I suppose that `${(qqqq)foo}' should quote foo in $'...' style. > # I really want this because I frequently use dangeraous characters > # such as NUL. The longest string a character can be quoted to is three characters... Bye Sven --- os/utils.c Thu Sep 23 10:18:58 1999 +++ Src/utils.c Thu Sep 23 11:04:51 1999 @@ -2964,7 +2964,7 @@ { const char *u, *tt; char *v; - char *buf = ncalloc(2 * strlen(s) + 1); + char *buf = ncalloc(3 * strlen(s) + 1); int sf = 0; tt = v = buf; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de