bug-indent
[Top][All Lists]
Advanced

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

[Bug-indent] line length problem


From: Stephen Anderson
Subject: [Bug-indent] line length problem
Date: Thu, 12 Jun 2003 16:43:17 -0400

Hello,
 
My company is planning to incorporate the indent tool.  We are planning on using the attached profile.  There is one problem we are having with the tool that is preventing us from adopting it.  We would like to set the end of line length to something large like 132, "-l132".  We are having a problem with newlines being deleted and lines being combined, particularly with booleans and global data initializations.  This is undesirable.  We have the "-hnl" enabled and neither "-bbo" or "-nbbo" is enabled so I would image it would leave them as they are.  While I am mentioning problems, we also have a minor problem where indent always places a space after a cast whether the "-cs" or "-ncs" is on or off.  We would like them to be left alone so we have both settings turned off but it still seems to change the code.
 
With my profile the following code:
 
int main()
{
  int var;

  if (((1 == 2) &&
       (2 == 3) &&
       (4 == 5)) ||
      ((10 == 11) ||
       ((11 == 12) && (15 ==16))))
    var = (int)1;
  else
    var = (int)2;

  return var;
}
 
is changed to:
 
int main()
{
  int var;
 
  if (((1 == 2) && (2 == 3) && (4 == 5)) || ((10 == 11) || ((11 == 12) && (15 == 16))))
    var = (int) 1;
  else
    var = (int) 2;
 
  return var;
}
We would like to have the code aligned with its corresponding parenthesis when a newline is in place and otherwise left alone.  What settings will accomplish this?
 
Thanks,
smanders

Stephen Anderson
LVL7 Systems, Inc.
Software Development Engineer
Phone: 919.865.2790
Fax:   919.865.2703
Email: address@hidden

The information contained in this e-mail is LVL7 Confidential.  Any use except that authorized by LVL7 is prohibited. If you get this in error, please notify sender and delete this e-mail.

 

Attachment: .indent.pro
Description: Binary data


reply via email to

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