From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12074 invoked by alias); 23 May 2011 16:19:10 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29357 Received: (qmail 29148 invoked from network); 23 May 2011 16:19:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.212.43 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: <110523091052.ZM10054@torch.brasslantern.com> References: <20110523161035.747f484d@pwslap01u.europe.root.pri> <20110523165614.5e638a17@pwslap01u.europe.root.pri> <110523091052.ZM10054@torch.brasslantern.com> Date: Mon, 23 May 2011 18:19:04 +0200 Message-ID: Subject: Re: Test failure with negative substring offsets From: Mikael Magnusson To: Bart Schaefer Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On 23 May 2011 18:10, Bart Schaefer 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