From 277e6c71269a45638db9cf6aecb46d35c3d89826 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 09:33:06 -0500 Subject: [PATCH] more 3.6 to 3.7 merge fix 3.7 adds const const char *fqn_prefix_names[PREFIX_COUNT]; --- src/files.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/files.c b/src/files.c index 94b410072..a9566c687 100644 --- a/src/files.c +++ b/src/files.c @@ -4244,8 +4244,11 @@ reveal_paths(VOID_ARGS) { const char *fqn, *filep; char buf[BUFSZ]; -#if defined(UNIX) || defined(PREFIXES_IN_USE) - const char *strp; +#if defined(UNIX) + char *strp; +#endif +#if defined(PREFIXES_IN_USE) + const char *cstrp; #endif #ifdef UNIX char *envp, cwdbuf[PATH_MAX]; @@ -4263,10 +4266,10 @@ reveal_paths(VOID_ARGS) #ifdef SYSCF #ifdef PREFIXES_IN_USE - strp = fqn_prefix_names[SYSCONFPREFIX]; + cstrp = fqn_prefix_names[SYSCONFPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #else buf[0] = '\0'; #endif @@ -4292,13 +4295,13 @@ reveal_paths(VOID_ARGS) #ifndef UNIX #ifdef PREFIXES_IN_USE #ifdef WIN32 - strp = fqn_prefix_names[SYSCONFPREFIX]; + cstrp = fqn_prefix_names[SYSCONFPREFIX]; #else - strp = fqn_prefix_names[HACKPREFIX]; + cstrp = fqn_prefix_names[HACKPREFIX]; #endif /* WIN32 */ maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #endif /* PREFIXES_IN_USE */ raw_printf("Your game's loadable symbols file%s:", buf); #endif /* UNIX */ @@ -4327,10 +4330,10 @@ reveal_paths(VOID_ARGS) buf[0] = '\0'; #ifdef PREFIXES_IN_USE - strp = fqn_prefix_names[CONFIGPREFIX]; + cstrp = fqn_prefix_names[CONFIGPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #endif /* PREFIXES_IN_USE */ raw_printf("Your personal configuration file%s:", buf);