From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20693 invoked from network); 3 May 2022 17:14:44 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 May 2022 17:14:44 -0000 Received: (qmail 7771 invoked by uid 550); 3 May 2022 17:14:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7736 invoked from network); 3 May 2022 17:14:40 -0000 Date: Tue, 3 May 2022 13:14:27 -0400 From: Rich Felker To: Jeffrey Walton Cc: musl@lists.openwall.com, Jules Maselbas Message-ID: <20220503171427.GW7074@brightrain.aerifal.cx> References: <20220503155655.11222-1-jmaselbas@kalray.eu> <20220503155655.11222-2-jmaselbas@kalray.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH 2/2] Remove trailing whitespaces tree-wide On Tue, May 03, 2022 at 12:17:59PM -0400, Jeffrey Walton wrote: > One unrelated comment... The code below is not portable. There's no Code that's part of the implementation is "not portable" ... to other implementations? musl defines that the character encoding is UTF-8. Aside from that, that the character encoding is UTF-8 should not even be a question in 2022. > guarantee the fifth bit is set to differentiate between upper and > lower alphabetic characters. > > > if ((t|32)=='g') { > > if (!p) p++; > > if (p>e && e>=-4) { > > Musl should probably use tolower instead. If you're allowing for arbitrary changes to the character encoding and properties, then tolower is even worse. A locale could define tolower to whatever it wants and then printf would have nonconforming behavior. The only "more portable" choice is t=='g' || t=='G'. Rich