Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [PATCH] Formatting cleanup.
Home

[Freeciv-Dev] Re: [PATCH] Formatting cleanup.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Formatting cleanup.
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Fri, 14 Sep 2001 05:18:01 +0200

On Wed, 12 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Tue, Sep 11, 2001 at 10:07:45PM +0200, Gaute B Strokkenes wrote:
>> 
>> This patch contains the formatting bits of the patch that I posted
>> earlier containing various map coordinate related cleanups.  The
>> reason I'm posting this separately is that my changing for loops to
>> use iter macros is causing some very obscure and hard to track down
>> changes in server behaviour (as exhibited by running a long AI game
>> and comparing the save game files), so I would like to apply this
>> ASAP to avoid having to drag this stuff around forever in my local
>> tree.
>> 
>> Apart from that, there is a new function, nearest_real_pos().
> 
> IMHO you should have removed the formatting changes you
> applied. Either don't do them or go the whole path (global indent
> run).

That won't work.  There is no indent program that will correct typos
in comments, rename oddly-named variables or remove redundant
parantheses.  Good style is not something you can impose simply by
waving a magic wand, though I will admit that running Freeciv through
indent all at once would probably result in something nicer than what
we have now, even if it's not perfect.

Doing what I did to part of the source to all of the source would take
an ungodly amount of time and would be error prone because of the
repetitiveness of the task.  Bit-by-bit is the only way to fly here.

The only argument I could think of against this sort of thing is that
somebody might be touching the same code and would then be forced to
play the game of CVS conflict resolution.  Though.  In the long run,
having a consistent coding style helps keep that sort of thing at
bay.  There is also the "careful-it-might-break" argument.  Given the
extensive testing I put this patch through I am pretty sure I didn't
break anything.

> I will state my opinion more clearly the next time.

That would be helpful, yes.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
GOOD-NIGHT, everybody..  Now I have to go administer FIRST-AID
 to my pet LEISURE SUIT!!


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