Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 139020 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/config.h.in (-1 / +4 lines)
Lines 471-477 Link Here
471
 * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
471
 * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
472
 */
472
 */
473
#ifndef DEFAULT_PATH
473
#ifndef DEFAULT_PATH
474
# define DEFAULT_PATH "./lib/"
474
# define DEFAULT_PATH "/usr/share/games/mangband/"
475
#endif
476
#ifndef DEFAULT_PATH_W
477
# define DEFAULT_PATH_W "/var/games/mangband/"
475
#endif
478
#endif
476
479
477
480
(-)a/src/server/externs.h (-1 / +1 lines)
Lines 644-650 extern errr init_e_info_txt(FILE *fp, char *buf); Link Here
644
extern errr init_r_info_txt(FILE *fp, char *buf);
644
extern errr init_r_info_txt(FILE *fp, char *buf);
645
645
646
/* init.c */
646
/* init.c */
647
extern void init_file_paths(char *path);
647
extern void init_file_paths(char *path, char *path2);
648
extern void init_some_arrays(void);
648
extern void init_some_arrays(void);
649
extern void load_server_cfg(void);
649
extern void load_server_cfg(void);
650
650
(-)a/src/server/init2.c (-9 / +14 lines)
Lines 63-72 Link Here
63
 * to succeed even if the strings have not been allocated yet,
63
 * to succeed even if the strings have not been allocated yet,
64
 * as long as the variables start out as "NULL".
64
 * as long as the variables start out as "NULL".
65
 */
65
 */
66
void init_file_paths(char *path)
66
void init_file_paths(char *path, char *path2)
67
{
67
{
68
	char *tail;
68
	char *tail;
69
69
	char *tail2;
70
	char *tmp;
70
71
71
	/*** Free everything ***/
72
	/*** Free everything ***/
72
73
Lines 103-108 void init_file_paths(char *path) Link Here
103
	/* Prepare to append to the Base Path */
104
	/* Prepare to append to the Base Path */
104
	tail = path + strlen(path);
105
	tail = path + strlen(path);
105
106
107
	tmp = string_make(path2);
108
109
	/* Prepare to append to the Base Path */
110
	tail2 = path2 + strlen(path2);
106
111
107
#ifdef VM
112
#ifdef VM
108
113
Lines 123-130 void init_file_paths(char *path) Link Here
123
	/*** Build the sub-directory names ***/
128
	/*** Build the sub-directory names ***/
124
129
125
	/* Build a path name */
130
	/* Build a path name */
126
	strcpy(tail, "data");
131
	strcpy(tail2, "data");
127
	ANGBAND_DIR_DATA = string_make(path);
132
	ANGBAND_DIR_DATA = string_make(path2);
128
133
129
	/* Build a path name */
134
	/* Build a path name */
130
	strcpy(tail, "edit");
135
	strcpy(tail, "edit");
Lines 147-162 void init_file_paths(char *path) Link Here
147
	ANGBAND_DIR_PREF = string_make(path);
152
	ANGBAND_DIR_PREF = string_make(path);
148
#endif
153
#endif
149
	/* Build a path name */
154
	/* Build a path name */
150
	strcpy(tail, "save");
155
	strcpy(tail2, "save");
151
	ANGBAND_DIR_SAVE = string_make(path);
156
	ANGBAND_DIR_SAVE = string_make(path2);
152
	
157
	
153
	/* Build a path name */
158
	/* Build a path name */
154
	strcpy(tail, "text");
159
	strcpy(tail, "text");
155
	ANGBAND_DIR_TEXT = string_make(path);
160
	ANGBAND_DIR_TEXT = string_make(path);
156
161
157
	/* Build a path name */
162
	/* Build a path name */
158
	strcpy(tail, "user");
163
	strcpy(tail2, "user");
159
	ANGBAND_DIR_USER = string_make(path);
164
	ANGBAND_DIR_USER = string_make(path2);
160
#if 0
165
#if 0
161
	/* Build a path name */
166
	/* Build a path name */
162
	strcpy(tail, "apex");
167
	strcpy(tail, "apex");
Lines 2545-2551 void load_server_cfg_aux(FILE * cfg) Link Here
2545
cptr possible_cfg_dir[] = 
2550
cptr possible_cfg_dir[] = 
2546
{
2551
{
2547
	"mangband.cfg",
2552
	"mangband.cfg",
2548
	"/etc/mangband.cfg",
2553
	"/etc/games/mangband.cfg",
2549
	"/usr/local/etc/mangband.cfg",
2554
	"/usr/local/etc/mangband.cfg",
2550
	"/usr/etc/mangband.cfg",
2555
	"/usr/etc/mangband.cfg",
2551
	NULL
2556
	NULL
(-)a/src/server/main.c (-1 / +8 lines)
Lines 142-147 extern unsigned _ovrbuffer = 0x1500; Link Here
142
static void init_stuff(void)
142
static void init_stuff(void)
143
{
143
{
144
	char path[1024];
144
	char path[1024];
145
	char path2[1024];
145
146
146
#if defined(AMIGA) || defined(VM)
147
#if defined(AMIGA) || defined(VM)
147
148
Lines 161-170 static void init_stuff(void) Link Here
161
	/* Hack -- Add a path separator (only if needed) */
162
	/* Hack -- Add a path separator (only if needed) */
162
	if (!suffix(path, PATH_SEP)) strcat(path, PATH_SEP);
163
	if (!suffix(path, PATH_SEP)) strcat(path, PATH_SEP);
163
164
165
	/* Use the angband_path, or a default */
166
	strcpy(path2, tail ? tail : DEFAULT_PATH_W);
167
168
	/* Hack -- Add a path separator (only if needed) */
169
	if (!suffix(path2, PATH_SEP)) strcat(path2, PATH_SEP);
170
164
#endif /* AMIGA / VM */
171
#endif /* AMIGA / VM */
165
172
166
	/* Initialize */
173
	/* Initialize */
167
	init_file_paths(path);
174
	init_file_paths(path, path2);
168
}
175
}
169
176
170
/*
177
/*

Return to bug 139020