[Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Feb 12, 2002 at 02:03:40PM +0100, Raimar Falke wrote:
> On Tue, Feb 12, 2002 at 12:34:38PM +0000, Gregory Berkolaiko wrote:
> > --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > The attached patch adds BOOL_VAL() around expressions of the form "x &
> > > S_*". This is required since the result is used as a boolean but isn't
> > > one.
> >
> > I am confused about use of special field in tile.
> > It is declared as enum tile_special_type, but used as an int:
> > =========================
> > 1207 void map_set_special(int x, int y, enum tile_special_type spe)
> > 1208 {
> > 1209 MAP_TILE(x, y)->special |= spe;
> > 1210
> > 1211 if (spe & (S_ROAD | S_RAILROAD))
> > 1212 reset_move_costs(x, y);
> > 1213 }
> > =========================
>
> > Doesn't your Spliff complain about it?
>
> It is called splint. It has a lot of different options you can
> enable. If you enable all you get tons of errors. Some have been fixed
> (sync parameter names,...) and a lot have to be fixed (or dismissed by
> freeciv-dev like the == NULL change). I'm currently at the booleans.
Attached is the output of splint where enum aren't ints. This is just
from common/*.c. And yes this shows that a seperate function for the
specials is necessary.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Using only the operating-system that came with your computer is just
like only playing the demo-disc that came with your CD-player."
out.gz
Description: GNU Zip compressed data
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, (continued)
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Gregory Berkolaiko, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Gregory Berkolaiko, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Ross W. Wetmore, 2002/02/16
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/17
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Gregory Berkolaiko, 2002/02/17
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Vasco Alexandre Da Silva Costa, 2002/02/12
[Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs,
Raimar Falke <=
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Jason Short, 2002/02/12
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/13
- [Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/13
[Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Vasco Alexandre Da Silva Costa, 2002/02/12
[Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Petr Baudis, 2002/02/13
[Freeciv-Dev] Re: [Patch] Add BOOL_VAL around ANDs, Raimar Falke, 2002/02/13
|
|