Bug #498 ยป 0053-Correct-pathes-to-paths.patch
common/aicore/path_finding.h | ||
---|---|---|
} while (pf_map_iterate(_MY_pf_map_)); \
|
||
}
|
||
/* This macro iterates all possible pathes.
|
||
* NB: you need to free the pathes with pf_path_destroy(path_iter).
|
||
/* This macro iterates all possible paths.
|
||
* NB: you need to free the paths with pf_path_destroy(path_iter).
|
||
*
|
||
* ARG_pfm - A pf_map structure pointer.
|
||
* NAME_path - The name of the iterator to use (type struct pf_path *). This
|
||
* is defined inside the macro.
|
||
* NAME_path - The name of the iterator to use (type struct pf_path *).
|
||
* This is defined inside the macro.
|
||
* COND_from_start - A boolean value (or equivalent, it can be a function)
|
||
* which indicate if the start tile should be iterated or
|
||
* not. */
|
server/savegame/savegame3.c | ||
---|---|---|
if (!fc_strcasecmp("none", game.scenario.datafile)) {
|
||
game.server.luadata = NULL;
|
||
} else {
|
||
const struct strvec *pathes[] = { get_scenario_dirs(), NULL };
|
||
const struct strvec *paths[] = { get_scenario_dirs(), NULL };
|
||
const struct strvec **path;
|
||
const char *found = NULL;
|
||
char testfile[MAX_LEN_PATH];
|
||
struct section_file *secfile;
|
||
for (path = pathes; found == NULL && *path != NULL; path++) {
|
||
for (path = paths; found == NULL && *path != NULL; path++) {
|
||
fc_snprintf(testfile, sizeof(testfile), "%s.luadata", game.scenario.datafile);
|
||
found = fileinfoname(*path, testfile);
|
server/stdinhand.c | ||
---|---|---|
}
|
||
{
|
||
/* it is a normal savegame or maybe a scenario */
|
||
/* It is a normal savegame or maybe a scenario */
|
||
char testfile[MAX_LEN_PATH];
|
||
const struct strvec *pathes[] = {
|
||
const struct strvec *paths[] = {
|
||
get_save_dirs(), get_scenario_dirs(), NULL
|
||
};
|
||
const char *exts[] = {
|
||
... | ... | |
* looking any path with an extension, i.e., prefer plain name file
|
||
* in later directory over file with extension in name in earlier
|
||
* directory. */
|
||
for (path = pathes; !found && *path; path++) {
|
||
for (path = paths; !found && *path; path++) {
|
||
found = fileinfoname(*path, filename);
|
||
if (found != NULL) {
|
||
sz_strlcpy(arg, found);
|
||
... | ... | |
}
|
||
}
|
||
for (path = pathes; !found && *path; path++) {
|
||
for (path = paths; !found && *path; path++) {
|
||
for (ext = exts; !found && *ext; ext++) {
|
||
fc_snprintf(testfile, sizeof(testfile), "%s.%s", filename, *ext);
|
||
found = fileinfoname(*path, testfile);
|