From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by sourceware.org (Postfix) with ESMTPS id 35069385803F for ; Mon, 24 Oct 2022 23:50:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 35069385803F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id mueEopBL0Sp39n7DOoUupW; Mon, 24 Oct 2022 23:50:42 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id n7DNopwJPiEh7n7DNoBAhR; Mon, 24 Oct 2022 23:50:42 +0000 X-Authority-Analysis: v=2.4 cv=O9kqATxW c=1 sm=1 tr=0 ts=635724d2 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=BHheBllqUj6MjHZugQwA:9 a=QEXdDO2ut3YA:10 Message-ID: <40664e92-d899-fc28-9321-0fb3b97931e8@SystematicSw.ab.ca> Date: Mon, 24 Oct 2022 17:50:41 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 From: Brian Inglis Subject: Re: [PATCH] strftime.c(__strftime): add %q, %v, tests; tweak %Z doc Reply-To: newlib@sourceware.org To: newlib@sourceware.org References: <20221022051352.2723-1-Brian.Inglis@SystematicSW.ab.ca> Content-Language: en-CA Cc: Brian.Inglis@SystematicSw.ab.ca Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfF/0qEw6uxtjKU4w0HAbioq1xiNCyynUVSWS+FQSOdc8TS0uKffuEoEAjl/w5dUnIPQZLPYlHr2jC9AgZqkTUm5M7OGA2NgaKGYkVDLda1a5NZKZL4Jm lg+sOsIaLVfcj9oM+7D/VGVBZjHVqU+DM4OQLDmniJ8V7xlQ8NEwJSXhLzblEbpWJJvFTPk4mb0i+OVzE0oqsoCKD0CHU/6BHeAM8lVqi0Ugoeyr1bJeEoVp AfIHT/Z4mZunD/IWtjvsfw== X-Spam-Status: No, score=-1163.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022-10-24 06:07, Corinna Vinschen wrote: > On Oct 21 23:13, Brian Inglis wrote: >> + case CQ('v'): /* BSD/OSX/Ruby extension VMS/Oracle date format >> + from Arnold Robbins strftime version 3.0 */ >> + { /* %v is equivalent to "%e-%b-%Y", flags and width can change year > ^^^^^ > pad? >> + format. Recurse to avoid need to replicate %b and %Y formation. */ > > Sorry for being a nag, but doesn't that introduce an incompatible > change? The BSDs don't handle pad and width, they just call > _fmt("%e-%b-%Y", ...). Or am I missing how the BSD function works? Yes if this function was actually BSD-like, but newlib strftime supports all the POSIX and GNU flags (including +, which was why why I couldn't add BSD %+ for default locale formatting), so I thought I should add POSIX extended year handling to support the extended year range and formats required, for compatibility with other %Y formatting in that function, and tests of that functionality. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry