From dfb576f6f64d9f77541462f6a376998214fc97c0 Mon Sep 17 00:00:00 2001 From: Eric Branlund Date: Sat, 4 Apr 2020 08:27:50 -0700 Subject: [PATCH] Updated comment for init_file_paths() to reflect PHO's patch. Most of the comment text has been copied from 2.2.1.7 (there hasn't been any change to the behavior besides PHO's patch between 1.6.2 and 2.2.1.7). --- src/init2.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/init2.c b/src/init2.c index 660a8c24f..a89343d01 100644 --- a/src/init2.c +++ b/src/init2.c @@ -47,32 +47,30 @@ /* - * Find the default paths to all of our important sub-directories. + * Set the default paths to all of our important sub-directories. * - * The purpose of each sub-directory is described in "variable.c". - * - * All of the sub-directories should, by default, be located inside - * the main "lib" directory, whose location is very system dependant. - * - * This function takes a writable buffer, initially containing the - * "path" to the "lib" directory, for example, "/pkg/lib/angband/", - * or a system dependant string, for example, ":lib:". The buffer - * must be large enough to contain at least 32 more characters. + * Parameters + * libpath パス保管先の文字列 + * varpath Is the base path for directories that have files which + * are not read-only: ANGBAND_DIR_APEX, ANGBAND_DIR_BONE, ANGBAND_DIR_DATA, + * and ANGBAND_DIR_SAVE. If the PRIVATE_USER_PATH preprocessor macro has not + * been set, it is also used as the base path for ANGBAND_DIR_USER. * - * Various command line options may allow some of the important - * directories to be changed to user-specified directories, most - * importantly, the "info" and "user" and "save" directories, - * but this is done after this function, see "main.c". - * - * In general, the initial path should end in the appropriate "PATH_SEP" - * string. All of the "sub-directory" paths (created below or supplied - * by the user) will NOT end in the "PATH_SEP" string, see the special - * "path_build()" function in "util.c" for more information. + * The purpose of each sub-directory is described in "variable.c". + * The traditional behavior was to put all of the sub-directories within + * one directory, "lib". To get that behavior, pass the same string for + * libpath and varpath. Further customization may be done later in response + * to command line options (most importantly for the "info", "user", and + * "save" directories), but that is done after this function: see + * "change_path()" in "main.c". libpath and varpath should end in the + * appropriate "PATH_SEP" string. All of the "sub-directory" paths + * (created below or supplied by the user) will NOT end in the "PATH_SEP" + * string, see the special "path_build()" function in "util.c" for more + * information. * * Mega-Hack -- support fat raw files under NEXTSTEP, using special * "suffixed" directories for the "ANGBAND_DIR_DATA" directory, but * requiring the directories to be created by hand by the user. - * * Hack -- first we free all the strings, since this is known * to succeed even if the strings have not been allocated yet, * as long as the variables start out as "NULL". This allows -- 2.11.0