From: Alejandro Colomar <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH 2/5] tm.3type: align ranges
Date: Tue, 19 Jul 2022 16:25:34 +0200 [thread overview]
Message-ID: <9ee774f6-7658-693d-7526-bfe49a3e3c6a@gmail.com> (raw)
In-Reply-To: <20220719141420.5bhgjbqxtev4kx2d@tarta.nabijaczleweli.xyz>
[-- Attachment #1.1: Type: text/plain, Size: 2916 bytes --]
On 7/19/22 16:14, наб wrote:
> On Tue, Jul 19, 2022 at 01:44:22PM +0200, Alejandro Colomar wrote:
>> Hi наб,
>>
>> On 7/19/22 03:56, наб wrote:
>>> This, to me, makes these much more readable
>>>
>>> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
>>
>> I like the concept of the commit, but I wonder if we can do it in a better
>> way. I was wondering specifically about moving the ranges to before the
>> short description, so that they would be aligned naturally, without needing
>> so much whitespace.
>>
>> What would you prefer?
>
> I think that either of
> int tm_sec; /* Seconds [0, 60] */
> int tm_min; /* Minutes [0, 59] */
> int tm_hour; /* Hour [0, 23] */
> int tm_mday; /* Day of the month [1, 31] */
> int tm_mon; /* Month [0, 11] (January = 0) */
> int tm_year; /* Year minus 1900 */
> int tm_wday; /* Day of the week [0, 6] (Sunday = 0) */
> int tm_yday; /* Day of the year [0, 365] (Jan/01 = 0) */
> int tm_isdst; /* Daylight savings flag */
> or
> int tm_sec; /* [0, 60] Seconds */
> int tm_min; /* [0, 59] Minutes */
> int tm_hour; /* [0, 23] Hour */
> int tm_mday; /* [1, 31] Day of the month */
> int tm_mon; /* [0, 11] Month (January = 0) */
> int tm_year; /* Year minus 1900 */
> int tm_wday; /* [0, 6] Day of the week (Sunday = 0) */
> int tm_yday; /* [0, 365] Day of the year (Jan/01 = 0) */
> int tm_isdst; /* Daylight savings flag */
> is fine, and other options are strictly worse, but went with the former
> because (a) the ranges also align the comment trailers so it's easier to
> read and (b) it makes more sense to have "description [domain] [bound]"
> than "[domain] description [bound]".
>
> I personally prefer the former but the latter would also be fine.
Okay, both look good to me, so I'll leave it up to you ;)
>
>> int tm_sec; /* [0, 60] Seconds */
>> int tm_min; /* [0, 59] Minutes */
>> int tm_hour; /* [0, 23] Hour */
>> int tm_mday; /* [1, 31] Day of the month */
>> int tm_mon; /* [0, 11] Month (January = 0) */
>> int tm_year; /* Years since 1900 */
>> int tm_wday; /* [0, 6] Day of the week (Sunday = 0) */
>> int tm_yday; /* [0, 365] Day of the year (Jan/01 = 0) */
>> int tm_isdst; /* Daylight savings flag */
> Not columnating at least the domain and description is, to me,
> a no-go from a readability stand-point.
Agreed.
Cheers,
Alex
--
Alejandro Colomar
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-07-19 14:34 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 1:56 [PATCH 1/5] tm.3type: tfix наб
2022-07-19 1:56 ` [PATCH 2/5] tm.3type: align ranges наб
2022-07-19 11:44 ` Alejandro Colomar
2022-07-19 14:14 ` наб
2022-07-19 14:25 ` Alejandro Colomar [this message]
2022-07-19 1:56 ` [PATCH 3/5] tm.3type: tm_year is year minus 1900, not since наб
2022-07-19 11:47 ` Alejandro Colomar
2022-07-19 11:50 ` Alejandro Colomar
2022-07-19 1:56 ` [PATCH 4/5] tm.3type: describe tm_zone, tm_gmtoff наб
2022-07-19 12:17 ` Alejandro Colomar
2022-07-19 12:19 ` Alejandro Colomar
2022-07-19 15:28 ` наб
2022-07-22 3:33 ` G. Branden Robinson
2022-07-22 10:57 ` Alejandro Colomar (man-pages)
2022-07-22 22:20 ` man(7) DS and DE macros (was: [PATCH 4/5] tm.3type: describe tm_zone, tm_gmtoff) G. Branden Robinson
2022-07-22 23:47 ` Alejandro Colomar
2025-10-29 9:07 ` [PATCH 4/5] tm.3type: describe tm_zone, tm_gmtoff G. Branden Robinson
2025-10-29 10:21 ` Alejandro Colomar
2025-10-29 22:30 ` G. Branden Robinson
2025-10-29 22:53 ` Alejandro Colomar
2022-07-19 1:58 ` [PATCH 5/5] ctime.3: remove struct tm vestigia наб
2022-07-19 12:18 ` Alejandro Colomar
2022-07-19 11:38 ` [PATCH 1/5] tm.3type: tfix Alejandro Colomar
2022-07-19 15:35 ` [PATCH v2 1/4] tm.3type: align ranges наб
2022-07-19 18:38 ` [PATCH v3 1/2] tm.3type: describe tm_zone, tm_gmtoff наб
2022-07-19 20:33 ` Alejandro Colomar
2022-07-19 21:36 ` наб
2022-07-19 22:09 ` Alejandro Colomar
2022-07-19 22:35 ` [PATCH v4 " наб
2022-07-19 22:36 ` [PATCH v4 2/2] ctime.3: remove struct tm vestigia наб
2022-07-20 8:30 ` Alejandro Colomar
2022-07-19 18:39 ` [PATCH v3 " наб
2022-07-19 15:35 ` [PATCH v2 2/4] tm.3type: widen member alignment to take up to const char * наб
2022-07-19 15:59 ` Alejandro Colomar
2022-07-19 15:35 ` [PATCH v2 3/4] tm.3type: describe tm_zone, tm_gmtoff наб
2022-07-19 17:11 ` Alejandro Colomar
2022-07-19 15:35 ` [PATCH v2 4/4] ctime.3: remove struct tm vestigia наб
2022-07-19 17:12 ` 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=9ee774f6-7658-693d-7526-bfe49a3e3c6a@gmail.com \
--to=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=nabijaczleweli@nabijaczleweli.xyz \
/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