… | |
… | |
135 | /* init_environ initialises values from the environmental variables. |
135 | /* init_environ initialises values from the environmental variables. |
136 | * it needs to be called very early, since command line options should |
136 | * it needs to be called very early, since command line options should |
137 | * overwrite these if specified. |
137 | * overwrite these if specified. |
138 | */ |
138 | */ |
139 | void |
139 | void |
140 | init_environ (void) |
140 | init_environ () |
141 | { |
141 | { |
142 | const char *cp; |
142 | const char *cp; |
143 | |
143 | |
144 | if (cp = getenv ("DELIANTRA_CONFDIR" )) settings.confdir = cp; |
144 | if (cp = getenv ("DELIANTRA_CONFDIR" )) settings.confdir = cp; |
145 | if (cp = getenv ("DELIANTRA_LIBDIR" )) settings.datadir = cp; |
145 | if (cp = getenv ("DELIANTRA_LIBDIR" )) settings.datadir = cp; |
… | |
… | |
158 | /* |
158 | /* |
159 | * Initialises all global variables. |
159 | * Initialises all global variables. |
160 | * Might use environment-variables as default for some of them. |
160 | * Might use environment-variables as default for some of them. |
161 | */ |
161 | */ |
162 | void |
162 | void |
163 | init_globals (void) |
163 | init_globals () |
164 | { |
164 | { |
165 | if (settings.logfilename[0] == 0) |
165 | if (settings.logfilename[0] == 0) |
166 | set_logfd (-1); |
166 | set_logfd (-1); |
167 | else |
167 | else |
168 | { |
168 | { |
… | |
… | |
177 | } |
177 | } |
178 | } |
178 | } |
179 | } |
179 | } |
180 | |
180 | |
181 | void |
181 | void |
182 | init_dynamic (void) |
182 | init_dynamic () |
183 | { |
183 | { |
184 | first_map_ext_path = "/start/HallsOfSelection"; |
184 | first_map_ext_path = "/start/HallsOfSelection"; |
185 | first_map_path = "/HallOfSelection"; |
185 | first_map_path = "/HallOfSelection"; |
186 | } |
186 | } |
187 | |
187 | |
… | |
… | |
191 | */ |
191 | */ |
192 | |
192 | |
193 | //attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
193 | //attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
194 | |
194 | |
195 | void |
195 | void |
196 | init_attackmess (void) |
196 | init_attackmess () |
197 | { |
197 | { |
198 | char buf[MAX_BUF]; |
198 | char buf[MAX_BUF]; |
199 | char filename[MAX_BUF]; |
199 | char filename[MAX_BUF]; |
200 | char *cp, *p; |
200 | char *cp, *p; |
201 | FILE *fp; |
201 | FILE *fp; |