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:
Viktor Szakats 2025-06-28 12:17:30 +02:00
parent d553f7e9f0
commit a3787f98ac
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
54 changed files with 223 additions and 260 deletions

View file

@ -57,7 +57,6 @@
#include "system_win32.h"
#include "arpa_telnet.h"
#include "select.h"
#include "strcase.h"
#include "curlx/warnless.h"
#include "curlx/strparse.h"
@ -839,7 +838,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
switch(olen) {
case 5:
/* Terminal type */
if(strncasecompare(option, "TTYPE", 5)) {
if(curl_strnequal(option, "TTYPE", 5)) {
tn->subopt_ttype = arg;
tn->us_preferred[CURL_TELOPT_TTYPE] = CURL_YES;
break;
@ -849,7 +848,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
case 8:
/* Display variable */
if(strncasecompare(option, "XDISPLOC", 8)) {
if(curl_strnequal(option, "XDISPLOC", 8)) {
tn->subopt_xdisploc = arg;
tn->us_preferred[CURL_TELOPT_XDISPLOC] = CURL_YES;
break;
@ -859,7 +858,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
case 7:
/* Environment variable */
if(strncasecompare(option, "NEW_ENV", 7)) {
if(curl_strnequal(option, "NEW_ENV", 7)) {
beg = curl_slist_append(tn->telnet_vars, arg);
if(!beg) {
result = CURLE_OUT_OF_MEMORY;
@ -874,7 +873,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
case 2:
/* Window Size */
if(strncasecompare(option, "WS", 2)) {
if(curl_strnequal(option, "WS", 2)) {
const char *p = arg;
curl_off_t x = 0;
curl_off_t y = 0;
@ -896,7 +895,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
case 6:
/* To take care or not of the 8th bit in data exchange */
if(strncasecompare(option, "BINARY", 6)) {
if(curl_strnequal(option, "BINARY", 6)) {
int binary_option = atoi(arg);
if(binary_option != 1) {
tn->us_preferred[CURL_TELOPT_BINARY] = CURL_NO;