diff options
author | AlexSm <alex@ydb.tech> | 2024-01-18 11:28:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 11:28:56 +0100 |
commit | 9d0a3761b3201e0d9db879a7adf91876ebdb0564 (patch) | |
tree | 541d11ac878c18efd7ebca81e35112aa0fef995b /contrib/libs/curl/src/tool_findfile.c | |
parent | 404ef8886ecc9736bc58ade6da2fbd83b486a408 (diff) | |
download | ydb-9d0a3761b3201e0d9db879a7adf91876ebdb0564.tar.gz |
Library import 8 (#1074)
* Library import 8
* Add contrib/libs/cxxsupp/libcxx/include/__verbose_abort
Diffstat (limited to 'contrib/libs/curl/src/tool_findfile.c')
-rw-r--r-- | contrib/libs/curl/src/tool_findfile.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/curl/src/tool_findfile.c b/contrib/libs/curl/src/tool_findfile.c index 51a45ff3a0..a1544a5633 100644 --- a/contrib/libs/curl/src/tool_findfile.c +++ b/contrib/libs/curl/src/tool_findfile.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,11 +49,11 @@ struct finder { /* The order of the variables below is important, as the index number is used in the findfile() function */ -static const struct finder list[] = { +static const struct finder conf_list[] = { { "CURL_HOME", NULL, FALSE }, { "XDG_CONFIG_HOME", NULL, FALSE }, /* index == 1, used in the code */ { "HOME", NULL, FALSE }, -#ifdef WIN32 +#ifdef _WIN32 { "USERPROFILE", NULL, FALSE }, { "APPDATA", NULL, FALSE }, { "USERPROFILE", "\\Application Data", FALSE}, @@ -109,8 +109,8 @@ char *findfile(const char *fname, int dotscore) if(!fname[0]) return NULL; - for(i = 0; list[i].env; i++) { - char *home = curl_getenv(list[i].env); + for(i = 0; conf_list[i].env; i++) { + char *home = curl_getenv(conf_list[i].env); if(home) { char *path; const char *filename = fname; @@ -120,14 +120,14 @@ char *findfile(const char *fname, int dotscore) curl_free(home); continue; } - if(list[i].append) { - char *c = curl_maprintf("%s%s", home, list[i].append); + if(conf_list[i].append) { + char *c = curl_maprintf("%s%s", home, conf_list[i].append); curl_free(home); if(!c) return NULL; home = c; } - if(list[i].withoutdot) { + if(conf_list[i].withoutdot) { if(!dotscore || xdg) { /* this is not looking for .curlrc, or the XDG_CONFIG_HOME was defined so we skip the extended check */ |