From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20042 invoked by alias); 18 Aug 2015 15:18:13 -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: 36229 Received: (qmail 7205 invoked from network); 18 Aug 2015 15:18:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-4e-55d34cb1da97 Date: Tue, 18 Aug 2015 16:18:00 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: mkdir builtin and $'\0' Message-id: <20150818161800.5d68b498@pwslap01u.europe.root.pri> In-reply-to: <20150818160733.72a1951a@pwslap01u.europe.root.pri> References: <20150818091904.GA5389@chaz.gmail.com> <20150818104911.034b6705@pwslap01u.europe.root.pri> <20150818111134.GA5629@chaz.gmail.com> <20150818122755.39fe78c8@pwslap01u.europe.root.pri> <20150818125519.GB5629@chaz.gmail.com> <20150818142458.3252389e@pwslap01u.europe.root.pri> <20150818152145.6ae8dc32@pwslap01u.europe.root.pri> <20150818160733.72a1951a@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xa7obfS6HGrydoWZxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Miadm8dWsJ+9YuK0uAbGJrYuRk4OCQETie2XD0PZYhIX7q0H srk4hASWMkrMu7ubEcKZwSTRNLWTCcLZxijxuOM9excjBweLgKrE7beKIN1sAoYSUzfNZgSx RQS0JHacPMkEYgsLqEi8bOwA28ArYC/R9HQrWJxTwEFi64blUNsmMUuc6d7PDpLgF9CXuPr3 ExPESfYSM6+cYYRoFpT4MfkeC4jNDLRg87YmVghbXmLzmrfMILaQgLrEjbu72ScwCs1C0jIL ScssJC0LGJlXMYqmliYXFCel5xrqFSfmFpfmpesl5+duYoQE7ZcdjIuPWR1iFOBgVOLhrci7 FCrEmlhWXJl7iFGCg1lJhFeS93KoEG9KYmVValF+fFFpTmrxIUZpDhYlcd65u96HCAmkJ5ak ZqemFqQWwWSZODilGhiL0w957Cn7o/PT8Z2Gqn7wpNudH8WMmkSWWubtmi4c5r6i1eDxLAEp h9BPj/cY/llmtOfyKXtV/Qc/uj2mVn5mPvLd0q6xTD9R+mNW3OYE09Ywj6zpS1n+bSg+5MPx 9fEMbr7Pf43YD0Zxz781Z9aJ+BX3Fu77dejtVf2HbH9Uly1skfd7/PidEktxRqKhFnNRcSIA 3PJBpVYCAAA= On Tue, 18 Aug 2015 16:07:33 +0100 Peter Stephenson wrote: > On Tue, 18 Aug 2015 15:21:45 +0100 > Peter Stephenson wrote: > > This seems to work for strftime and primt -P %D and the tests pass. > > I think there's a pre-existing confusion here, which is that we should > really treat ztrftime return value of both 0 and -1 as failure. The 0 > comes from strftime(), which returns the number of characters it's > succesfully converted (the manual helpfully says 0 "doesn't necessarily > indicate an error", just that it coverted nothing); the -1 was a local > enhancement. Sigh. No, I've got it now. I think. The -1 was supposed to be an enhancement so we really *can* detect whether strftime() failed or not, by detecting whether strftime() output something and then later gave up, or actually didn't output anything. Dunno how robust it is, but I'll keep to it after all. pws