From 39930632eff4f53d1ada4b9bf87e49738127f6f8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 21 Oct 2023 12:59:08 +0300 Subject: [PATCH 39/39] Drop support for ancient .civclientrc Client options were saved to .civclientrc in freeciv-2.1 and earlier. See osdn #48880 Signed-off-by: Marko Lindqvist --- client/options.c | 22 ++++------------------ doc/README.packaging | 3 +-- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/client/options.c b/client/options.c index 925ed361cb..210f102569 100644 --- a/client/options.c +++ b/client/options.c @@ -5511,9 +5511,7 @@ static void save_cma_presets(struct section_file *file) } } -/* Old rc file name. */ -#define OLD_OPTION_FILE_NAME ".civclientrc" -/* New rc file name. */ +/* RC file name. */ #define MID_OPTION_FILE_NAME ".freeciv-client-rc-%d.%d" #define NEW_OPTION_FILE_NAME "freeciv-client-rc-%d.%d" @@ -5634,7 +5632,7 @@ static const char *get_last_option_file_name(bool *allow_digital_boolean) return NULL; } - /* minor having max value of FIRST_MINOR_NEW_OPTION_FILE_NAME + /* Minor having max value of FIRST_MINOR_NEW_OPTION_FILE_NAME * works since MID versioning scheme was used within major version 2 * only (2.2 - 2.6) so the last minor is bigger than any earlier minor. */ for (major = FIRST_MAJOR_MID_OPTION_FILE_NAME, @@ -5656,25 +5654,13 @@ static const char *get_last_option_file_name(bool *allow_digital_boolean) } } - /* Try with the old one. */ - fc_snprintf(name_buffer, sizeof(name_buffer), - "%s" DIR_SEPARATOR OLD_OPTION_FILE_NAME, name); - if (0 == fc_stat(name_buffer, &buf)) { - log_normal(_("Didn't find '%s' option file, " - "loading from '%s' instead."), - get_current_option_file_name() + strlen(name) + 1, - OLD_OPTION_FILE_NAME); - *allow_digital_boolean = TRUE; - return name_buffer; - } else { - return NULL; - } + return NULL; #endif /* OPTION_FILE_NAME */ } log_verbose("settings file is %s", name_buffer); + return name_buffer; } -#undef OLD_OPTION_FILE_NAME #undef MID_OPTION_FILE_NAME #undef NEW_OPTION_FILE_NAME #undef FIRST_MAJOR_NEW_OPTION_FILE_NAME diff --git a/doc/README.packaging b/doc/README.packaging index 0c670da8f2..00cc3c515c 100644 --- a/doc/README.packaging +++ b/doc/README.packaging @@ -15,8 +15,7 @@ Updating from 3.2 to 3.3 ~/.freeciv/freeciv-client-rc-3.3. If that file does not exist it tries to load options from old client files generated by former version of Freeciv (e.g. ~/.freeciv/freeciv-client-rc-3.2 generated by Freeciv 3.2, - ~/.freeciv-client-rc-3.1 generated by Freeciv 3.1, - or ~/.civclientrc generated by Freeciv version <= 2.1). + ~/.freeciv-client-rc-3.1 generated by Freeciv 3.1). * Minimum version of Qt is Qt-5.15, when building in Qt5-mode * Configuring source directory is no longer allowed in autotools builds. You have to use separate build dir(s) -- 2.42.0