diff options
Diffstat (limited to 'Utilities/cmcurl/lib/rawstr.c')
-rw-r--r-- | Utilities/cmcurl/lib/rawstr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/rawstr.c b/Utilities/cmcurl/lib/rawstr.c index e27dac4..5665ebd 100644 --- a/Utilities/cmcurl/lib/rawstr.c +++ b/Utilities/cmcurl/lib/rawstr.c @@ -5,11 +5,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2015, 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 - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -28,6 +28,10 @@ its behavior is altered by the current locale. */ char Curl_raw_toupper(char in) { +#if !defined(CURL_DOES_CONVERSIONS) + if(in >= 'a' && in <= 'z') + return (char)('A' + in - 'a'); +#else switch (in) { case 'a': return 'A'; @@ -82,13 +86,15 @@ char Curl_raw_toupper(char in) case 'z': return 'Z'; } +#endif + return in; } /* * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant * to be locale independent and only compare strings we know are safe for - * this. See http://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for + * this. See https://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for * some further explanation to why this function is necessary. * * The function is capable of comparing a-z case insensitively even for |