Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup
Home

[Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 22:30:03 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Oct 10, 2001 at 08:33:24PM +0200, Andreas Kemnade wrote:
> Jason Dorje Short writes:
>  > Andreas Kemnade wrote:
>  > > 
>  > > Jason Dorje Short writes:
>  > >  > The function refresh_tile_mapcanvas() is absolutely identical in every
>  > >  > GUI.
>  > >  >
>  > >  > So, in the process of cleaning up the map_adjust_[xy] calls I moved it
>  > >  > into common client code.  Two problems:
>  > >  >
>  > >  > - There is no client/mapview.[ch], where it should properly go, so I 
> put
>  > >  > it into client/climisc.[ch].
>  > > You should put it into client/mapview_generic.[ch]. (Create that file).
>  > > Other stuff will appear there, too.
>  > > I have thought about cleaning up
>  > > gui-*/mapview.c, too.
>  > 
>  > Why mapview_generic.c instead of just mapview.c?  The former is more
>  > descriptive but the latter seems to be the standard.
> 
> I don't want to have the same source file name twice in one executable
> (mapview in client and in client/gui-*). What happens if you debug
> the client and have to set the path to the source using the dir
> command in gdb? Does gdb know in which file it has to look? Does gcc
> know in which case it has to include the mapview.h in client or the
> one in client/gui-*?

I agree with Andreas here. You may also choose another name like
mapview_common, mapview_util or climapview.

Such a change is really needed. The gui clients are in large parts
copy-and-modify work.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I do feel kind of sorry for Microsoft. Their attornies and marketing
  force must have tons of ulcers trying to figure out how to beat (not
  just co-exist with) a product that has no clearly defined (read
  suable) human owner, and that changes on an hourly basis like the
  sea changes the layout of the sand on a beach. Severely tough to
  fight something like that."
    -- David D.W. Downey at linux-kernel


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