From: Florian Weimer <fweimer@redhat.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: Mark Naughton <mnaughto@redhat.com>,
Mark Harris <mark.hsj@gmail.com>,
linux-man@vger.kernel.org, Joseph Myers <josmyers@redhat.com>
Subject: Re: Forward Deceleration Changes
Date: Thu, 05 Jun 2025 16:53:02 +0200 [thread overview]
Message-ID: <87a56mxmsx.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <movtjbigtmqu5qwwijxng7pc62bvfxhqf5fhf36rd5wq67c4yy@wnpjvmfuti2i> (Alejandro Colomar's message of "Tue, 3 Jun 2025 21:48:58 +0200")
* Alejandro Colomar:
> Hi Mark and Mark,
>
> On Tue, Jun 03, 2025 at 03:52:59PM +0100, Mark Naughton wrote:
>> Agreed, Mark.
>>
>> Mark
>>
>> On Tue, Jun 3, 2025 at 3:48 PM Mark Harris <mark.hsj@gmail.com> wrote:
>> >
>> > > > When I open a man page I want to see "what arguments do I pass and in
>> > > > what order". With this change you have to parse the prototype for the
>> > > > semi-colon
>> > > > to see the start of the args.
>> > >
>> > > I tried to use a style that makes the ';' stand out more, by breaking
>> > > the line after it. But I agree that the first times you look at it, it
>> > > can be a bit confusing and hard to distinguish.
>> >
>> > The main issue with the forward declaration syntax is that it is easy
>> > to mistake the forward declarations for arguments, especially when
>> > just quickly checking the man page to remind yourself which argument
>> > is first. If you want to retain this syntax, what might help is to
>> > remove the bold font style from the forward declarations, or change
>> > their formatting in some other way to be different than that of the
>> > arguments.
>
> Hmmm, agreed. I had been thinking about it. Maybe using all roman for
> both the type and the variable name would be good. Thanks! I'll do it
> when I finish some other work I'm doing at the moment.
Somewhat related: This syntax is currently used for inputs that can be
either strings or arrays. Two examples:
size_t strnlen(size_t maxlen;
const char s[maxlen], size_t maxlen);
int strncmp(size_t n;
const char s1[n], const char s2[n], size_t n);
Obviously, we want
strncnmp(subject, "prefix", 6)
to be valid independently of the length of the subject string, and the
declaration with the array syntax does not seem to be compatible with
that.
Thanks,
Florian
next prev parent reply other threads:[~2025-06-05 14:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 11:04 Forward Deceleration Changes Mark Naughton
2025-06-03 11:40 ` Alejandro Colomar
2025-06-03 12:21 ` Mark Naughton
2025-06-03 13:17 ` Alejandro Colomar
2025-06-03 14:48 ` Mark Harris
2025-06-03 14:52 ` Mark Naughton
2025-06-03 19:48 ` Alejandro Colomar
2025-06-04 12:00 ` Mark Naughton
2025-06-04 12:27 ` Alejandro Colomar
2025-06-05 14:53 ` Florian Weimer [this message]
2025-06-05 15:10 ` strncmp(3) in the SYNOPSIS Alejandro Colomar
2025-06-05 15:28 ` Florian Weimer
2025-06-05 15:33 ` Alejandro Colomar
2025-11-24 17:26 ` Alejandro Colomar
2025-06-06 13:05 ` Forward Deceleration Changes Alejandro Colomar
2025-06-28 14:58 ` Alejandro Colomar
2025-06-28 23:38 ` Mark Harris
2025-06-29 0:10 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a56mxmsx.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=alx@kernel.org \
--cc=josmyers@redhat.com \
--cc=linux-man@vger.kernel.org \
--cc=mark.hsj@gmail.com \
--cc=mnaughto@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox