mirror of
https://github.com/curl/curl.git
synced 2026-07-26 11:27:16 +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
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "urldata.h"
|
||||
#include "strdup.h"
|
||||
#include "strcase.h"
|
||||
#include "sendf.h"
|
||||
#include "headers.h"
|
||||
#include "curlx/strparse.h"
|
||||
|
|
@ -88,7 +87,7 @@ CURLHcode curl_easy_header(CURL *easy,
|
|||
/* we need a first round to count amount of this header */
|
||||
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
||||
hs = Curl_node_elem(e);
|
||||
if(strcasecompare(hs->name, name) &&
|
||||
if(curl_strequal(hs->name, name) &&
|
||||
(hs->type & type) &&
|
||||
(hs->request == request)) {
|
||||
amount++;
|
||||
|
|
@ -107,7 +106,7 @@ CURLHcode curl_easy_header(CURL *easy,
|
|||
else {
|
||||
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
||||
hs = Curl_node_elem(e);
|
||||
if(strcasecompare(hs->name, name) &&
|
||||
if(curl_strequal(hs->name, name) &&
|
||||
(hs->type & type) &&
|
||||
(hs->request == request) &&
|
||||
(match++ == nameindex)) {
|
||||
|
|
@ -173,7 +172,7 @@ struct curl_header *curl_easy_nextheader(CURL *easy,
|
|||
the index for the currently selected entry */
|
||||
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
||||
struct Curl_header_store *check = Curl_node_elem(e);
|
||||
if(strcasecompare(hs->name, check->name) &&
|
||||
if(curl_strequal(hs->name, check->name) &&
|
||||
(check->request == request) &&
|
||||
(check->type & type))
|
||||
amount++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue