mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:13:40 +03:00
lib: drop two interim macros in favor of native libcurl API calls
Drop `strcasecompare` and `strncasecompare` in favor of libcurl API calls `curl_strequal` and `curl_strnequal` respectively. Also drop unnecessary `strcase.h` includes. Include `curl/curl.h` instead where it wasn't included before. Closes #17772
This commit is contained in:
parent
d553f7e9f0
commit
a3787f98ac
54 changed files with 223 additions and 260 deletions
13
lib/dict.c
13
lib/dict.c
|
|
@ -60,7 +60,6 @@
|
|||
#include "progress.h"
|
||||
#include "dict.h"
|
||||
#include "curl_printf.h"
|
||||
#include "strcase.h"
|
||||
#include "curl_memory.h"
|
||||
/* The last #include file should be: */
|
||||
#include "memdebug.h"
|
||||
|
|
@ -198,9 +197,9 @@ static CURLcode dict_do(struct Curl_easy *data, bool *done)
|
|||
if(result)
|
||||
return result;
|
||||
|
||||
if(strncasecompare(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
|
||||
strncasecompare(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
|
||||
strncasecompare(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
|
||||
if(curl_strnequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
|
||||
curl_strnequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
|
||||
curl_strnequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
|
||||
|
||||
word = strchr(path, ':');
|
||||
if(word) {
|
||||
|
|
@ -245,9 +244,9 @@ static CURLcode dict_do(struct Curl_easy *data, bool *done)
|
|||
}
|
||||
Curl_xfer_setup1(data, CURL_XFER_RECV, -1, FALSE); /* no upload */
|
||||
}
|
||||
else if(strncasecompare(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
|
||||
strncasecompare(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
|
||||
strncasecompare(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
|
||||
else if(curl_strnequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
|
||||
curl_strnequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
|
||||
curl_strnequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
|
||||
|
||||
word = strchr(path, ':');
|
||||
if(word) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue