Re: [Freeciv-Dev] [patch] kludge cleanup
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 30 Jan 1999, David Pfitzner wrote:
> Comments:
>
> > Index: client/xmain.c
>
> > + if ((d = XOpenDisplay(getenv("DISPLAY"))) == NULL) {
> > + fprintf(stderr, "Can't open X-Windows display.\n");
> > + exit(1);
> > + } else toplevel = XtVaAppInitialize(
>
> Hmm, sneaking in other fixes? :-)
What is this supposed to fix anyway? It will make it so the -display option
doesn't work anymore. Since XtVaAppInitialize also calls XOpenDisplay, I
would suspect this will also cause resource leakage and/or multiple
connections to the X server.
> Solution?
> Perhaps put a definition for find_city_by_id() in city.c,
> as a simple wrapper to game_find_city_by_id(), but with
> the definition controlled by a #define which is off in
> freeciv but can be turned on to be able to compile civworld?
I think when the fast find_city_by_id() was first written, I had it setup
so it would detect if it was being run in the server or not, and use the
appropriate code. I don't remember exactly how this all works and I'm
away from my source. I wonder, is there anyreason not to have the client
use the lookup table like the server does?
|
|