Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: Profiling Civserver again
Home

[Freeciv-Dev] Re: Profiling Civserver again

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Thue Janus Kristensen <thue@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 29 Jul 2001 23:03:12 +0200

On Sun, Jul 29, 2001 at 10:20:18PM +0200, Gaute B Strokkenes wrote:
> +#define adjc_dir_iterate(center_x, center_y, x_itr, y_itr, dir_itr)          
>  \
> +{                                                                            
>  \
> +  int x_itr, y_itr, dir_itr, border;                                         
>  \

You should name the internal macro variable "border" something to be sure there 
are
no name clashes. ie

{
 int border = 0;

   adjc_dir_iterate {
      if (A=B)
         border++;
   } adjc_dir_iterate_end;

 printf("%d\n", border);
}

Would give the poor user quite a headache.

I like the idea of prefixing with "_", as seen in Ross W. Wetmore's patches.

(note that you don't have to do this with the arguments.)

-Thue


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