mirror of
https://github.com/curl/curl.git
synced 2026-08-26 01:03:32 +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
11
lib/telnet.c
11
lib/telnet.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue