On 7/13/26 01:00, James Youngman wrote:
On Sun, Jul 12, 2026 at 8:06 PM Collin Funk <[email protected]> wrote:
[before indent]
struct timespec ts = { .tm_sec = 0, .tm_nsec = 0 };
[after indent]
struct timespec ts = {.tm_sec = 0,.tm_nsec = 0 };
Actually I have no particular beliefs on this. But I don't think
this is configurable in GNU indent (unless -sar does what you want).
GNU indent what we get in gnulib's maint.mk by default. But if GNU
indent allowed this to be configurable, I would not object to a
change. Bernhard, do you have a preference?
The above looks indeed odd, and I'd personally prefer the "before" style.
And no, although the description of -sar would sound like it ...
-sar, --spaces-around-initializers
Put a space after the `{' and before the `}' in initializers.
..., that option does not work for named initializers.
I assume this is a small bug in indent.
Eventually, there should be an indent hint syntax that the tool doesn't
touch the code until the next empty line? Like the hints for tranlators,
for the pre-processor, etc. Just an idea...
Well, what does this mean for findutils?
Nothing, because it seems the named initializers are too new
and we don't have any of them in our code so far:
$ GIT_PAGER= git grep '{\w*\.' -- '*.c'
lib/regexprops.c: content ("The character @samp{.} matches any single
character");
Therefore, I'm fully okay with the current (=new) indentation.
Thanks & have a nice day,
Berny