Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: [PATCH] Customizable default ruleset
Home

[Freeciv-Dev] Re: [PATCH] Customizable default ruleset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Baumans <baumans@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Customizable default ruleset
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 4 May 2002 10:07:25 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, May 03, 2002 at 06:51:29PM -0400, Baumans wrote:
> This patch allows you to customize what your default ruleset is by adding a
> 'tileset="whatever"' to the "[client]" section of your .civclientrc .

The idea of the patch is ok. The patch itself:

> +char *d_tileset;

Does "d" for default? If so please rename it to default_tileset.

> +  d_tileset = strdup(secfile_lookup_str_default(&sf,"","%s.tileset",prefix));

Why strdup?

> +extern char *d_tileset;

This is wrong. You have to declare the variable in civclient.h

> +  if (d_tileset == NULL) {
> +   printf("d_tileset null\n");

Replace printf with freelog().

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 1 + 1 = 3, for large values of 1


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