(config_tables, custom_tables, read_config_tables, read_custom_tables)
(read_config_table_file, read_custom_table_file): Rename.
This commit is contained in:
parent
99a1450c98
commit
38fdf1ba43
9 changed files with 14 additions and 14 deletions
|
@ -67,8 +67,8 @@ EMPCFBOTH((fvname), (vname), int, NSC_INT, KM_OPTION, (descr))
|
|||
/* econfig key definitions: */
|
||||
|
||||
EMPCF_COMMENT("\n### Server configuration and information")
|
||||
EMPCFBOTH("config_tables", config_tables, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Configuration table files, separated by space")
|
||||
EMPCFBOTH("custom_tables", custom_tables, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Custom configuration table files, separated by space")
|
||||
EMPCFBOTH("data", gamedir, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Directory where this game's data is stored")
|
||||
EMPCFBOTH("info", infodir, char *, NSC_STRING, KM_INTERNAL,
|
||||
|
|
|
@ -285,7 +285,7 @@ extern int check_loan_ok(struct lonstr *);
|
|||
extern int check_trade_ok(struct trdstr *);
|
||||
/* conftab.c */
|
||||
extern int read_builtin_tables(void);
|
||||
extern int read_config_tables(void);
|
||||
extern int read_custom_tables(void);
|
||||
/* ef_verify.c */
|
||||
/* in file.h */
|
||||
/* fsize.c */
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "optlist.h"
|
||||
#include "file.h"
|
||||
|
||||
static int read_config_table_file(char *);
|
||||
static int read_custom_table_file(char *);
|
||||
|
||||
int
|
||||
read_builtin_tables(void)
|
||||
|
@ -78,14 +78,14 @@ read_builtin_tables(void)
|
|||
* Return 0 on success, -1 on failure.
|
||||
*/
|
||||
int
|
||||
read_config_tables(void)
|
||||
read_custom_tables(void)
|
||||
{
|
||||
char *tmp = strdup(config_tables);
|
||||
char *tmp = strdup(custom_tables);
|
||||
char *fname;
|
||||
int res = 0;
|
||||
|
||||
for (fname = strtok(tmp, " \t"); fname; fname = strtok(NULL, " \t")) {
|
||||
if (read_config_table_file(fname) < 0)
|
||||
if (read_custom_table_file(fname) < 0)
|
||||
res = -1;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ read_config_tables(void)
|
|||
* Return 0 on success, -1 on error.
|
||||
*/
|
||||
static int
|
||||
read_config_table_file(char *fname)
|
||||
read_custom_table_file(char *fname)
|
||||
{
|
||||
int res, n;
|
||||
FILE *fp;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
# Do not edit this file to customize a game! Create your own custom
|
||||
# configuration file(s), best next to your econfig, and name them in
|
||||
# econfig key config_tables.
|
||||
# econfig key custom_tables.
|
||||
|
||||
config land-chr
|
||||
type name l_b h_b tech cost ...
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
# Do not edit this file to customize a game! Create your own custom
|
||||
# configuration file(s), best next to your econfig, and name them in
|
||||
# econfig key config_tables.
|
||||
# econfig key custom_tables.
|
||||
|
||||
config nuke-chr
|
||||
type name l_b h_b o_b r_b bla dam cost tech wei flags
|
||||
|
|
|
@ -47,7 +47,7 @@ char dflt_econfig[] = "@econfig@";
|
|||
char *configdir;
|
||||
|
||||
/* User configuration tables to load (relative to configdir) */
|
||||
char *config_tables = "";
|
||||
char *custom_tables = "";
|
||||
|
||||
/* Where to find built-in configuration tables (relative to configdir) */
|
||||
char *builtindir = "@builtindir@";
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
# Do not edit this file to customize a game! Create your own custom
|
||||
# configuration file(s), best next to your econfig, and name them in
|
||||
# econfig key config_tables.
|
||||
# econfig key custom_tables.
|
||||
|
||||
config plane-chr
|
||||
type name l_b h_b cre tech cost ...
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
# Do not edit this file to customize a game! Create your own custom
|
||||
# configuration file(s), best next to your econfig, and name them in
|
||||
# econfig key config_tables.
|
||||
# econfig key custom_tables.
|
||||
|
||||
config ship-chr
|
||||
type name l_b h_b tech cost ...
|
||||
|
|
|
@ -217,7 +217,7 @@ main(int argc, char **argv)
|
|||
fprintf(stderr, "Can't chdir to %s (%s)\n", configdir, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (read_config_tables() < 0)
|
||||
if (read_custom_tables() < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
if (chdir(gamedir)) {
|
||||
fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue