Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
setcompat.c File Reference
#include <stdlib.h>
#include "support.h"
#include "settings.h"
#include "setcompat.h"

Go to the source code of this file.

Data Structures

struct  set_name_compat
 

Functions

static const charsetcompat_name_generic (const char *old_name, struct set_name_compat *compats)
 
const charsetcompat_S3_2_name_from_S3_1 (const char *old_name)
 
const charsetcompat_S3_2_val_from_S3_1 (struct setting *pset, const char *val)
 

Variables

static struct set_name_compat set_name_compat_S3_1_to_S3_2 []
 

Function Documentation

◆ setcompat_name_generic()

static const char * setcompat_name_generic ( const char old_name,
struct set_name_compat compats 
)
static

Version agnostic helper function to find new name of a setting when updating between two versions.

Definition at line 45 of file setcompat.c.

Referenced by setcompat_S3_2_name_from_S3_1().

◆ setcompat_S3_2_name_from_S3_1()

const char * setcompat_S3_2_name_from_S3_1 ( const char old_name)

Find a 3.2 name of the setting with the given 3.1 name.

Definition at line 62 of file setcompat.c.

Referenced by compat_load_030200().

◆ setcompat_S3_2_val_from_S3_1()

const char * setcompat_S3_2_val_from_S3_1 ( struct setting pset,
const char val 
)

Find a 3.2 value of the setting with the given 3.1 value.

Definition at line 70 of file setcompat.c.

Variable Documentation

◆ set_name_compat_S3_1_to_S3_2

struct set_name_compat set_name_compat_S3_1_to_S3_2[]
static
Initial value:
=
{
{ "spaceship_travel_time", "spaceship_travel_pct" },
{ NULL, NULL }
}
char * incite_cost
Definition comments.c:76

Definition at line 34 of file setcompat.c.

Referenced by setcompat_S3_2_name_from_S3_1().