Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: PATCH: AI cleanup Version 2
Home

[Freeciv-Dev] Re: PATCH: AI cleanup Version 2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Petr Baudis <pasky@xxxxxxxxxxx>, Raahul Kumar <raahul_da_man@xxxxxxxxx>, Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: PATCH: AI cleanup Version 2
From: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Mon, 26 Nov 2001 00:53:38 -0600

On Sun, Nov 25, 2001 at 08:41:56AM +0100, Raimar Falke wrote:
> Doing it at some part of the code based on your personal idea of how
> does it look nice is not ok. We all have personal idea of how does the
> code have to look but have to formalize this before we go to change
> this. I really hope we can get a discussion going which will produce
> such guidelines. Here are some questions for the start:
> 
>    * init vars
>        int foo(struct city *punit)
>        {
>          int x=punit->x;
>        } 
> or
>        int foo(struct city *punit)
>        {
>          int x;
> 
>          x=punit->x;
>        }

        Hehehe.
        Neither.

        int foo(struct city *punit)
                {
                int x = punit->x;
                }

>    * empty line after vars
>        int x;
>        x=3; 
> or
>        int x;
> 
>        x=3;

        No line.

>    * comments
>        x=3; /* assign 3 to x */ 
> or
>        /* assign 3 to x */
>        x=3;

        The second.

>    * extra {} on iterates

        No real preference.
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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