Freeciv-3.3
Loading...
Searching...
No Matches
modinst.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include "fc_prehdrs.h"
19
20/* utility */
21#include "fciconv.h"
22#include "fcintl.h"
23#include "log.h"
24#include "mem.h"
25#include "net_types.h"
26#include "rand.h"
27#include "registry.h"
28#include "support.h"
29
30/* common */
31#include "fc_interface.h"
32
33/* modinst */
34#include "mpdb.h"
35
36#include "modinst.h"
37
38static char main_ii_filename[500];
39static char scenario_ii_filename[500];
40
41/**********************************************************************/
78
79/**********************************************************************/
82void fcmp_init(void)
83{
85
88
90
91 /* Needed at least for Windows version of netfile_get_section_file() */
92 fc_srand(time(NULL));
93}
94
95/**********************************************************************/
98void fcmp_deinit(void)
99{
102 /* log_init() was not done by fcmp_init(); we assume the caller called
103 * fcmp_parse_cmdline() (which sets up logging) in between */
104 log_close();
106}
char * incite_cost
Definition comments.c:76
#define FCMP_CONTROLD
Definition download.h:28
void libfreeciv_init(bool check_fc_interface)
void libfreeciv_free(void)
static char void init_character_encodings(const char *my_internal_encoding, bool my_use_transliteration)
Definition fciconv.c:70
#define FC_DEFAULT_DATA_ENCODING
Definition fciconv.h:89
void log_close(void)
Definition log.c:270
void load_install_info_lists(struct fcmp_params *fcmp)
Definition modinst.c:44
static char main_ii_filename[500]
Definition modinst.c:38
void fcmp_deinit(void)
Definition modinst.c:98
void fcmp_init(void)
Definition modinst.c:82
static char scenario_ii_filename[500]
Definition modinst.c:39
struct fcmp_params fcmp
Definition mpcli.c:37
void load_install_info_list(const char *filename)
Definition mpdb.c:43
void create_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:134
void open_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:181
void fc_shutdown_network(void)
Definition netintf.c:217
void fc_init_network(void)
Definition netintf.c:198
void fc_srand(RANDOM_TYPE seed)
Definition rand.c:161
void registry_module_init(void)
Definition registry.c:31
void registry_module_close(void)
Definition registry.c:41
#define DIR_SEPARATOR
Definition shared.h:127
const char * inst_prefix
Definition modinst.h:19
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:960
int fc_stat(const char *filename, struct stat *buf)
Definition support.c:574
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47