From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21231 invoked by alias); 14 Oct 2016 23:10:46 -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: 39645 Received: (qmail 21780 invoked from network); 14 Oct 2016 23:10:46 -0000 X-Qmail-Scanner-Diagnostics: from nm24-vm7.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.97.31):SA:0(0.0/5.0):. Processed in 0.503862 secs); 14 Oct 2016 23:10:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.97.31 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1476486298; bh=OXtHSeBXVgaBz3Ai2RK75mQ6Qb1VeOptgASwBE8mGtE=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=tT+fM8NAcP2yxkoi4VMLmf5yBwTNPfemSgdu+rGwHjkW7QG5s6c7zZU1Yw9e/JbnzGnvRFQIaPHPErTQIO9ClnnPxyUGzEgbSOroRHcf80ZDWBSGed3QTPoP1n/xOOGX7xDJax32x5dE7M6rKOWiGB0PQlaf9yNGIycXuuElEW1VeqF6j0C+yEwgEqMzaOSEGYiUUFuFwXd9DxoQZ+hSXB6kTYsmJp3jKvJiJ3+k9zup5GpdPqW8v/q2HF2VR3mYHc1cZ4GIb6TyFLR19qjPpFtJyNdE0deguOQbwtoLMsv29QlGtBvcCNBw1ZxhRoNVF0sdgE2SioeT6ekGt05LbA== X-Yahoo-Newman-Id: 834663.92267.bm@smtp128.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: HRTQnx8VM1lmVXk3TUn4ld1o6ufevVy7WzMXWPF298CQZx0 SNZZMWSs14CdJ4h1d1kbvO6vnnvGyxpUXNIlOdBaS3BVjIcIoRnUy3yl2t7h GqcBTqwS96OnHPvZjbyjMlQ6Ycig48RooRJ9kGj6xM1Y8XbWWLWByw7oJlUJ OgXGTWDCuOXUAQCrA_2FqkSmlCOGa0uKmqT67v.fKXHcTc8JpV9Hsa2hG3TU ItGG_Il1JXq.S6szoix5xnqSxhRZ9YbDbeXBV.XdttHmxNk7wwZd9Cl0KGe7 FC6nnQrzaWoQ8s.EdEHXD76XCZ7GDGMQz.gK37eC_Ovj0ivXufwDRubguoyv Ijw6xw4e0dZt5XqNoxtEJmW3PfpI0d1IeQUtTU37RsXb1XoEhxlSYmoQsJzA Sn0XOpdDQ3JFfu.7NjynbUZqm8J0eFAWLjJGhMOe5xudtSL79q2oThgJBgER tiKzHBPWH5IhRcGBnZJRHaiqweioVCEX46Z.YrZ9Rwb8DxYAap1S37SVACc0 besM9PnyrURvG9WZfbjdo1ZIfNu6hF4D7KwGjj2BLX10- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20161014063625.GC11115@fujitsu.shahaf.local2> From: Oliver Kiddle References: <20161011065105.GB16819@fujitsu.shahaf.local2> <20161013112251.329c0dbf@pwslap01u.europe.root.pri> <20161014063625.GC11115@fujitsu.shahaf.local2> To: Zsh hackers list Subject: Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <37946.1476486298.1@hydra.kiddle.eu> Content-Transfer-Encoding: 8bit Date: Sat, 15 Oct 2016 01:04:58 +0200 Message-ID: <37947.1476486298@hydra.kiddle.eu> Daniel Shahaf wrote: > > > This probably is a good idea, although the intermediate state where this > > > has been only partly done is likely to be a bit of a mess. Starting out with a simple typedef would at least add documentation and allow an incremental approach. Would still need to add .v everywhere en masse when going to a struct, though. I did some work on a code base that had a convention of uint8_t* for UTF-8. Seemed to work well as far as I could tell. For the history file we should perhaps consider not using locale dependent metafied strings. UTF-8 with an overlong encoding for a null perhaps? grep etc might still not like the overlong null but they should be rarer. > allocated relative to each other, e.g., if the code assumes that > «ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of Even with char**, that condition is only likely if the array was created with a literal assignment. And it is easy to test for problems by forcing the size of the struct and running the test cases. Oliver