Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Coding Style Guidelines
Home

[Freeciv-Dev] Re: Coding Style Guidelines

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Coding Style Guidelines
From: Chris Richards <chrisr@xxxxxxxxxxxxxxxx>
Date: 11 Jan 2002 21:29:17 -0600

Sub-subject: spacing and -ts0

Since some people aren't strict K&R (re: style guide discussion), is
it poo-poo'd to use spacing as follows:

if (foo) {
  need_to_call (maximize (foo));
}

Essentially I add a space before the '('.  K&R doesn't mind the space
after the 'if' but it changes it for the function calls.

Secondly, indent it goes crazy with tabs.  Personally, I think tabs
should be frowned upon.  And 'indent' does strange things with tabs.
For example, I ran some cruft through indent and this is what it
produced:

void bar()
{
SSSSif (foo) {
Tneed_to_call(maximize(foo));
SSSS}
}

Where 'S' is space and 'T' is tab because tab is 8 spaces by default.
So for every 8 spaces it indents, it adds a tab filling the remainder
with 4 spaces if necessary.

So, I think that any invocation of indent should specify -ts0.


/cjr


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