Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: cityname patch
Home

[Freeciv-Dev] Re: cityname patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: cityname patch
From: Erik Sigra <sigra@xxxxxxx>
Date: Tue, 20 Feb 2001 17:36:29 +0100
Reply-to: sigra@xxxxxxx

tisdagen den 20 februari 2001 01:35 skrev Vasco Alexandre Da Silva Costa:
> Hello,
>
> I've looked at citynames-6.diff and i have a few comments to make:
>
> * the LISP parser could use more freeciv code.
>
> e.g. xmalloc() vs fc_malloc(), copy_string() vs my_strdup(),

Didn't find that. You mean mystrdup? Changed.

> #ifdef DEBUGGING when we use #ifdef DEBUG in freeciv.

Changed.

> Parts of the code use K&R instead of ANSI C!

I can't see any warnings. Maybe Freeciv doesn't use the right compile flags? 

I have made a new patch with the chages above and new (incomplete) 
functionality that was requested by some people. A nation can have several 
namers to choose from. The .ruleset files use the tabular format to store the 
names and locations of the namers. When the game starts the server sends a 
PACKET_CITY_NAMER for every namer of the player's nation. The client stores 
the incoming namers in a speclist. This is as far as I have made it. The 
client should add the incoming namers to a submenu. When the user selects an 
item in the submenu, the client should send a PACKET_CITY_NAMER to the server 
so that it can set the naming source for that player. It's almost only the 
GUI-part that is missing now. I have studied the menu example in the gtk 
tutorial today, but the multiple-gui-stuff in Freeciv makes it more 
complicated.

I did give multiple namers to some nations so that it is easy to test the 
stuff that is missing when it is added. But now every nation just uses the 
first namer in the speclist.

There should probably be a function that converts names like 
"cities_brasisia_1800_to_1900" to something like "Cities in Brasilia 1800 to 
1900" that looks better in a menu.

There are some freelog(LOG_NORMAL, ...)s which should be removed or changed 
to freelog(LOG_DEBUG, ...)s, but that is a later matter. They could still be 
useful at this stage.

The warning "log.h:69: warning: `logdebug_check' defined but not used" is not 
mine. I get it even when compiling fresh CVS.



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