From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1C6FC433FE for ; Fri, 20 May 2022 16:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233517AbiETQLc (ORCPT ); Fri, 20 May 2022 12:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351584AbiETQL1 (ORCPT ); Fri, 20 May 2022 12:11:27 -0400 X-Greylist: delayed 6994 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 20 May 2022 09:11:25 PDT Received: from joooj.vinc17.net (joooj.vinc17.net [IPv6:2001:4b99:1:3:216:3eff:fe20:ac98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E0231D0FD for ; Fri, 20 May 2022 09:11:24 -0700 (PDT) Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id 065E3274; Fri, 20 May 2022 18:11:22 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id CB61D2800218; Fri, 20 May 2022 18:11:21 +0200 (CEST) Date: Fri, 20 May 2022 18:11:21 +0200 From: Vincent Lefevre To: Alejandro Colomar Cc: linux-man@vger.kernel.org Subject: Re: [PATCH] printf.3: Document 'l' length modifier for a, A, e, E, f, F, g, and G Message-ID: <20220520161121.GA1112518@zira.vinc17.org> References: <20220520141040.1136383-1-vincent@vinc17.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.5+17 (caf1d53e) vl-138565 (2022-05-19) Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On 2022-05-20 16:44:42 +0200, Alejandro Colomar wrote: > Hi Vincent, > > On 5/20/22 16:10, Vincent Lefevre wrote: > > Signed-off-by: Vincent Lefevre > > --- > > man3/printf.3 | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/man3/printf.3 b/man3/printf.3 > > index 4fa1f11f3..63ea3092f 100644 > > --- a/man3/printf.3 > > +++ b/man3/printf.3 > > @@ -502,7 +502,17 @@ argument, or a following > > .B s > > conversion corresponds to a pointer to > > .I wchar_t > > -argument. > > +argument. In C99, on a following > > Why "in C99"? According to GCC with "-Wformat -pedantic", this is new in C99: warning: ISO C90 does not support the ‘%le’ gnu_printf format The printf(3) man page already mentions features that appeared in C99. For instance: "a, A (C99; not in SUSv2, but added in SUSv3)" That's why I mentioned that for consistency. I could also check that this is not in SUSv2: https://pubs.opengroup.org/onlinepubs/7990989775/xsh/fprintf.html Perhaps this should be rephrased. Something like: On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2). What do you think? I don't know about SUSv3 (I could just see that this feature was also supported in POSIX:2004). > Also, see man-pages(7): > > Use semantic newlines > In the source of a manual page, new sentences should be > started on new lines, long sentences should be split into > lines at clause breaks (commas, semicolons, colons, and > so on), and long clauses should be split at phrase bound‐ > aries. This convention, sometimes known as "semantic > newlines", makes it easier to see the effect of patches, > which often operate at the level of individual sentences, > clauses, or phrases. Thanks for the information. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)