Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test failure with negative substring offsets
- X-seq: zsh-workers 29357
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Test failure with negative substring offsets
- Date: Mon, 23 May 2011 18:19:04 +0200
- Cc: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lChQkaUkj6wNVsaVRJEt07FYelcWleCsF6loECR51mA=; b=IY9xJRwVIgvhSNGepV2Z9+9wuVPWJOS2PDPIk+Cggiquwc6XX+64oIFeS6i+XWNn3W TM6CX7CX6tAO+QpvWK25Y5XTe+15XtorrES2SJVQx9EbJjAegmT5w481uhZ3sCB4o3AH pZPRDcCPJ8hazsHa1aqwTni9kXSqWJrkObqMk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KaVR8JZKTF4BcVz/vi3urkiRaJAYSwSAn/3vCq9TEmoYsDi+eg4HAO9PVo7/3A0h1o kq3Kyf39OSTo2bQfY6uxVoAikDQN82sOOvPXRQU1W1kEVBifTyucfPOmBSgzcY2tXwTf SeIZ2Cyhbu5FH5TMqfrafzNgF5v779ka6OC3A=
- In-reply-to: <110523091052.ZM10054@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20110523161035.747f484d@pwslap01u.europe.root.pri> <BANLkTikMf5QA30RxWhL=WpMwbFznfPERsw@mail.gmail.com> <BANLkTinUaE7S0UF67empL53Vqbs=dqA1tw@mail.gmail.com> <20110523165614.5e638a17@pwslap01u.europe.root.pri> <110523091052.ZM10054@torch.brasslantern.com>
On 23 May 2011 18:10, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On May 23, 4:56pm, Peter Stephenson wrote:
> }
> } stdarg doesn't know the arguments need to be converted to integers to
> } fit the size being claimed in the printf prototype.
This is a much better conclusion than mine.
> Er, wouldn't it therefore have been better to change the prototype to
> expect a long?
It doesn't expect a long, it expects a zlong, which can be a long or a
long long.
#ifdef ZSH_64_BIT_TYPE
typedef ZSH_64_BIT_TYPE zlong;
#ifdef ZSH_64_BIT_UTYPE
typedef ZSH_64_BIT_UTYPE zulong;
#else
typedef unsigned zlong zulong;
#endif
#else
typedef long zlong;
typedef unsigned long zulong;
#endif
But why does this code use zlong at all? 2^31 characters should be
long enough for everyone. (And things will probably fall over for
other reasons before that point, no?) But maybe the autoconf macro
could define a ZSH_PRINTF_SPECIFIER to %ld or %lld depending on what
zlong is?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author