Kevin J. McCarthy wrote in
 <ab-6JrABW8pGBmw7@qinghai>:
 |As I mentioned I would this weekend, I've pushed the reformatted code to 
 |a branch, kevin/clang-format, on gitlab.
 |
 |I don't expect anyone to take a look at the gigantic diff, but if you 
 |have time to browse through a few of the source code files, I'd 
 |appreciate your opinions.
 |
 |As I mentioned previously, I've turned off space-before-function.  I 
 |also made a few small tweeks to the clang-format config as I tried it 
 |out.
 |
 |The output is pretty much what I mentioned earlier.  There are some 
 |places where the formatting isn't great.  But (IMO) overall it smoothed 
 |things over for the variations in the code.  I'll let you judge though.

Off-topic since not related to the actual mutt change which i have
nothing to say for or against, as i am not developing mutt, but
simply see it as "the number 1 [terminal] MUA" in the environment
i live in (and up to it as it does so many things so much better
than the one i maintain).  I also have been a user for many years,
and like it.
So only in general, my impression.

I could not live with c-f because it looses so much semantic; eg
i took your .clang-format from that branch and adjusted it
a little bit, .. still cannot remove the space before braces, etc,
this seems totally fixed -- "even though" that is among the original
UNIX styles, for example sys/inet/tcp_device.c of V8, or yacc of
v6 (Johnson, 1975; not that i like it, rather i hate yacc, but
still), or rat[for] (Kernighan, 1975) of v6 (same, fortran)-.

It for example changes all my +1 to "+ 1", where i use this
+1 times explicitly to mean "this byte is for C-style string
terminator NUL", and likewise 'sizeof("bla") -1' to mean this
NUL is nothing i am interested in.  Now ok if i see "4 + 1 + 3 +
1 + 1" i could guess this to mean "4 +1 + 3 +1 +1" etc, and ditto
'sizeof("bla") - 1', etc etc.  Also it really messed

  -jdigup:                /* C99 */{
  -                       struct a_md_ctx *mdcp;
  +jdigup: /* C99 */ {
  +       struct a_md_ctx *mdcp;
...
  +}
                  ob = ob_base = dp;
          }

Ie it closed the C99 "scope" at offset 0, even though there is
actually an outer scope that is closed via brace two lines further
below.  And that seems really bad.  (In reality there is one
tabulator in between jdigup: and the C99 comment plus brace.  This
was my s-dkim-sign.c.)

So for me it uses soul.  (And hard to believe that will ever be
fixed.  As Alejandro said, it seems it parses into its internal
structure, and then uses rules to dump it out in its entirety.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to