bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

binary constant problem


From: Frédéric Lamorce
Subject: binary constant problem
Date: Mon, 7 Mar 2016 08:50:54 -0500

Hi,

I am using GNU indent 2.2.11, in my code I have operation using binary
constants like:

  lcd_commandWrite(0b00101000);        // 4-bit interface, 2 display lines,
5x8 font
  lcd_commandWrite(0b00001100);        // display control on, no cursor, no
blink
  lcd_cls();
  lcd_commandWrite(0b00000110);        // entry mode set: increment
automatically, no display shift

When I use indent to reformat the code, it results in:

  lcd_commandWrite(0 b00101000);        // 4-bit interface, 2 display
lines, 5x8 font
  lcd_commandWrite(0 b00001100);        // display control on, no cursor,
no blink
  lcd_cls();
  lcd_commandWrite(0 b00000110);        // entry mode set: increment
automatically, no display shift

I see there was a patch years ago that should have fixed it, obviously
something went wrong.

Here is the command line I use:

indent -bli 0 -npsl -npcs -ncs -nbs -nsaf -nsai -nsaw -pmt -nut

I am in Mint 17.2 32bits, I installed indent with "apt-get intall indent"

Frédéric.



-- 
Don't fly in anything with a Capissen 38 engine, they fall right out of the
sky...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]