> On Sun, May 21, 2017 at 02:51:05PM +0000, Aaron Muir Hamilton wrote:
>
>Some of these misleading indentation errors also look like genuine bugs.
>Here's one gem from backends/genesys_gl847.c which turned into a
>misleading indent when I ran it through clang-format:
>
>660    while (val8 & REG41_FEBUSY);
>661      {
>662        usleep (10000);
>663        status = sanei_genesys_get_status (dev, &val8);
>664      };
>
>Pay close attention to the semicolons.

Wow!  Even my cat could have probably have caught this with his extremely short 
attention span, unless there's a mouse cursor in there.

>As an aside, this is probably why the 1TBS is superiour to GNU-style.

The only benefit I see for GNU-style is fewer text lines in a file, while 
significantly degrading 
easy readability.

Think the easiest to read (or learn by) is the C Programming BSD/Allman style, 
with K&R style closely following.

For kicks, here's my (old) augemented BSD/Allman style incantation:
alias indent="indent -bad -bap -nbbo -bl -bli0 -c33 -cbi4 -cd33 -ncdw -nce -ci4 
-cli4 -cp33 -d0 -i4 -ip4 -npcs -npsl -nsc -sob -ts4"

Attachment: signature.asc
Description: Digital signature

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-requ...@lists.alioth.debian.org

Reply via email to