bug-indent
[Top][All Lists]
Advanced

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

[Bug-indent] A couple issues with indent...


From: Chris Kalisiak
Subject: [Bug-indent] A couple issues with indent...
Date: Mon, 08 Apr 2002 15:00:45 -0400

Hello David,

Let me start off this email by thanking you for taking on the task of maintaining indent. It looks like indent will take care of nearly all of the coding standards of the project I'm working on, and nothing else seems to come close (CodeWrite/SlickEdit/astyle/expand/etc.).

There are a couple minor issues that I wanted to bring up, and to ask if you were aware of them. Let me preface this by saying I'm using 2.2.7, because that's the most current win32 binary. If any of these issues are already addressed by 2.2.8, please let me know.

1) Array declarations with compile-time assignments don't have a mechanism for putting the brace at the beginning of the next line. For example:

static KEY_VALUE aOptions[] = {

becomes

static KEY_VALUE aOptions[] =
{

with no means of specifying otherwise. All of the other uses of "{" can be specified, like "if", "for", "switch", function declarations, etc., but not array assignments, so I'm guessing this is a simple oversight.

2) In the following code snippet:

typedef struct
{
   int             key;
   int             value;
} KEY_VALUE;

the name of the struct being declared is being moved to a new line, like so:

}
KEY_VALUE;

with no apparent way to specify otherwise. This also looks like a fairly simple oversight.

3) Lastly, in the following code snippet, with "honour_newlines" enabled:

       CliPrintf (this, "\r\n"
                  "Device Version       = %q\r\n"
                  "Device Build         = %q\r\n"
                  "Build Date           = %q %q\r\n"
                  "NVRAM Revision       = %d\r\n"
                  "CLI Revision         = %q\r\n"
                  "Firmware Revision = %d.%d.%d\r\n",
                  fbVersion,
                  fbBuildN,
                  fbDate, fbTime,
                  CURRENT_NVRAM_REV,
                  CURRENT_CLI_REV,
                  firmware_version[0],
                  firmware_version[1], firmware_version[2]);

a bit of an inconsistency is exhibited. The strings and variables are all in the correct column, except the last line of the function call is compacted to one line. I think I understand why the change occurred; compaction of the parameters occurs until the right margin is reached, and then the test of "honour_newlines" is performed. I don't know how difficult it would be to fix this problem, though...


Thanks,
Chris Kalisiak
address@hidden




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




reply via email to

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