tidy-up: miscellaneous
No binary (build failed)
—
(log yok)
| @@ -36,13 +36,13 @@ CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf, si | |
| The `type` argument specifies what the bytes in `buf` actually are. | |
| The following bits are defined: | |
| ``` | |
| - | #define CLIENTWRITE_BODY (1<<0) /* non-meta information, BODY */ |
| - | #define CLIENTWRITE_INFO (1<<1) /* meta information, not a HEADER */ |
| - | #define CLIENTWRITE_HEADER (1<<2) /* meta information, HEADER */ |
| - | #define CLIENTWRITE_STATUS (1<<3) /* a special status HEADER */ |
| - | #define CLIENTWRITE_CONNECT (1<<4) /* a CONNECT related HEADER */ |
| - | #define CLIENTWRITE_1XX (1<<5) /* a 1xx response related HEADER */ |
| - | #define CLIENTWRITE_TRAILER (1<<6) /* a trailer HEADER */ |
| + | #define CLIENTWRITE_BODY (1 << 0) /* non-meta information, BODY */ |
| + | #define CLIENTWRITE_INFO (1 << 1) /* meta information, not a HEADER */ |
| + | #define CLIENTWRITE_HEADER (1 << 2) /* meta information, HEADER */ |
| + | #define CLIENTWRITE_STATUS (1 << 3) /* a special status HEADER */ |
| + | #define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */ |
| + | #define CLIENTWRITE_1XX (1 << 5) /* a 1xx response related HEADER */ |
| + | #define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */ |
| ``` | |
| The main types here are `CLIENTWRITE_BODY` and `CLIENTWRITE_HEADER`. They are | |
| @@ -393,6 +393,7 @@ This is the full list of functions generally banned. | |
| sscanf | |
| stat | |
| strcat | |
| + | strcpy |
| strdup | |
| strerror | |
| strncat | |
| @@ -54,7 +54,7 @@ This, because first then does libcurl known which actual read callback to use. | |
| size_t print_httppost_callback(void *arg, const char *buf, size_t len) | |
| { | |
| fwrite(buf, len, 1, stdout); | |
| - | (*(size_t *)arg) += len; |
| + | *((size_t *)arg) += len; |
| return len; | |
| } | |
| @@ -22,10 +22,10 @@ CURLOPT_ALTSVC_CTRL - control alt-svc behavior | |
| ~~~c | |
| #include <curl/curl.h> | |
| - | #define CURLALTSVC_READONLYFILE (1L<<2) |
| - | #define CURLALTSVC_H1 (1L<<3) |
| - | #define CURLALTSVC_H2 (1L<<4) |
| - | #define CURLALTSVC_H3 (1L<<5) |
| + | #define CURLALTSVC_READONLYFILE (1L << 2) |
| + | #define CURLALTSVC_H1 (1L << 3) |
| + | #define CURLALTSVC_H2 (1L << 4) |
| + | #define CURLALTSVC_H3 (1L << 5) |
| CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask); | |
| ~~~ | |
| @@ -23,8 +23,8 @@ CURLOPT_HSTS_CTRL - control HSTS behavior | |
| ~~~c | |
| #include <curl/curl.h> | |
| - | #define CURLHSTS_ENABLE (1L<<0) |
| - | #define CURLHSTS_READONLYFILE (1L<<1) |
| + | #define CURLHSTS_ENABLE (1L << 0) |
| + | #define CURLHSTS_READONLYFILE (1L << 1) |
| CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS_CTRL, long bitmask); | |
| ~~~ | |
| @@ -52,7 +52,7 @@ open F, "<symbols-in-versions"; | |
| sub str2num { | |
| my ($str)=@_; | |
| if($str && $str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) { | |
| - | return sprintf("0x%06x", $1 <<16 | $2 << 8 | ($3 || '0')); |
| + | return sprintf("0x%06x", $1 << 16 | $2 << 8 | ($3 || '0')); |
| } | |
| } | |
| @@ -202,22 +202,22 @@ struct curl_httppost { | |
| long flags; /* as defined below */ | |
| /* specified content is a filename */ | |
| - | #define CURL_HTTPPOST_FILENAME (1<<0) |
| + | #define CURL_HTTPPOST_FILENAME (1 << 0) |
| /* specified content is a filename */ | |
| - | #define CURL_HTTPPOST_READFILE (1<<1) |
| + | #define CURL_HTTPPOST_READFILE (1 << 1) |
| /* name is only stored pointer do not free in formfree */ | |
| - | #define CURL_HTTPPOST_PTRNAME (1<<2) |
| + | #define CURL_HTTPPOST_PTRNAME (1 << 2) |
| /* contents is only stored pointer do not free in formfree */ | |
| - | #define CURL_HTTPPOST_PTRCONTENTS (1<<3) |
| + | #define CURL_HTTPPOST_PTRCONTENTS (1 << 3) |
| /* upload file from buffer */ | |
| - | #define CURL_HTTPPOST_BUFFER (1<<4) |
| + | #define CURL_HTTPPOST_BUFFER (1 << 4) |
| /* upload file from pointer contents */ | |
| - | #define CURL_HTTPPOST_PTRBUFFER (1<<5) |
| + | #define CURL_HTTPPOST_PTRBUFFER (1 << 5) |
| /* upload file contents by using the regular read callback to get the data and | |
| pass the given pointer as custom pointer */ | |
| - | #define CURL_HTTPPOST_CALLBACK (1<<6) |
| + | #define CURL_HTTPPOST_CALLBACK (1 << 6) |
| /* use size in 'contentlen', added in 7.46.0 */ | |
| - | #define CURL_HTTPPOST_LARGE (1<<7) |
| + | #define CURL_HTTPPOST_LARGE (1 << 7) |
| char *showfilename; /* The filename to show. If not set, the | |
| actual filename will be used (if this | |
| @@ -303,14 +303,14 @@ typedef enum { | |
| CURLFILETYPE_UNKNOWN /* should never occur */ | |
| } curlfiletype; | |
| - | #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) |
| - | #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) |
| - | #define CURLFINFOFLAG_KNOWN_TIME (1<<2) |
| - | #define CURLFINFOFLAG_KNOWN_PERM (1<<3) |
| - | #define CURLFINFOFLAG_KNOWN_UID (1<<4) |
| - | #define CURLFINFOFLAG_KNOWN_GID (1<<5) |
| - | #define CURLFINFOFLAG_KNOWN_SIZE (1<<6) |
| - | #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) |
| + | #define CURLFINFOFLAG_KNOWN_FILENAME (1 << 0) |
| + | #define CURLFINFOFLAG_KNOWN_FILETYPE (1 << 1) |
| + | #define CURLFINFOFLAG_KNOWN_TIME (1 << 2) |
| + | #define CURLFINFOFLAG_KNOWN_PERM (1 << 3) |
| + | #define CURLFINFOFLAG_KNOWN_UID (1 << 4) |
| + | #define CURLFINFOFLAG_KNOWN_GID (1 << 5) |
| + | #define CURLFINFOFLAG_KNOWN_SIZE (1 << 6) |
| + | #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1 << 7) |
| /* Information about a single file, used when doing FTP wildcard matching */ | |
| struct curl_fileinfo { | |
| @@ -826,34 +826,34 @@ typedef enum { | |
| */ | |
| #define CURLAUTH_NONE ((unsigned long)0) | |
| - | #define CURLAUTH_BASIC (((unsigned long)1)<<0) |
| - | #define CURLAUTH_DIGEST (((unsigned long)1)<<1) |
| - | #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) |
| + | #define CURLAUTH_BASIC (((unsigned long)1) << 0) |
| + | #define CURLAUTH_DIGEST (((unsigned long)1) << 1) |
| + | #define CURLAUTH_NEGOTIATE (((unsigned long)1) << 2) |
| /* Deprecated since the advent of CURLAUTH_NEGOTIATE */ | |
| #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE | |
| /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */ | |
| #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE | |
| - | #define CURLAUTH_NTLM (((unsigned long)1)<<3) |
| - | #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) |
| + | #define CURLAUTH_NTLM (((unsigned long)1) << 3) |
| + | #define CURLAUTH_DIGEST_IE (((unsigned long)1) << 4) |
| #ifndef CURL_NO_OLDIES | |
| /* functionality removed since 8.8.0 */ | |
| - | #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) |
| + | #define CURLAUTH_NTLM_WB (((unsigned long)1) << 5) |
| #endif | |
| - | #define CURLAUTH_BEARER (((unsigned long)1)<<6) |
| - | #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7) |
| - | #define CURLAUTH_ONLY (((unsigned long)1)<<31) |
| + | #define CURLAUTH_BEARER (((unsigned long)1) << 6) |
| + | #define CURLAUTH_AWS_SIGV4 (((unsigned long)1) << 7) |
| + | #define CURLAUTH_ONLY (((unsigned long)1) << 31) |
| #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) | |
| #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)) | |
| - | #define CURLSSH_AUTH_ANY ~0L /* all types supported by the server */ |
| - | #define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */ |
| - | #define CURLSSH_AUTH_PUBLICKEY (1L<<0) /* public/private key files */ |
| - | #define CURLSSH_AUTH_PASSWORD (1L<<1) /* password */ |
| - | #define CURLSSH_AUTH_HOST (1L<<2) /* host key files */ |
| - | #define CURLSSH_AUTH_KEYBOARD (1L<<3) /* keyboard interactive */ |
| - | #define CURLSSH_AUTH_AGENT (1L<<4) /* agent (ssh-agent, pageant...) */ |
| - | #define CURLSSH_AUTH_GSSAPI (1L<<5) /* gssapi (kerberos, ...) */ |
| - | #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY |
| + | #define CURLSSH_AUTH_ANY ~0L /* all types supported by server */ |
| + | #define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */ |
| + | #define CURLSSH_AUTH_PUBLICKEY (1L << 0) /* public/private key files */ |
| + | #define CURLSSH_AUTH_PASSWORD (1L << 1) /* password */ |
| + | #define CURLSSH_AUTH_HOST (1L << 2) /* host key files */ |
| + | #define CURLSSH_AUTH_KEYBOARD (1L << 3) /* keyboard interactive */ |
| + | #define CURLSSH_AUTH_AGENT (1L << 4) /* agent (ssh-agent, pageant...) */ |
| + | #define CURLSSH_AUTH_GSSAPI (1L << 5) /* gssapi (kerberos, ...) */ |
| + | #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY |
| #define CURLGSSAPI_DELEGATION_NONE 0L /* no delegation (default) */ | |
| #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1L<<0) /* if permitted by policy */ | |
| @@ -932,31 +932,31 @@ typedef enum { | |
| have introduced work-arounds for this flaw but those work-arounds sometimes | |
| make the SSL communication fail. To regain functionality with those broken | |
| servers, a user can this way allow the vulnerability back. */ | |
| - | #define CURLSSLOPT_ALLOW_BEAST (1L<<0) |
| + | #define CURLSSLOPT_ALLOW_BEAST (1L << 0) |
| /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those | |
| SSL backends where such behavior is present. */ | |
| - | #define CURLSSLOPT_NO_REVOKE (1L<<1) |
| + | #define CURLSSLOPT_NO_REVOKE (1L << 1) |
| /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain | |
| if possible. The OpenSSL backend has this ability. */ | |
| - | #define CURLSSLOPT_NO_PARTIALCHAIN (1L<<2) |
| + | #define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2) |
| /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline | |
| checks and ignore missing revocation list for those SSL backends where such | |
| behavior is present. */ | |
| - | #define CURLSSLOPT_REVOKE_BEST_EFFORT (1L<<3) |
| + | #define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3) |
| /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of | |
| operating system. Currently implemented under MS-Windows. */ | |
| - | #define CURLSSLOPT_NATIVE_CA (1L<<4) |
| + | #define CURLSSLOPT_NATIVE_CA (1L << 4) |
| /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use | |
| a client certificate for authentication. (Schannel) */ | |
| - | #define CURLSSLOPT_AUTO_CLIENT_CERT (1L<<5) |
| + | #define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5) |
| /* If possible, send data using TLS 1.3 early data */ | |
| - | #define CURLSSLOPT_EARLYDATA (1L<<6) |
| + | #define CURLSSLOPT_EARLYDATA (1L << 6) |
| /* The default connection attempt delay in milliseconds for happy eyeballs. | |
| CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document | |
| @@ -1023,20 +1023,20 @@ typedef enum { | |
| /* bitmask defines for CURLOPT_HEADEROPT */ | |
| #define CURLHEADER_UNIFIED 0L | |
| - | #define CURLHEADER_SEPARATE (1L<<0) |
| + | #define CURLHEADER_SEPARATE (1L << 0) |
| /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */ | |
| - | #define CURLALTSVC_READONLYFILE (1L<<2) |
| - | #define CURLALTSVC_H1 (1L<<3) |
| - | #define CURLALTSVC_H2 (1L<<4) |
| - | #define CURLALTSVC_H3 (1L<<5) |
| + | #define CURLALTSVC_READONLYFILE (1L << 2) |
| + | #define CURLALTSVC_H1 (1L << 3) |
| + | #define CURLALTSVC_H2 (1L << 4) |
| + | #define CURLALTSVC_H3 (1L << 5) |
| /* bitmask values for CURLOPT_UPLOAD_FLAGS */ | |
| - | #define CURLULFLAG_ANSWERED (1L<<0) |
| - | #define CURLULFLAG_DELETED (1L<<1) |
| - | #define CURLULFLAG_DRAFT (1L<<2) |
| - | #define CURLULFLAG_FLAGGED (1L<<3) |
| - | #define CURLULFLAG_SEEN (1L<<4) |
| + | #define CURLULFLAG_ANSWERED (1L << 0) |
| + | #define CURLULFLAG_DELETED (1L << 1) |
| + | #define CURLULFLAG_DRAFT (1L << 2) |
| + | #define CURLULFLAG_FLAGGED (1L << 3) |
| + | #define CURLULFLAG_SEEN (1L << 4) |
| struct curl_hstsentry { | |
| char *name; | |
| @@ -1065,41 +1065,41 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy, | |
| void *userp); | |
| /* CURLHSTS_* are bits for the CURLOPT_HSTS option */ | |
| - | #define CURLHSTS_ENABLE (1L<<0) |
| - | #define CURLHSTS_READONLYFILE (1L<<1) |
| + | #define CURLHSTS_ENABLE (1L << 0) |
| + | #define CURLHSTS_READONLYFILE (1L << 1) |
| /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS | |
| options. Do not use. */ | |
| - | #define CURLPROTO_HTTP (1L<<0) |
| - | #define CURLPROTO_HTTPS (1L<<1) |
| - | #define CURLPROTO_FTP (1L<<2) |
| - | #define CURLPROTO_FTPS (1L<<3) |
| - | #define CURLPROTO_SCP (1L<<4) |
| - | #define CURLPROTO_SFTP (1L<<5) |
| - | #define CURLPROTO_TELNET (1L<<6) |
| - | #define CURLPROTO_LDAP (1L<<7) |
| - | #define CURLPROTO_LDAPS (1L<<8) |
| - | #define CURLPROTO_DICT (1L<<9) |
| - | #define CURLPROTO_FILE (1L<<10) |
| - | #define CURLPROTO_TFTP (1L<<11) |
| - | #define CURLPROTO_IMAP (1L<<12) |
| - | #define CURLPROTO_IMAPS (1L<<13) |
| - | #define CURLPROTO_POP3 (1L<<14) |
| - | #define CURLPROTO_POP3S (1L<<15) |
| - | #define CURLPROTO_SMTP (1L<<16) |
| - | #define CURLPROTO_SMTPS (1L<<17) |
| - | #define CURLPROTO_RTSP (1L<<18) |
| - | #define CURLPROTO_RTMP (1L<<19) |
| - | #define CURLPROTO_RTMPT (1L<<20) |
| - | #define CURLPROTO_RTMPE (1L<<21) |
| - | #define CURLPROTO_RTMPTE (1L<<22) |
| - | #define CURLPROTO_RTMPS (1L<<23) |
| - | #define CURLPROTO_RTMPTS (1L<<24) |
| - | #define CURLPROTO_GOPHER (1L<<25) |
| - | #define CURLPROTO_SMB (1L<<26) |
| - | #define CURLPROTO_SMBS (1L<<27) |
| - | #define CURLPROTO_MQTT (1L<<28) |
| - | #define CURLPROTO_GOPHERS (1L<<29) |
| + | #define CURLPROTO_HTTP (1L << 0) |
| + | #define CURLPROTO_HTTPS (1L << 1) |
| + | #define CURLPROTO_FTP (1L << 2) |
| + | #define CURLPROTO_FTPS (1L << 3) |
| + | #define CURLPROTO_SCP (1L << 4) |
| + | #define CURLPROTO_SFTP (1L << 5) |
| + | #define CURLPROTO_TELNET (1L << 6) |
| + | #define CURLPROTO_LDAP (1L << 7) |
| + | #define CURLPROTO_LDAPS (1L << 8) |
| + | #define CURLPROTO_DICT (1L << 9) |
| + | #define CURLPROTO_FILE (1L << 10) |
| + | #define CURLPROTO_TFTP (1L << 11) |
| + | #define CURLPROTO_IMAP (1L << 12) |
| + | #define CURLPROTO_IMAPS (1L << 13) |
| + | #define CURLPROTO_POP3 (1L << 14) |
| + | #define CURLPROTO_POP3S (1L << 15) |
| + | #define CURLPROTO_SMTP (1L << 16) |
| + | #define CURLPROTO_SMTPS (1L << 17) |
| + | #define CURLPROTO_RTSP (1L << 18) |
| + | #define CURLPROTO_RTMP (1L << 19) |
| + | #define CURLPROTO_RTMPT (1L << 20) |
| + | #define CURLPROTO_RTMPE (1L << 21) |
| + | #define CURLPROTO_RTMPTE (1L << 22) |
| + | #define CURLPROTO_RTMPS (1L << 23) |
| + | #define CURLPROTO_RTMPTS (1L << 24) |
| + | #define CURLPROTO_GOPHER (1L << 25) |
| + | #define CURLPROTO_SMB (1L << 26) |
| + | #define CURLPROTO_SMBS (1L << 27) |
| + | #define CURLPROTO_MQTT (1L << 28) |
| + | #define CURLPROTO_GOPHERS (1L << 29) |
| #define CURLPROTO_ALL (~0L) /* enable everything */ | |
| /* long may be 32 or 64 bits, but we should never depend on anything else | |
| @@ -2424,7 +2424,7 @@ typedef struct curl_mime curl_mime; /* Mime context. */ | |
| typedef struct curl_mimepart curl_mimepart; /* Mime part context. */ | |
| /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */ | |
| - | #define CURLMIMEOPT_FORMESCAPE (1L<<0) /* Use backslash-escaping for forms. */ |
| + | #define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */ |
| /* | |
| * NAME curl_mime_init() | |
| @@ -3006,12 +3006,12 @@ typedef enum { | |
| CURLCLOSEPOLICY_LAST /* last, never use this */ | |
| } curl_closepolicy; | |
| - | #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */ |
| - | #define CURL_GLOBAL_WIN32 (1<<1) |
| + | #define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */ |
| + | #define CURL_GLOBAL_WIN32 (1 << 1) |
| #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32) | |
| #define CURL_GLOBAL_NOTHING 0 | |
| #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL | |
| - | #define CURL_GLOBAL_ACK_EINTR (1<<2) |
| + | #define CURL_GLOBAL_ACK_EINTR (1 << 2) |
| /***************************************************************************** | |
| * Setup defines, protos etc for the sharing stuff. | |
| @@ -3247,10 +3247,10 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode); | |
| */ | |
| CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); | |
| - | #define CURLPAUSE_RECV (1<<0) |
| + | #define CURLPAUSE_RECV (1 << 0) |
| #define CURLPAUSE_RECV_CONT (0) | |
| - | #define CURLPAUSE_SEND (1<<2) |
| + | #define CURLPAUSE_SEND (1 << 2) |
| #define CURLPAUSE_SEND_CONT (0) | |
| #define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND) | |
| @@ -71,8 +71,8 @@ | |
| */ | |
| #define LIBCURL_TIMESTAMP "[unreleased]" | |
| - | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) |
| - | #define CURL_AT_LEAST_VERSION(x,y,z) \ |
| + | #define CURL_VERSION_BITS(x, y, z) ((x) << 16 | (y) << 8 | (z)) |
| + | #define CURL_AT_LEAST_VERSION(x, y, z) \ |
| (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) | |
| #endif /* CURLINC_CURLVER_H */ | |
| @@ -38,11 +38,11 @@ struct curl_header { | |
| }; | |
| /* 'origin' bits */ | |
| - | #define CURLH_HEADER (1<<0) /* plain server header */ |
| - | #define CURLH_TRAILER (1<<1) /* trailers */ |
| - | #define CURLH_CONNECT (1<<2) /* CONNECT headers */ |
| - | #define CURLH_1XX (1<<3) /* 1xx headers */ |
| - | #define CURLH_PSEUDO (1<<4) /* pseudo headers */ |
| + | #define CURLH_HEADER (1 << 0) /* plain server header */ |
| + | #define CURLH_TRAILER (1 << 1) /* trailers */ |
| + | #define CURLH_CONNECT (1 << 2) /* CONNECT headers */ |
| + | #define CURLH_1XX (1 << 3) /* 1xx headers */ |
| + | #define CURLH_PSEUDO (1 << 4) /* pseudo headers */ |
| typedef enum { | |
| CURLHE_OK, | |
| @@ -412,12 +412,12 @@ typedef enum { | |
| /* - CURLMNWC_CLEAR_CONNS tells libcurl to prevent further reuse of existing | |
| connections. Connections that are idle will be closed. Ongoing transfers | |
| will continue with the connection they have. */ | |
| - | #define CURLMNWC_CLEAR_CONNS (1L<<0) |
| + | #define CURLMNWC_CLEAR_CONNS (1L << 0) |
| /* - CURLMNWC_CLEAR_DNS tells libcurl to prevent further reuse of existing | |
| connections. Connections that are idle will be closed. Ongoing transfers | |
| will continue with the connection they have. */ | |
| - | #define CURLMNWC_CLEAR_DNS (1L<<0) |
| + | #define CURLMNWC_CLEAR_DNS (1L << 0) |
| /* | |
| * Name: curl_multi_setopt() | |
| @@ -44,7 +44,7 @@ typedef enum { | |
| /* "alias" means it is provided for old programs to remain functional, | |
| we prefer another name */ | |
| - | #define CURLOT_FLAG_ALIAS (1<<0) |
| + | #define CURLOT_FLAG_ALIAS (1 << 0) |
| /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size | |
| to use for curl_easy_setopt() for the given id */ | |
| @@ -81,28 +81,28 @@ typedef enum { | |
| CURLUPART_ZONEID /* added in 7.65.0 */ | |
| } CURLUPart; | |
| - | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ |
| - | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, |
| - | if the port number matches the |
| - | default for the scheme */ |
| - | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if |
| - | missing */ |
| - | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ |
| - | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ |
| - | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ |
| - | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ |
| - | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ |
| - | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ |
| - | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ |
| - | #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the |
| - | scheme is unknown. */ |
| - | #define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */ |
| - | #define CURLU_PUNYCODE (1<<12) /* get the hostname in punycode */ |
| - | #define CURLU_PUNY2IDN (1<<13) /* punycode => IDN conversion */ |
| - | #define CURLU_GET_EMPTY (1<<14) /* allow empty queries and fragments |
| - | when extracting the URL or the |
| - | components */ |
| - | #define CURLU_NO_GUESS_SCHEME (1<<15) /* for get, do not accept a guess */ |
| + | #define CURLU_DEFAULT_PORT (1 << 0) /* return default port number */ |
| + | #define CURLU_NO_DEFAULT_PORT (1 << 1) /* act as if no port number was set, |
| + | if the port number matches the |
| + | default for the scheme */ |
| + | #define CURLU_DEFAULT_SCHEME (1 << 2) /* return default scheme if |
| + | missing */ |
| + | #define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */ |
| + | #define CURLU_PATH_AS_IS (1 << 4) /* leave dot sequences */ |
| + | #define CURLU_DISALLOW_USER (1 << 5) /* no user+password allowed */ |
| + | #define CURLU_URLDECODE (1 << 6) /* URL decode on get */ |
| + | #define CURLU_URLENCODE (1 << 7) /* URL encode on set */ |
| + | #define CURLU_APPENDQUERY (1 << 8) /* append a form style part */ |
| + | #define CURLU_GUESS_SCHEME (1 << 9) /* legacy curl-style guessing */ |
| + | #define CURLU_NO_AUTHORITY (1 << 10) /* Allow empty authority when the |
| + | scheme is unknown. */ |
| + | #define CURLU_ALLOW_SPACE (1 << 11) /* Allow spaces in the URL */ |
| + | #define CURLU_PUNYCODE (1 << 12) /* get the hostname in punycode */ |
| + | #define CURLU_PUNY2IDN (1 << 13) /* punycode => IDN conversion */ |
| + | #define CURLU_GET_EMPTY (1 << 14) /* allow empty queries and fragments |
| + | when extracting the URL or the |
| + | components */ |
| + | #define CURLU_NO_GUESS_SCHEME (1 << 15) /* for get, do not accept a guess */ |
| typedef struct Curl_URL CURLU; | |
| @@ -37,12 +37,12 @@ struct curl_ws_frame { | |
| }; | |
| /* flag bits */ | |
| - | #define CURLWS_TEXT (1<<0) |
| - | #define CURLWS_BINARY (1<<1) |
| - | #define CURLWS_CONT (1<<2) |
| - | #define CURLWS_CLOSE (1<<3) |
| - | #define CURLWS_PING (1<<4) |
| - | #define CURLWS_OFFSET (1<<5) |
| + | #define CURLWS_TEXT (1 << 0) |
| + | #define CURLWS_BINARY (1 << 1) |
| + | #define CURLWS_CONT (1 << 2) |
| + | #define CURLWS_CLOSE (1 << 3) |
| + | #define CURLWS_PING (1 << 4) |
| + | #define CURLWS_OFFSET (1 << 5) |
| /* | |
| * NAME curl_ws_recv() | |
| @@ -57,7 +57,7 @@ CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen, | |
| const struct curl_ws_frame **metap); | |
| /* flags for curl_ws_send() */ | |
| - | #define CURLWS_PONG (1<<6) |
| + | #define CURLWS_PONG (1 << 6) |
| /* | |
| * NAME curl_ws_send() | |
| @@ -86,8 +86,8 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl, | |
| curl_off_t frame_len); | |
| /* bits for the CURLOPT_WS_OPTIONS bitmask: */ | |
| - | #define CURLWS_RAW_MODE (1L<<0) |
| - | #define CURLWS_NOAUTOPONG (1L<<1) |
| + | #define CURLWS_RAW_MODE (1L << 0) |
| + | #define CURLWS_NOAUTOPONG (1L << 1) |
| CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef __AMIGA__ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef CURLRES_ARES | |
| @@ -872,7 +871,7 @@ static CURLcode async_ares_set_dns_servers(struct Curl_easy *data, | |
| result = CURLE_BAD_FUNCTION_ARGUMENT; | |
| break; | |
| } | |
| - | #else /* too old c-ares version! */ |
| + | #else /* c-ares version too old! */ |
| (void)data; | |
| (void)(ares_result); | |
| #endif | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -40,8 +39,7 @@ | |
| #ifdef USE_ARES | |
| #include <ares.h> | |
| - | #include <ares_version.h> /* really old c-ares did not include this by |
| - | itself */ |
| + | #include <ares_version.h> /* really old c-ares did not include it by itself */ |
| #endif | |
| #include "urldata.h" | |
| @@ -173,7 +171,7 @@ int Curl_ares_perform(ares_channel channel, timediff_t timeout_ms) | |
| return nfds; | |
| } | |
| - | #endif |
| + | #endif /* USE_ARES */ |
| #endif /* CURLRES_ASYNCH */ | |
| @@ -21,15 +21,15 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| - | #include "socketpair.h" |
| /*********************************************************************** | |
| * Only for threaded name resolves builds | |
| **********************************************************************/ | |
| #ifdef CURLRES_THREADED | |
| + | #include "socketpair.h" |
| + | |
| #ifdef HAVE_NETINET_IN_H | |
| #include <netinet/in.h> | |
| #endif | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| + | |
| #include "bufq.h" | |
| static bool chunk_is_empty(const struct buf_chunk *chunk) | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| + | |
| #include "urldata.h" | |
| #include "bufref.h" | |
| #include "strdup.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) | |
| @@ -788,4 +787,4 @@ CURLcode Curl_cf_h1_proxy_insert_after(struct Curl_cfilter *cf_at, | |
| return result; | |
| } | |
| - | #endif /* !CURL_DISABLE_PROXY && ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY) && \ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if defined(USE_NGHTTP2) && !defined(CURL_DISABLE_PROXY) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_PROXY | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_HTTP | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/timediff.h" | |
| struct bufq; | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/timeval.h" | |
| struct connectdata; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/timeval.h" | |
| struct connectdata; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curl_endian.h" | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| + | |
| #ifndef CURL_DISABLE_FTP | |
| #include "curl_fnmatch.h" | |
| @@ -356,7 +356,8 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string) | |
| return loop((const unsigned char *)pattern, | |
| (const unsigned char *)string, 2); | |
| } | |
| - | #else |
| + | #else /* HAVE_FNMATCH */ |
| + | |
| #include <fnmatch.h> | |
| /* | |
| * @unittest: 1307 | |
| @@ -379,7 +380,6 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string) | |
| } | |
| /* not reached */ | |
| } | |
| + | #endif /* !HAVE_FNMATCH */ |
| - | #endif |
| - | |
| - | #endif /* if FTP is disabled */ |
| + | #endif /* !CURL_DISABLE_FTP */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #define CURL_FNMATCH_MATCH 0 | |
| #define CURL_FNMATCH_NOMATCH 1 | |
| #define CURL_FNMATCH_FAIL 2 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \ | |
| @@ -156,4 +155,4 @@ fail: | |
| return result; | |
| } | |
| - | #endif /* ! disabled */ |
| + | #endif /* !disabled */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/fopen.h" | |
| CURLcode Curl_fopen(struct Curl_easy *data, const char *filename, | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/dynbuf.h" | |
| /* Curl_get_line() returns complete lines that end with a newline. */ | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| + | |
| #include "curl_gethostname.h" | |
| #include "curlx/strcopy.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_GSSAPI | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_CURL_NTLM_CORE | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curl_memrchr.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_MEMRCHR | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_CURL_NTLM_CORE | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_CURL_NTLM_CORE | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curl_range.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_LIBRTMP | |
| @@ -384,4 +383,4 @@ void Curl_rtmp_version(char *version, size_t len) | |
| suff); | |
| } | |
| - | #endif /* USE_LIBRTMP */ |
| + | #endif /* USE_LIBRTMP */ |
| @@ -32,7 +32,6 @@ | |
| * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt> | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "bufref.h" | |
| struct Curl_easy; | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_DIGEST_AUTH) && !defined(CURL_DISABLE_SHA512_256) | |
| @@ -75,7 +74,7 @@ | |
| # ifdef SHA512_256_DIGEST_SIZE | |
| # define USE_GNUTLS_SHA512_256 1 | |
| # endif | |
| - | #endif /* ! HAS_SHA512_256_IMPLEMENTATION && USE_GNUTLS */ |
| + | #endif /* !HAS_SHA512_256_IMPLEMENTATION && USE_GNUTLS */ |
| #ifdef USE_OPENSSL_SHA512_256 | |
| @@ -169,9 +168,9 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| if(ret == CURLE_OK) | |
| memcpy(digest, tmp_digest, CURL_SHA512_256_DIGEST_SIZE); | |
| explicit_memset(tmp_digest, 0, sizeof(tmp_digest)); | |
| - | #else /* ! NEED_NETBSD_SHA512_256_WORKAROUND */ |
| + | #else /* !NEED_NETBSD_SHA512_256_WORKAROUND */ |
| ret = EVP_DigestFinal_ex(*ctx, digest, NULL) ? CURLE_OK : CURLE_SSL_CIPHER; | |
| - | #endif /* ! NEED_NETBSD_SHA512_256_WORKAROUND */ |
| + | #endif /* NEED_NETBSD_SHA512_256_WORKAROUND */ |
| EVP_MD_CTX_destroy(*ctx); | |
| *ctx = NULL; | |
| @@ -288,15 +287,16 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| ((uint64_t)(((const uint8_t *)(ptr))[6]) << 8) | \ | |
| (uint64_t)(((const uint8_t *)(ptr))[7])) | |
| - | #define CURL_PUT_64BIT_BE(ptr,val) do { \ |
| - | ((uint8_t*)(ptr))[7] = (uint8_t) ((uint64_t)(val)); \ |
| - | ((uint8_t*)(ptr))[6] = (uint8_t)(((uint64_t)(val)) >> 8); \ |
| - | ((uint8_t*)(ptr))[5] = (uint8_t)(((uint64_t)(val)) >> 16); \ |
| - | ((uint8_t*)(ptr))[4] = (uint8_t)(((uint64_t)(val)) >> 24); \ |
| - | ((uint8_t*)(ptr))[3] = (uint8_t)(((uint64_t)(val)) >> 32); \ |
| - | ((uint8_t*)(ptr))[2] = (uint8_t)(((uint64_t)(val)) >> 40); \ |
| - | ((uint8_t*)(ptr))[1] = (uint8_t)(((uint64_t)(val)) >> 48); \ |
| - | ((uint8_t*)(ptr))[0] = (uint8_t)(((uint64_t)(val)) >> 56); \ |
| + | #define CURL_PUT_64BIT_BE(ptr, val) \ |
| + | do { \ |
| + | ((uint8_t *)(ptr))[7] = (uint8_t)((uint64_t)(val)); \ |
| + | ((uint8_t *)(ptr))[6] = (uint8_t)(((uint64_t)(val)) >> 8); \ |
| + | ((uint8_t *)(ptr))[5] = (uint8_t)(((uint64_t)(val)) >> 16); \ |
| + | ((uint8_t *)(ptr))[4] = (uint8_t)(((uint64_t)(val)) >> 24); \ |
| + | ((uint8_t *)(ptr))[3] = (uint8_t)(((uint64_t)(val)) >> 32); \ |
| + | ((uint8_t *)(ptr))[2] = (uint8_t)(((uint64_t)(val)) >> 40); \ |
| + | ((uint8_t *)(ptr))[1] = (uint8_t)(((uint64_t)(val)) >> 48); \ |
| + | ((uint8_t *)(ptr))[0] = (uint8_t)(((uint64_t)(val)) >> 56); \ |
| } while(0) | |
| /* Defined as a function. The macro version may duplicate the binary code | |
| @@ -459,9 +459,9 @@ static void Curl_sha512_256_transform(uint64_t H[SHA512_256_HASH_SIZE_WORDS], | |
| (Curl_rotr64((x), 28) ^ Curl_rotr64((x), 34) ^ Curl_rotr64((x), 39)) | |
| #define SIG1(x) \ | |
| (Curl_rotr64((x), 14) ^ Curl_rotr64((x), 18) ^ Curl_rotr64((x), 41)) | |
| - | #define sig0(x) \ |
| - | (Curl_rotr64((x), 1) ^ Curl_rotr64((x), 8) ^ ((x) >> 7)) |
| - | #define sig1(x) \ |
| + | #define sig0(x) \ |
| + | (Curl_rotr64((x), 1) ^ Curl_rotr64((x), 8) ^ ((x) >> 7)) |
| + | #define sig1(x) \ |
| (Curl_rotr64((x), 19) ^ Curl_rotr64((x), 61) ^ ((x) >> 6)) | |
| if(1) { | |
| @@ -601,7 +601,7 @@ static CURLcode Curl_sha512_256_update(void *context, | |
| const unsigned char *data, | |
| size_t length) | |
| { | |
| - | unsigned int bytes_have; /**< Number of bytes in the context buffer */ |
| + | unsigned int bytes_have; /* Number of bytes in the context buffer */ |
| struct Curl_sha512_256ctx * const ctx = (struct Curl_sha512_256ctx *)context; | |
| /* the void pointer here is required to mute Intel compiler warning */ | |
| void * const ctx_buf = ctx->buffer; | |
| @@ -625,7 +625,7 @@ static CURLcode Curl_sha512_256_update(void *context, | |
| if(length >= bytes_left) { | |
| /* Combine new data with data in the buffer and process the full | |
| block. */ | |
| - | memcpy(((unsigned char *)ctx_buf) + bytes_have, data, bytes_left); |
| + | memcpy((unsigned char *)ctx_buf + bytes_have, data, bytes_left); |
| data += bytes_left; | |
| length -= bytes_left; | |
| Curl_sha512_256_transform(ctx->H, ctx->buffer); | |
| @@ -644,7 +644,7 @@ static CURLcode Curl_sha512_256_update(void *context, | |
| if(length) { | |
| /* Copy incomplete block of new data (if any) | |
| to the buffer. */ | |
| - | memcpy(((unsigned char *)ctx_buf) + bytes_have, data, length); |
| + | memcpy((unsigned char *)ctx_buf + bytes_have, data, length); |
| } | |
| return CURLE_OK; | |
| @@ -672,8 +672,8 @@ static CURLcode Curl_sha512_256_update(void *context, | |
| static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| { | |
| struct Curl_sha512_256ctx * const ctx = (struct Curl_sha512_256ctx *)context; | |
| - | uint64_t num_bits; /**< Number of processed bits */ |
| - | unsigned int bytes_have; /**< Number of bytes in the context buffer */ |
| + | uint64_t num_bits; /* Number of processed bits */ |
| + | unsigned int bytes_have; /* Number of bytes in the context buffer */ |
| /* the void pointer here is required to mute Intel compiler warning */ | |
| void * const ctx_buf = ctx->buffer; | |
| @@ -702,7 +702,7 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| /* No space in the current block to put the total length of message. | |
| Pad the current block with zeros and process it. */ | |
| if(bytes_have < CURL_SHA512_256_BLOCK_SIZE) | |
| - | memset(((unsigned char *)ctx_buf) + bytes_have, 0, |
| + | memset((unsigned char *)ctx_buf + bytes_have, 0, |
| CURL_SHA512_256_BLOCK_SIZE - bytes_have); | |
| /* Process the full block. */ | |
| Curl_sha512_256_transform(ctx->H, ctx->buffer); | |
| @@ -711,31 +711,29 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| } | |
| /* Pad the rest of the buffer with zeros. */ | |
| - | memset(((unsigned char *)ctx_buf) + bytes_have, 0, |
| + | memset((unsigned char *)ctx_buf + bytes_have, 0, |
| CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD - bytes_have); | |
| /* Put high part of number of bits in processed message and then lower | |
| part of number of bits as big-endian values. | |
| See FIPS PUB 180-4 section 5.1.2. */ | |
| /* Note: the target location is predefined and buffer is always aligned */ | |
| - | CURL_PUT_64BIT_BE(((unsigned char *)ctx_buf) \ |
| - | + CURL_SHA512_256_BLOCK_SIZE \ |
| - | - SHA512_256_SIZE_OF_LEN_ADD, \ |
| - | ctx->count_bits_hi); |
| - | CURL_PUT_64BIT_BE(((unsigned char *)ctx_buf) \ |
| - | + CURL_SHA512_256_BLOCK_SIZE \ |
| - | - SHA512_256_SIZE_OF_LEN_ADD \ |
| - | + SHA512_256_BYTES_IN_WORD, \ |
| - | num_bits); |
| + | CURL_PUT_64BIT_BE((unsigned char *)ctx_buf + |
| + | CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD, |
| + | ctx->count_bits_hi); |
| + | CURL_PUT_64BIT_BE((unsigned char *)ctx_buf + |
| + | CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD + |
| + | SHA512_256_BYTES_IN_WORD, |
| + | num_bits); |
| /* Process the full final block. */ | |
| Curl_sha512_256_transform(ctx->H, ctx->buffer); | |
| /* Put in BE mode the leftmost part of the hash as the final digest. | |
| See FIPS PUB 180-4 section 6.7. */ | |
| - | CURL_PUT_64BIT_BE((digest + 0 * SHA512_256_BYTES_IN_WORD), ctx->H[0]); |
| - | CURL_PUT_64BIT_BE((digest + 1 * SHA512_256_BYTES_IN_WORD), ctx->H[1]); |
| - | CURL_PUT_64BIT_BE((digest + 2 * SHA512_256_BYTES_IN_WORD), ctx->H[2]); |
| - | CURL_PUT_64BIT_BE((digest + 3 * SHA512_256_BYTES_IN_WORD), ctx->H[3]); |
| + | CURL_PUT_64BIT_BE(digest + 0 * SHA512_256_BYTES_IN_WORD, ctx->H[0]); |
| + | CURL_PUT_64BIT_BE(digest + 1 * SHA512_256_BYTES_IN_WORD, ctx->H[1]); |
| + | CURL_PUT_64BIT_BE(digest + 2 * SHA512_256_BYTES_IN_WORD, ctx->H[2]); |
| + | CURL_PUT_64BIT_BE(digest + 3 * SHA512_256_BYTES_IN_WORD, ctx->H[3]); |
| /* Erase potentially sensitive data. */ | |
| memset(ctx, 0, sizeof(struct Curl_sha512_256ctx)); | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_DIGEST_AUTH) && !defined(CURL_DISABLE_SHA512_256) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -93,7 +92,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) | |
| if(!share->cookies) | |
| res = CURLSHE_NOMEM; | |
| } | |
| - | #else /* CURL_DISABLE_HTTP */ |
| + | #else /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */ |
| res = CURLSHE_NOT_BUILT_IN; | |
| #endif | |
| break; | |
| @@ -105,7 +104,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) | |
| if(!share->hsts) | |
| res = CURLSHE_NOMEM; | |
| } | |
| - | #else /* CURL_DISABLE_HSTS */ |
| + | #else /* CURL_DISABLE_HSTS */ |
| res = CURLSHE_NOT_BUILT_IN; | |
| #endif | |
| break; | |
| @@ -160,7 +159,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) | |
| Curl_cookie_cleanup(share->cookies); | |
| share->cookies = NULL; | |
| } | |
| - | #else /* CURL_DISABLE_HTTP */ |
| + | #else /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */ |
| res = CURLSHE_NOT_BUILT_IN; | |
| #endif | |
| break; | |
| @@ -170,7 +169,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) | |
| if(share->hsts) { | |
| Curl_hsts_cleanup(&share->hsts); | |
| } | |
| - | #else /* CURL_DISABLE_HSTS */ |
| + | #else /* CURL_DISABLE_HSTS */ |
| res = CURLSHE_NOT_BUILT_IN; | |
| #endif | |
| break; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "cookie.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_WINDOWS_SSPI | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_WINDOWS_SSPI | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curl_trc.h" | |
| @@ -86,8 +85,8 @@ static struct curl_trc_feat Curl_trc_feat_ids = { | |
| CURL_LOG_LVL_NONE, | |
| }; | |
| #define CURL_TRC_IDS(data) \ | |
| - | (Curl_trc_is_verbose(data) && \ |
| - | Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO) |
| + | (Curl_trc_is_verbose(data) && \ |
| + | Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO) |
| static size_t trc_print_ids(struct Curl_easy *data, char *buf, size_t maxlen) | |
| { | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| struct Curl_easy; | |
| struct Curl_cfilter; | |
| @@ -119,7 +118,7 @@ void Curl_trc_ssls(struct Curl_easy *data, | |
| #ifdef USE_SSH | |
| extern struct curl_trc_feat Curl_trc_feat_ssh; | |
| void Curl_trc_ssh(struct Curl_easy *data, | |
| - | const char *fmt, ...) CURL_PRINTF(2, 3); |
| + | const char *fmt, ...) CURL_PRINTF(2, 3); |
| #endif | |
| #if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) | |
| extern struct curl_trc_feat Curl_trc_feat_ws; | |
| @@ -135,52 +134,76 @@ void Curl_trc_ws(struct Curl_easy *data, | |
| Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer) | |
| #if defined(CURL_HAVE_C99) && !defined(CURL_DISABLE_VERBOSE_STRINGS) | |
| - | #define infof(data, ...) \ |
| - | do { if(Curl_trc_is_verbose(data)) \ |
| - | Curl_infof(data, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_M(data, ...) \ |
| - | do { if(CURL_TRC_M_is_verbose(data)) \ |
| - | Curl_trc_multi(data, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_CF(data, cf, ...) \ |
| - | do { if(Curl_trc_cf_is_verbose(cf, data)) \ |
| - | Curl_trc_cf_infof(data, cf, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_WRITE(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \ |
| - | Curl_trc_write(data, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_READ(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \ |
| - | Curl_trc_read(data, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_DNS(data, ...) \ |
| - | do { if(CURL_TRC_DNS_is_verbose(data)) \ |
| - | Curl_trc_dns(data, __VA_ARGS__); } while(0) |
| - | #define CURL_TRC_TIMER(data, tid, ...) \ |
| - | do { if(CURL_TRC_TIMER_is_verbose(data)) \ |
| - | Curl_trc_timer(data, tid, __VA_ARGS__); } while(0) |
| + | #define infof(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_is_verbose(data)) \ |
| + | Curl_infof(data, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_M(data, ...) \ |
| + | do { \ |
| + | if(CURL_TRC_M_is_verbose(data)) \ |
| + | Curl_trc_multi(data, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_CF(data, cf, ...) \ |
| + | do { \ |
| + | if(Curl_trc_cf_is_verbose(cf, data)) \ |
| + | Curl_trc_cf_infof(data, cf, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_WRITE(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \ |
| + | Curl_trc_write(data, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_READ(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \ |
| + | Curl_trc_read(data, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_DNS(data, ...) \ |
| + | do { \ |
| + | if(CURL_TRC_DNS_is_verbose(data)) \ |
| + | Curl_trc_dns(data, __VA_ARGS__); \ |
| + | } while(0) |
| + | #define CURL_TRC_TIMER(data, tid, ...) \ |
| + | do { \ |
| + | if(CURL_TRC_TIMER_is_verbose(data)) \ |
| + | Curl_trc_timer(data, tid, __VA_ARGS__); \ |
| + | } while(0) |
| #ifndef CURL_DISABLE_FTP | |
| - | #define CURL_TRC_FTP(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ftp)) \ |
| - | Curl_trc_ftp(data, __VA_ARGS__); } while(0) |
| + | #define CURL_TRC_FTP(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ftp)) \ |
| + | Curl_trc_ftp(data, __VA_ARGS__); \ |
| + | } while(0) |
| #endif /* !CURL_DISABLE_FTP */ | |
| #ifndef CURL_DISABLE_SMTP | |
| - | #define CURL_TRC_SMTP(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_smtp)) \ |
| - | Curl_trc_smtp(data, __VA_ARGS__); } while(0) |
| + | #define CURL_TRC_SMTP(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_smtp)) \ |
| + | Curl_trc_smtp(data, __VA_ARGS__); \ |
| + | } while(0) |
| #endif /* !CURL_DISABLE_SMTP */ | |
| #ifdef USE_SSL | |
| - | #define CURL_TRC_SSLS(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \ |
| - | Curl_trc_ssls(data, __VA_ARGS__); } while(0) |
| + | #define CURL_TRC_SSLS(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \ |
| + | Curl_trc_ssls(data, __VA_ARGS__); \ |
| + | } while(0) |
| #endif /* USE_SSL */ | |
| #ifdef USE_SSH | |
| - | #define CURL_TRC_SSH(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssh)) \ |
| - | Curl_trc_ssh(data, __VA_ARGS__); } while(0) |
| + | #define CURL_TRC_SSH(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssh)) \ |
| + | Curl_trc_ssh(data, __VA_ARGS__); \ |
| + | } while(0) |
| #endif /* USE_SSH */ | |
| #if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) | |
| - | #define CURL_TRC_WS(data, ...) \ |
| - | do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ws)) \ |
| - | Curl_trc_ws(data, __VA_ARGS__); } while(0) |
| + | #define CURL_TRC_WS(data, ...) \ |
| + | do { \ |
| + | if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ws)) \ |
| + | Curl_trc_ws(data, __VA_ARGS__); \ |
| + | } while(0) |
| #endif /* !CURL_DISABLE_WEBSOCKETS && !CURL_DISABLE_HTTP */ | |
| #else /* CURL_HAVE_C99 */ | |
| @@ -220,20 +243,22 @@ extern struct curl_trc_feat Curl_trc_feat_write; | |
| extern struct curl_trc_feat Curl_trc_feat_dns; | |
| extern struct curl_trc_feat Curl_trc_feat_timer; | |
| - | #define Curl_trc_is_verbose(data) \ |
| - | ((data) && (data)->set.verbose && \ |
| - | (!(data)->state.feat || \ |
| - | ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO))) |
| - | #define Curl_trc_cf_is_verbose(cf, data) \ |
| - | (Curl_trc_is_verbose(data) && \ |
| - | (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO) |
| + | #define Curl_trc_is_verbose(data) \ |
| + | ((data) && (data)->set.verbose && \ |
| + | (!(data)->state.feat || \ |
| + | ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO))) |
| + | #define Curl_trc_cf_is_verbose(cf, data) \ |
| + | (Curl_trc_is_verbose(data) && \ |
| + | (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO) |
| #define Curl_trc_ft_is_verbose(data, ft) \ | |
| - | (Curl_trc_is_verbose(data) && \ |
| - | (ft)->log_level >= CURL_LOG_LVL_INFO) |
| + | (Curl_trc_is_verbose(data) && \ |
| + | (ft)->log_level >= CURL_LOG_LVL_INFO) |
| #define CURL_MSTATE_NAME(s) Curl_trc_mstate_name((int)(s)) | |
| - | #define CURL_TRC_EASY_TIMERS(data) \ |
| - | do { if(CURL_TRC_TIMER_is_verbose(data)) \ |
| - | Curl_trc_easy_timers(data); } while(0) |
| + | #define CURL_TRC_EASY_TIMERS(data) \ |
| + | do { \ |
| + | if(CURL_TRC_TIMER_is_verbose(data)) \ |
| + | Curl_trc_easy_timers(data); \ |
| + | } while(0) |
| #else /* CURL_DISABLE_VERBOSE_STRINGS */ | |
| /* All informational messages are not compiled in for size savings */ | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| + | |
| #include "dynbuf.h" | |
| #include "../curl_printf.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "fopen.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "multibyte.h" | |
| @@ -16,7 +16,6 @@ | |
| * | |
| * SPDX-License-Identifier: ISC | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifndef HAVE_INET_NTOP | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef HAVE_INET_NTOP | |
| @@ -17,7 +17,6 @@ | |
| * | |
| * SPDX-License-Identifier: ISC | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #include "strparse.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef HAVE_INET_PTON | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(_WIN32) && defined(UNICODE) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef HAVE_SYS_IOCTL_H | |
| @@ -22,6 +22,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "../curl_setup.h" | |
| + | |
| #include "strcopy.h" | |
| /* | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef HAVE_STRERROR_R | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "strparse.h" | |
| void curlx_str_init(struct Curl_str *out) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "timediff.h" | |
| /* | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| /* Use a larger type even for 32-bit time_t systems so that we can keep | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "timeval.h" | |
| #ifdef _WIN32 | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "timediff.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef _WIN32 | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef _WIN32 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifndef HAVE_SELECT | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| int curlx_wait_ms(timediff_t timeout_ms); | |
| @@ -21,6 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| + | #include "../curl_setup.h" |
| #include "warnless.h" | |
| @@ -24,8 +24,6 @@ | |
| * | |
| ***************************************************************************/ | |
| - | #include "../curl_setup.h" |
| - | |
| #define CURLX_FUNCTION_CAST(target_type, func) \ | |
| (target_type)(void (*)(void))(func) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_DICT | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifndef CURL_DISABLE_DICT | |
| extern const struct Curl_handler Curl_handler_dict; | |
| #endif | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_OPENSSL | |
| @@ -60,6 +59,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) | |
| } | |
| return TRUE; | |
| } | |
| - | #endif /* OpenSSL */ |
| + | #endif /* USE_OPENSSL (non-fork) */ |
| - | #endif /* DLL build */ |
| + | #endif /* _WIN32 && !CURL_STATICLIB */ |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_DOH | |
| @@ -179,9 +179,9 @@ UNITTEST void de_init(struct dohentry *d); | |
| UNITTEST void de_cleanup(struct dohentry *d); | |
| #endif | |
| - | #else /* if DoH is disabled */ |
| + | #else /* CURL_DISABLE_DOH */ |
| #define Curl_doh(a, b, c, d, e) NULL | |
| #define Curl_doh_is_resolved(x, y) CURLE_COULDNT_RESOLVE_HOST | |
| - | #endif |
| + | #endif /* !CURL_DISABLE_DOH */ |
| #endif /* HEADER_CURL_DOH_H */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "dynhds.h" | |
| @@ -32,10 +31,9 @@ | |
| #include <nghttp2/nghttp2.h> | |
| #endif /* USE_NGHTTP2 */ | |
| - | |
| - | static struct dynhds_entry * |
| - | entry_new(const char *name, size_t namelen, |
| - | const char *value, size_t valuelen, int opts) |
| + | static struct dynhds_entry *entry_new(const char *name, size_t namelen, |
| + | const char *value, size_t valuelen, |
| + | int opts) |
| { | |
| struct dynhds_entry *e; | |
| char *p; | |
| @@ -45,7 +43,7 @@ entry_new(const char *name, size_t namelen, | |
| e = curlx_calloc(1, sizeof(*e) + namelen + valuelen + 2); | |
| if(!e) | |
| return NULL; | |
| - | e->name = p = ((char *)e) + sizeof(*e); |
| + | e->name = p = (char *)e + sizeof(*e); |
| memcpy(p, name, namelen); | |
| e->namelen = namelen; | |
| e->value = p += namelen + 1; /* leave a \0 at the end of name */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #define GLOBAL_INIT_IS_THREADSAFE | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "easyoptions.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Prototypes for library-wide functions provided by easy.c | |
| */ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* should probably go into the public header */ | |
| /* generated table with all easy options */ | |
| @@ -32,4 +31,5 @@ extern const struct curl_easyoption Curl_easyopts[]; | |
| #ifdef DEBUGBUILD | |
| int Curl_easyopts_check(void); | |
| #endif | |
| - | #endif |
| + | |
| + | #endif /* HEADER_CURL_EASYOPTIONS_H */ |
| @@ -21,10 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* Escape and unescape URL encoding in strings. The functions return a new | |
| * allocated string or NULL if an error occurred. */ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -62,7 +60,7 @@ char *curl_easy_escape(CURL *data, const char *string, int inlength) | |
| if(!length) | |
| return curlx_strdup(""); | |
| - | if(length > SIZE_MAX/16) |
| + | if(length > SIZE_MAX / 16) |
| return NULL; | |
| curlx_dyn_init(&d, length * 3 + 1); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "fake_addrinfo.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_ARES | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_FILE | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifndef CURL_DISABLE_FILE | |
| extern const struct Curl_handler Curl_handler_file; | |
| #endif | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_FTP | |
| @@ -42,4 +41,4 @@ void Curl_fileinfo_cleanup(struct fileinfo *finfo) | |
| curlx_free(finfo); | |
| } | |
| - | #endif |
| + | #endif /* !CURL_DISABLE_FTP */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "llist.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_FORM_API | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_FTP | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "pingpong.h" | |
| @@ -21,6 +21,9 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| + | #include "curl_setup.h" |
| + | |
| + | #ifndef CURL_DISABLE_FTP |
| /** | |
| * Now implemented: | |
| @@ -37,10 +40,6 @@ | |
| * 01-29-97 11:32PM <DIR> prog | |
| */ | |
| - | #include "curl_setup.h" |
| - | |
| - | #ifndef CURL_DISABLE_FTP |
| - | |
| #include "urldata.h" | |
| #include "fileinfo.h" | |
| #include "llist.h" | |
| @@ -1089,4 +1088,4 @@ fail: | |
| return retsize; | |
| } | |
| - | #endif /* CURL_DISABLE_FTP */ |
| + | #endif /* !CURL_DISABLE_FTP */ |
| @@ -70,8 +70,8 @@ void Curl_wildcard_dtor(struct WildcardData **wcp); | |
| struct Curl_easy; | |
| - | #else |
| - | /* FTP is disabled */ |
| + | #else /* CURL_DISABLE_FTP */ |
| #define Curl_wildcard_dtor(x) | |
| - | #endif /* CURL_DISABLE_FTP */ |
| + | #endif /* !CURL_DISABLE_FTP */ |
| + | |
| #endif /* HEADER_CURL_FTPLISTPARSER_H */ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /* defaults: | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| char *curl_getenv(const char *variable) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_GOPHER | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifndef CURL_DISABLE_GOPHER | |
| extern const struct Curl_handler Curl_handler_gopher; | |
| #ifdef USE_SSL | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "hash.h" | |
| @@ -32,7 +31,6 @@ | |
| #define ITERINIT 0x5FEDCBA9 | |
| #endif | |
| - | |
| #if 0 /* useful function for debugging hashes and their contents */ | |
| void Curl_hash_print(struct Curl_hash *h, void (*func)(void *)) | |
| { | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /* Hash function prototype */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * RFC2104 Keyed-Hashing for Message Authentication | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "hash.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /*********************************************************************** | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /*********************************************************************** | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_HTTP | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_HTTP | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_HTTP | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGHTTP2) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_NGHTTP2 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_HTTP | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "http_proxy.h" | |
| @@ -437,4 +436,4 @@ out: | |
| return result; | |
| } | |
| - | #endif /* ! CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */ |
| + | #endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_HTTPSRR | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_ARES | |
| @@ -21,11 +21,9 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * IDN conversions | |
| */ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -41,7 +39,7 @@ | |
| #define IDN2_LOOKUP(name, host, flags) \ | |
| idn2_lookup_ul((const char *)name, (char **)host, flags) | |
| #endif | |
| - | #endif /* USE_LIBIDN2 */ |
| + | #endif /* USE_LIBIDN2 */ |
| /* for macOS and iOS targets */ | |
| #ifdef USE_APPLE_IDN | |
| @@ -23,17 +23,17 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| bool Curl_is_ASCII_name(const char *hostname); | |
| CURLcode Curl_idnconvert_hostname(struct hostname *host); | |
| + | |
| #if defined(USE_LIBIDN2) || defined(USE_WIN32_IDN) || defined(USE_APPLE_IDN) | |
| #define USE_IDN | |
| void Curl_free_idnconverted_hostname(struct hostname *host); | |
| CURLcode Curl_idn_decode(const char *input, char **output); | |
| CURLcode Curl_idn_encode(const char *input, char **output); | |
| - | |
| #else | |
| #define Curl_free_idnconverted_hostname(x) | |
| #define Curl_idn_decode(x) NULL | |
| #endif | |
| + | |
| #endif /* HEADER_CURL_IDN_H */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -34,7 +34,6 @@ | |
| * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt> | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_IMAP | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| extern const struct Curl_handler Curl_handler_imap; | |
| extern const struct Curl_handler Curl_handler_imaps; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "llist.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| typedef void (*Curl_llist_dtor)(void *user, void *elem); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef CURL_MACOS_CALL_COPYPROXIES | |
| @@ -23,17 +23,12 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef CURL_MACOS_CALL_COPYPROXIES | |
| - | |
| CURLcode Curl_macos_init(void); | |
| - | |
| #else | |
| - | |
| #define Curl_macos_init() CURLE_OK | |
| - | |
| #endif | |
| #endif /* HEADER_CURL_MACOS_H */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_CURL_NTLM_CORE | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef CURLDEBUG | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_easy; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #define MIME_BOUNDARY_DASHES 24 /* leading boundary dashes */ | |
| @@ -20,8 +20,7 @@ | |
| * | |
| * SPDX-License-Identifier: curl | |
| * | |
| - | */ |
| - | |
| + | ***************************************************************************/ |
| #include "curl_setup.h" | |
| #include "curlx/dynbuf.h" | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_MQTT | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifndef CURL_DISABLE_MQTT | |
| extern const struct Curl_handler Curl_handler_mqtt; | |
| #endif | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "hash.h" | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "uint-bset.h" | |
| struct Curl_easy; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "llist.h" | |
| #include "hash.h" | |
| #include "conncache.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Prototypes for library-wide functions provided by multi.c | |
| */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_NETRC | |
| @@ -23,10 +23,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_NETRC | |
| + | |
| #include "curlx/dynbuf.h" | |
| struct store_netrc { | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_PROXY | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP) | |
| @@ -21,6 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| + | #include "curl_setup.h" |
| + | |
| + | #include "parsedate.h" |
| + | #include "curlx/strparse.h" |
| + | |
| /* | |
| A brief summary of the date string formats this parser groks: | |
| @@ -75,11 +80,6 @@ | |
| */ | |
| - | #include "curl_setup.h" |
| - | |
| - | #include "parsedate.h" |
| - | #include "curlx/strparse.h" |
| - | |
| /* | |
| * parsedate() | |
| * | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| extern const char * const Curl_wkday[7]; | |
| extern const char * const Curl_month[12]; | |
| @@ -24,7 +24,6 @@ | |
| * IMAP, POP3, SMTP and whatever more that likes them. | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \ | |
| @@ -36,7 +36,6 @@ | |
| * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt> | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_POP3 | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| extern const struct Curl_handler Curl_handler_pop3; | |
| extern const struct Curl_handler Curl_handler_pop3s; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/timeval.h" | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_LIBPSL | |
| @@ -23,8 +23,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifdef USE_LIBPSL | |
| + | |
| #include <libpsl.h> | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_ARPA_INET_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| CURLcode Curl_rand_bytes(struct Curl_easy *data, | |
| #ifdef DEBUGBUILD | |
| bool allow_env_override, | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curlx/timeval.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curlx/timeval.h" | |
| struct Curl_easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,9 +23,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* This file is for lib internal stuff */ | |
| - | |
| #include "curl_setup.h" | |
| #include "bufq.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_RTSP | |
| @@ -23,17 +23,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #ifndef CURL_DISABLE_RTSP | |
| - | |
| extern const struct Curl_handler Curl_handler_rtsp; | |
| - | |
| CURLcode Curl_rtsp_parseheader(struct Curl_easy *data, const char *header); | |
| - | |
| #else | |
| - | /* disabled */ |
| #define Curl_rtsp_parseheader(x, y) CURLE_NOT_BUILT_IN | |
| - | |
| - | #endif /* CURL_DISABLE_RTSP */ |
| + | #endif |
| #endif /* HEADER_CURL_RTSP_H */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(HAVE_SELECT) && !defined(HAVE_POLL) | |
| @@ -263,7 +262,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) | |
| ufds[i].revents |= POLLIN | POLLOUT; | |
| } | |
| - | #else /* HAVE_POLL */ |
| + | #else /* !HAVE_POLL */ |
| FD_ZERO(&fds_read); | |
| FD_ZERO(&fds_write); | |
| @@ -329,7 +328,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) | |
| r++; | |
| } | |
| - | #endif /* HAVE_POLL */ |
| + | #endif /* HAVE_POLL */ |
| return r; | |
| } | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_POLL_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /** | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -314,7 +313,7 @@ static CURLcode setopt_HTTP_VERSION(struct Curl_easy *data, long arg) | |
| data->set.httpwant = (unsigned char)arg; | |
| return CURLE_OK; | |
| } | |
| - | #endif /* ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_HTTP */ |
| #ifdef USE_SSL | |
| CURLcode Curl_setopt_SSLVERSION(struct Curl_easy *data, CURLoption option, | |
| @@ -351,7 +350,7 @@ CURLcode Curl_setopt_SSLVERSION(struct Curl_easy *data, CURLoption option, | |
| } | |
| return CURLE_OK; | |
| } | |
| - | #endif /* ! USE_SSL */ |
| + | #endif /* !USE_SSL */ |
| #ifndef CURL_DISABLE_RTSP | |
| static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg) | |
| @@ -412,7 +411,7 @@ static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg) | |
| data->set.rtspreq = rtspreq; | |
| return CURLE_OK; | |
| } | |
| - | #endif /* ! CURL_DISABLE_RTSP */ |
| + | #endif /* !CURL_DISABLE_RTSP */ |
| #ifdef USE_SSL | |
| static void set_ssl_options(struct ssl_config_data *ssl, | |
| @@ -583,7 +582,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option, | |
| else | |
| s->method = HTTPREQ_GET; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_HTTP */ |
| #ifndef CURL_DISABLE_PROXY | |
| case CURLOPT_HTTPPROXYTUNNEL: | |
| /* | |
| @@ -621,7 +620,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option, | |
| */ | |
| s->proxy_transfer_mode = enabled; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_PROXY */ |
| + | #endif /* !CURL_DISABLE_PROXY */ |
| #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) | |
| case CURLOPT_SOCKS5_GSSAPI_NEC: | |
| /* | |
| @@ -684,7 +683,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option, | |
| */ | |
| s->tftp_no_options = enabled; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_TFTP */ |
| + | #endif /* !CURL_DISABLE_TFTP */ |
| case CURLOPT_TRANSFERTEXT: | |
| /* | |
| * This option was previously named 'FTPASCII'. Renamed to work with | |
| @@ -727,7 +726,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option, | |
| s->doh_verifystatus = enabled; | |
| ok = 2; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_DOH */ |
| + | #endif /* !CURL_DISABLE_DOH */ |
| case CURLOPT_SSL_VERIFYHOST: | |
| /* | |
| * Enable verification of the hostname in the peer certificate | |
| @@ -790,7 +789,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option, | |
| case CURLOPT_SSH_COMPRESSION: | |
| s->ssh_compression = enabled; | |
| break; | |
| - | #endif /* ! USE_SSH */ |
| + | #endif /* !USE_SSH */ |
| #ifndef CURL_DISABLE_SMTP | |
| case CURLOPT_MAIL_RCPT_ALLOWFAILS: | |
| /* allow RCPT TO command to fail for some recipients */ | |
| @@ -983,7 +982,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| s->expect_100_timeout = (unsigned short)arg; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_HTTP */ |
| #ifndef CURL_DISABLE_MIME | |
| case CURLOPT_MIME_OPTIONS: | |
| @@ -1011,7 +1010,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| return CURLE_NOT_BUILT_IN; | |
| s->socks5auth = (unsigned char)uarg; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_PROXY */ |
| + | #endif /* !CURL_DISABLE_PROXY */ |
| #ifndef CURL_DISABLE_FTP | |
| case CURLOPT_FTP_FILEMETHOD: | |
| @@ -1032,14 +1031,14 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| break; | |
| case CURLOPT_ACCEPTTIMEOUT_MS: | |
| return setopt_set_timeout_ms(&s->accepttimeout, arg); | |
| - | #endif /* ! CURL_DISABLE_FTP */ |
| + | #endif /* !CURL_DISABLE_FTP */ |
| #if !defined(CURL_DISABLE_FTP) || defined(USE_SSH) | |
| case CURLOPT_FTP_CREATE_MISSING_DIRS: | |
| if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY)) | |
| return CURLE_BAD_FUNCTION_ARGUMENT; | |
| s->ftp_create_missing_dirs = (unsigned char)arg; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_FTP || USE_SSH */ |
| + | #endif /* !CURL_DISABLE_FTP || USE_SSH */ |
| case CURLOPT_INFILESIZE: | |
| if(arg < -1) | |
| return CURLE_BAD_FUNCTION_ARGUMENT; | |
| @@ -1198,7 +1197,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| data->state.rtsp_next_server_CSeq = arg; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_RTSP */ |
| + | #endif /* !CURL_DISABLE_RTSP */ |
| case CURLOPT_TCP_KEEPIDLE: | |
| result = value_range(&arg, 0, 0, INT_MAX); | |
| @@ -1254,7 +1253,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| else | |
| Curl_hsts_cleanup(&data->hsts); | |
| break; | |
| - | #endif /* ! CURL_DISABLE_HSTS */ |
| + | #endif /* !CURL_DISABLE_HSTS */ |
| #ifndef CURL_DISABLE_ALTSVC | |
| case CURLOPT_ALTSVC_CTRL: | |
| if(!arg) { | |
| @@ -1267,7 +1266,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| return Curl_altsvc_ctrl(data->asi, arg); | |
| - | #endif /* ! CURL_DISABLE_ALTSVC */ |
| + | #endif /* !CURL_DISABLE_ALTSVC */ |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| case CURLOPT_WS_OPTIONS: | |
| s->ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE); | |
| @@ -1406,8 +1405,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option, | |
| Curl_safefree(data->state.formp); | |
| data->state.mimepost = NULL; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_FORM_API */ |
| - | #endif /* ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_FORM_API */ |
| + | #endif /* !CURL_DISABLE_HTTP */ |
| #if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \ | |
| !defined(CURL_DISABLE_IMAP) | |
| # ifndef CURL_DISABLE_MIME | |
| @@ -1428,8 +1427,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option, | |
| #endif | |
| } | |
| break; | |
| - | #endif /* ! CURL_DISABLE_MIME */ |
| - | #endif /* ! disabled HTTP, SMTP or IMAP */ |
| + | #endif /* !CURL_DISABLE_MIME */ |
| + | #endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */ |
| case CURLOPT_STDERR: | |
| /* | |
| * Set to a FILE * that should receive all error writes. This | |
| @@ -1711,7 +1710,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| Curl_safefree(s->str[STRING_COPYPOSTFIELDS]); | |
| s->method = HTTPREQ_POST; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_HTTP || ! CURL_DISABLE_MQTT */ |
| + | #endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_MQTT */ |
| #ifndef CURL_DISABLE_HTTP | |
| case CURLOPT_ACCEPT_ENCODING: | |
| @@ -1795,7 +1794,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| return cookielist(data, ptr); | |
| #endif /* !CURL_DISABLE_COOKIES */ | |
| - | #endif /* ! CURL_DISABLE_HTTP */ |
| + | #endif /* !CURL_DISABLE_HTTP */ |
| case CURLOPT_CUSTOMREQUEST: | |
| /* | |
| @@ -2042,7 +2041,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| * proxy exception list | |
| */ | |
| return Curl_setstropt(&s->str[STRING_NOPROXY], ptr); | |
| - | #endif /* ! CURL_DISABLE_PROXY */ |
| + | #endif /* !CURL_DISABLE_PROXY */ |
| case CURLOPT_RANGE: | |
| /* | |
| @@ -2400,7 +2399,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| case CURLOPT_INTERLEAVEDATA: | |
| s->rtp_out = ptr; | |
| break; | |
| - | #endif /* ! CURL_DISABLE_RTSP */ |
| + | #endif /* !CURL_DISABLE_RTSP */ |
| #ifndef CURL_DISABLE_FTP | |
| case CURLOPT_CHUNK_DATA: | |
| s->wildcardptr = ptr; | |
| @@ -2518,7 +2517,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| } | |
| break; | |
| } | |
| - | #endif /* ! CURL_DISABLE_HSTS */ |
| + | #endif /* !CURL_DISABLE_HSTS */ |
| #ifndef CURL_DISABLE_ALTSVC | |
| case CURLOPT_ALTSVC: | |
| if(!data->asi) { | |
| @@ -2532,7 +2531,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| if(ptr) | |
| return Curl_altsvc_load(data->asi, ptr); | |
| break; | |
| - | #endif /* ! CURL_DISABLE_ALTSVC */ |
| + | #endif /* !CURL_DISABLE_ALTSVC */ |
| #ifdef USE_ECH | |
| case CURLOPT_ECH: { | |
| size_t plen = 0; | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "slist.h" | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) | |
| @@ -1112,9 +1111,9 @@ static CURLcode smb_request_state(struct Curl_easy *data, bool *done) | |
| next_state = SMB_CLOSE; | |
| break; | |
| } | |
| - | len = Curl_read16_le(((const unsigned char *)msg) + |
| + | len = Curl_read16_le((const unsigned char *)msg + |
| sizeof(struct smb_header) + 11); | |
| - | off = Curl_read16_le(((const unsigned char *)msg) + |
| + | off = Curl_read16_le((const unsigned char *)msg + |
| sizeof(struct smb_header) + 13); | |
| if(len > 0) { | |
| if(off + sizeof(unsigned int) + len > smbc->got) { | |
| @@ -1141,7 +1140,7 @@ static CURLcode smb_request_state(struct Curl_easy *data, bool *done) | |
| next_state = SMB_CLOSE; | |
| break; | |
| } | |
| - | len = Curl_read16_le(((const unsigned char *)msg) + |
| + | len = Curl_read16_le((const unsigned char *)msg + |
| sizeof(struct smb_header) + 5); | |
| data->req.bytecount += len; | |
| data->req.offset += len; | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \ | |
| (SIZEOF_CURL_OFF_T > 4) | |
| @@ -38,7 +38,6 @@ | |
| * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt> | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_SMTP | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| extern const struct Curl_handler Curl_handler_smtp; | |
| extern const struct Curl_handler Curl_handler_smtps; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| struct Curl_sockaddr_storage { | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "socketpair.h" | |
| @@ -221,14 +220,14 @@ int Curl_socketpair(int domain, int type, int protocol, | |
| goto error; | |
| if( | |
| #ifdef USE_WINSOCK | |
| - | /* This is how Windows does it */ |
| - | (SOCKEWOULDBLOCK == sockerr) |
| + | /* This is how Windows does it */ |
| + | (SOCKEWOULDBLOCK == sockerr) |
| #else | |
| - | /* errno may be EWOULDBLOCK or on some systems EAGAIN when it |
| - | returned due to its inability to send off data without |
| - | blocking. We therefore treat both error codes the same here */ |
| - | (SOCKEWOULDBLOCK == sockerr) || (EAGAIN == sockerr) || |
| - | (SOCKEINTR == sockerr) || (SOCKEINPROGRESS == sockerr) |
| + | /* errno may be EWOULDBLOCK or on some systems EAGAIN when it |
| + | returned due to its inability to send off data without |
| + | blocking. We therefore treat both error codes the same here */ |
| + | (SOCKEWOULDBLOCK == sockerr) || (EAGAIN == sockerr) || |
| + | (SOCKEINTR == sockerr) || (SOCKEINPROGRESS == sockerr) |
| #endif | |
| ) { | |
| continue; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_EVENTFD | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_PROXY | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_PROXY | |
| @@ -54,4 +53,4 @@ extern struct Curl_cftype Curl_cft_socks_proxy; | |
| #endif /* !CURL_DISABLE_PROXY */ | |
| - | #endif /* HEADER_CURL_SOCKS_H */ |
| + | #endif /* HEADER_CURL_SOCKS_H */ |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_PROXY) | |
| @@ -22,7 +22,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "curlx/timeval.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "strcase.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| char Curl_raw_toupper(char in); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef _WIN32 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "strcase.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_WINDOWS_SSPI | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_WINDOWS_SSPI | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef _WIN32 | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef _WIN32 | |
| @@ -41,8 +40,8 @@ typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(const char *); | |
| /* This is used instead of if_nametoindex if available on Windows */ | |
| extern IF_NAMETOINDEX_FN Curl_if_nametoindex; | |
| #endif | |
| - | #else /* _WIN32 */ |
| + | #else /* !_WIN32 */ |
| #define Curl_win32_init(x) CURLE_OK | |
| - | #endif /* !_WIN32 */ |
| + | #endif /* _WIN32 */ |
| #endif /* HEADER_CURL_SYSTEM_WIN32_H */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_TELNET | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifndef CURL_DISABLE_TFTP | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #define Curl_headersep(x) ((((x) == ':') || ((x) == ';'))) | |
| char *Curl_checkheaders(const struct Curl_easy *data, | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "uint-bset.h" | |
| @@ -186,7 +185,7 @@ uint32_t Curl_popcount64(uint64_t x) | |
| x -= (x >> 1) & m1; /* replace every 2 bits with bits present */ | |
| x = (x & m2) + ((x >> 2) & m2); /* replace every nibble with bits present */ | |
| x = (x + (x >> 4)) & m4; /* replace every byte with bits present */ | |
| - | /* top 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ... which makes the |
| + | /* top 8 bits of x + (x << 8) + (x << 16) + (x << 24) + ... which makes the |
| * top byte the sum of all individual 8 bytes, throw away the rest */ | |
| return (uint32_t)((x * h01) >> 56); | |
| } | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "uint-hash.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| /* A version with uint32_t as key */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "uint-bset.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "uint-table.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef HAVE_NETINET_IN_H | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #include "urldata.h" | |
| @@ -23,9 +23,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* This file is for lib internal stuff */ | |
| - | |
| #include "curl_setup.h" | |
| #define PORT_FTP 21 | |
| @@ -530,43 +528,45 @@ struct Curl_handler { | |
| }; | |
| #define PROTOPT_NONE 0 /* nothing extra */ | |
| - | #define PROTOPT_SSL (1<<0) /* uses SSL */ |
| - | #define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */ |
| - | #define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */ |
| + | #define PROTOPT_SSL (1 << 0) /* uses SSL */ |
| + | #define PROTOPT_DUAL (1 << 1) /* this protocol uses two connections */ |
| + | #define PROTOPT_CLOSEACTION (1 << 2) /* need action before socket close */ |
| /* some protocols will have to call the underlying functions without regard to | |
| what exact state the socket signals. IE even if the socket says "readable", | |
| the send function might need to be called while uploading, or vice versa. | |
| */ | |
| - | #define PROTOPT_DIRLOCK (1<<3) |
| - | #define PROTOPT_NONETWORK (1<<4) /* protocol does not use the network! */ |
| - | #define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it |
| + | #define PROTOPT_DIRLOCK (1 << 3) |
| + | #define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */ |
| + | #define PROTOPT_NEEDSPWD (1 << 5) /* needs a password, and if none is set it |
| gets a default */ | |
| - | #define PROTOPT_NOURLQUERY (1<<6) /* protocol cannot handle |
| - | URL query strings (?foo=bar) ! */ |
| - | #define PROTOPT_CREDSPERREQUEST (1<<7) /* requires login credentials per |
| - | request instead of per connection */ |
| - | #define PROTOPT_ALPN (1<<8) /* set ALPN for this */ |
| - | /* (1<<9) was PROTOPT_STREAM, now free */ |
| - | #define PROTOPT_URLOPTIONS (1<<10) /* allow options part in the userinfo field |
| - | of the URL */ |
| - | #define PROTOPT_PROXY_AS_HTTP (1<<11) /* allow this non-HTTP scheme over a |
| - | HTTP proxy as HTTP proxies may know |
| - | this protocol and act as a gateway */ |
| - | #define PROTOPT_WILDCARD (1<<12) /* protocol supports wildcard matching */ |
| - | #define PROTOPT_USERPWDCTRL (1<<13) /* Allow "control bytes" (< 32 ASCII) in |
| - | username and password */ |
| - | #define PROTOPT_NOTCPPROXY (1<<14) /* this protocol cannot proxy over TCP */ |
| - | #define PROTOPT_SSL_REUSE (1<<15) /* this protocol may reuse an existing |
| - | SSL connection in the same family |
| - | without having PROTOPT_SSL. */ |
| - | #define PROTOPT_CONN_REUSE (1<<16) /* this protocol can reuse connections */ |
| + | #define PROTOPT_NOURLQUERY (1 << 6) /* protocol cannot handle |
| + | URL query strings (?foo=bar) ! */ |
| + | #define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per |
| + | request instead of per |
| + | connection */ |
| + | #define PROTOPT_ALPN (1 << 8) /* set ALPN for this */ |
| + | /* (1 << 9) was PROTOPT_STREAM, now free */ |
| + | #define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo |
| + | field of the URL */ |
| + | #define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a |
| + | HTTP proxy as HTTP proxies may know |
| + | this protocol and act as |
| + | a gateway */ |
| + | #define PROTOPT_WILDCARD (1 << 12) /* protocol supports wildcard matching */ |
| + | #define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in |
| + | username and password */ |
| + | #define PROTOPT_NOTCPPROXY (1 << 14) /* this protocol cannot proxy over TCP */ |
| + | #define PROTOPT_SSL_REUSE (1 << 15) /* this protocol may reuse an existing |
| + | SSL connection in the same family |
| + | without having PROTOPT_SSL. */ |
| + | #define PROTOPT_CONN_REUSE (1 << 16) /* this protocol can reuse connections */ |
| #define CONNCHECK_NONE 0 /* No checks */ | |
| - | #define CONNCHECK_ISDEAD (1<<0) /* Check if the connection is dead. */ |
| - | #define CONNCHECK_KEEPALIVE (1<<1) /* Perform any keepalive function. */ |
| + | #define CONNCHECK_ISDEAD (1 << 0) /* Check if the connection is dead. */ |
| + | #define CONNCHECK_KEEPALIVE (1 << 1) /* Perform any keepalive function. */ |
| #define CONNRESULT_NONE 0 /* No extra information. */ | |
| - | #define CONNRESULT_DEAD (1<<0) /* The connection is dead. */ |
| + | #define CONNRESULT_DEAD (1 << 0) /* The connection is dead. */ |
| #define TRNSPRT_NONE 0 | |
| #define TRNSPRT_TCP 3 | |
| @@ -24,7 +24,6 @@ | |
| * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt> | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \ | |
| @@ -23,7 +23,6 @@ | |
| * RFC2195 CRAM-MD5 authentication | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifndef CURL_DISABLE_DIGEST_AUTH | |
| @@ -24,7 +24,6 @@ | |
| * RFC7616 DIGEST-SHA256, DIGEST-SHA512-256 authentication | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifndef CURL_DISABLE_DIGEST_AUTH | |
| @@ -586,16 +585,16 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, | |
| else if(curl_strequal(content, "SHA-512-256")) { | |
| #ifdef CURL_HAVE_SHA512_256 | |
| digest->algo = ALGO_SHA512_256; | |
| - | #else /* ! CURL_HAVE_SHA512_256 */ |
| + | #else /* !CURL_HAVE_SHA512_256 */ |
| return CURLE_NOT_BUILT_IN; | |
| - | #endif /* ! CURL_HAVE_SHA512_256 */ |
| + | #endif /* CURL_HAVE_SHA512_256 */ |
| } | |
| else if(curl_strequal(content, "SHA-512-256-SESS")) { | |
| #ifdef CURL_HAVE_SHA512_256 | |
| digest->algo = ALGO_SHA512_256SESS; | |
| - | #else /* ! CURL_HAVE_SHA512_256 */ |
| + | #else /* !CURL_HAVE_SHA512_256 */ |
| return CURLE_NOT_BUILT_IN; | |
| - | #endif /* ! CURL_HAVE_SHA512_256 */ |
| + | #endif /* CURL_HAVE_SHA512_256 */ |
| } | |
| else | |
| return CURLE_BAD_CONTENT_ENCODING; | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifndef CURL_DISABLE_DIGEST_AUTH | |
| @@ -24,7 +24,6 @@ | |
| * RFC2831 DIGEST-MD5 authentication | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_DIGEST_AUTH) | |
| @@ -23,7 +23,6 @@ | |
| * RFC5802 SCRAM-SHA-1 authentication | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_GSASL | |
| @@ -24,7 +24,6 @@ | |
| * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(HAVE_GSSAPI) && defined(USE_KERBEROS5) | |
| @@ -23,7 +23,6 @@ | |
| * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_WINDOWS_SSPI) && defined(USE_KERBEROS5) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) | |
| @@ -48,86 +47,86 @@ | |
| /* Flag bits definitions based on | |
| https://davenport.sourceforge.net/ntlm.html */ | |
| - | #define NTLMFLAG_NEGOTIATE_UNICODE (1<<0) |
| + | #define NTLMFLAG_NEGOTIATE_UNICODE (1 << 0) |
| /* Indicates that Unicode strings are supported for use in security buffer | |
| data. */ | |
| - | #define NTLMFLAG_NEGOTIATE_OEM (1<<1) |
| + | #define NTLMFLAG_NEGOTIATE_OEM (1 << 1) |
| /* Indicates that OEM strings are supported for use in security buffer data. */ | |
| - | #define NTLMFLAG_REQUEST_TARGET (1<<2) |
| + | #define NTLMFLAG_REQUEST_TARGET (1 << 2) |
| /* Requests that the server's authentication realm be included in the Type 2 | |
| message. */ | |
| - | /* unknown (1<<3) */ |
| - | #define NTLMFLAG_NEGOTIATE_SIGN (1<<4) |
| + | /* unknown (1 << 3) */ |
| + | #define NTLMFLAG_NEGOTIATE_SIGN (1 << 4) |
| /* Specifies that authenticated communication between the client and server | |
| should carry a digital signature (message integrity). */ | |
| - | #define NTLMFLAG_NEGOTIATE_SEAL (1<<5) |
| + | #define NTLMFLAG_NEGOTIATE_SEAL (1 << 5) |
| /* Specifies that authenticated communication between the client and server | |
| should be encrypted (message confidentiality). */ | |
| - | #define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE (1<<6) |
| + | #define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE (1 << 6) |
| /* Indicates that datagram authentication is being used. */ | |
| - | #define NTLMFLAG_NEGOTIATE_LM_KEY (1<<7) |
| + | #define NTLMFLAG_NEGOTIATE_LM_KEY (1 << 7) |
| /* Indicates that the LAN Manager session key should be used for signing and | |
| sealing authenticated communications. */ | |
| - | #define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9) |
| + | #define NTLMFLAG_NEGOTIATE_NTLM_KEY (1 << 9) |
| /* Indicates that NTLM authentication is being used. */ | |
| - | /* unknown (1<<10) */ |
| + | /* unknown (1 << 10) */ |
| - | #define NTLMFLAG_NEGOTIATE_ANONYMOUS (1<<11) |
| + | #define NTLMFLAG_NEGOTIATE_ANONYMOUS (1 << 11) |
| /* Sent by the client in the Type 3 message to indicate that an anonymous | |
| context has been established. This also affects the response fields. */ | |
| - | #define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED (1<<12) |
| + | #define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED (1 << 12) |
| /* Sent by the client in the Type 1 message to indicate that a desired | |
| authentication realm is included in the message. */ | |
| - | #define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED (1<<13) |
| + | #define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED (1 << 13) |
| /* Sent by the client in the Type 1 message to indicate that the client | |
| workstation's name is included in the message. */ | |
| - | #define NTLMFLAG_NEGOTIATE_LOCAL_CALL (1<<14) |
| + | #define NTLMFLAG_NEGOTIATE_LOCAL_CALL (1 << 14) |
| /* Sent by the server to indicate that the server and client are on the same | |
| machine. Implies that the client may use a pre-established local security | |
| context rather than responding to the challenge. */ | |
| - | #define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1<<15) |
| + | #define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1 << 15) |
| /* Indicates that authenticated communication between the client and server | |
| should be signed with a "dummy" signature. */ | |
| - | #define NTLMFLAG_TARGET_TYPE_DOMAIN (1<<16) |
| + | #define NTLMFLAG_TARGET_TYPE_DOMAIN (1 << 16) |
| /* Sent by the server in the Type 2 message to indicate that the target | |
| authentication realm is a domain. */ | |
| - | #define NTLMFLAG_TARGET_TYPE_SERVER (1<<17) |
| + | #define NTLMFLAG_TARGET_TYPE_SERVER (1 << 17) |
| /* Sent by the server in the Type 2 message to indicate that the target | |
| authentication realm is a server. */ | |
| - | #define NTLMFLAG_TARGET_TYPE_SHARE (1<<18) |
| + | #define NTLMFLAG_TARGET_TYPE_SHARE (1 << 18) |
| /* Sent by the server in the Type 2 message to indicate that the target | |
| authentication realm is a share. Presumably, this is for share-level | |
| authentication. Usage is unclear. */ | |
| - | #define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1<<19) |
| + | #define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1 << 19) |
| /* Indicates that the NTLM2 signing and sealing scheme should be used for | |
| protecting authenticated communications. */ | |
| - | #define NTLMFLAG_REQUEST_INIT_RESPONSE (1<<20) |
| + | #define NTLMFLAG_REQUEST_INIT_RESPONSE (1 << 20) |
| /* unknown purpose */ | |
| - | #define NTLMFLAG_REQUEST_ACCEPT_RESPONSE (1<<21) |
| + | #define NTLMFLAG_REQUEST_ACCEPT_RESPONSE (1 << 21) |
| /* unknown purpose */ | |
| - | #define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1<<22) |
| + | #define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1 << 22) |
| /* unknown purpose */ | |
| - | #define NTLMFLAG_NEGOTIATE_TARGET_INFO (1<<23) |
| + | #define NTLMFLAG_NEGOTIATE_TARGET_INFO (1 << 23) |
| /* Sent by the server in the Type 2 message to indicate that it is including a | |
| Target Information block in the message. */ | |
| @@ -137,14 +136,14 @@ | |
| /* unknown (1<27) */ | |
| /* unknown (1<28) */ | |
| - | #define NTLMFLAG_NEGOTIATE_128 (1<<29) |
| + | #define NTLMFLAG_NEGOTIATE_128 (1 << 29) |
| /* Indicates that 128-bit encryption is supported. */ | |
| - | #define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE (1<<30) |
| + | #define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE (1 << 30) |
| /* Indicates that the client will provide an encrypted master key in | |
| the "Session Key" field of the Type 3 message. */ | |
| - | #define NTLMFLAG_NEGOTIATE_56 (1<<31) |
| + | #define NTLMFLAG_NEGOTIATE_56 (1 << 31) |
| /* Indicates that 56-bit encryption is supported. */ | |
| /* "NTLMSSP" signature is always in ASCII regardless of the platform */ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_WINDOWS_SSPI) && defined(USE_NTLM) | |
| @@ -23,7 +23,6 @@ | |
| * RFC6749 OAuth 2.0 Authorization Framework | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \ | |
| @@ -23,7 +23,6 @@ | |
| * RFC4178 Simple and Protected GSS-API Negotiation Mechanism | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(HAVE_GSSAPI) && defined(USE_SPNEGO) | |
| @@ -23,7 +23,6 @@ | |
| * RFC4178 Simple and Protected GSS-API Negotiation Mechanism | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "vauth.h" | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "../bufref.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "curl_setup.h" | |
| #ifdef USE_NGHTTP2 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGTCP2) && defined(USE_NGHTTP3) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGTCP2) && defined(USE_NGHTTP3) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_OPENSSL_QUIC) && \ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_OPENSSL_QUIC) && \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_QUICHE) | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_QUICHE) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_HTTP3) && \ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_HTTP3) && \ | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef HAVE_NETINET_UDP_H | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) | |
| @@ -23,8 +23,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| + | |
| #include "../bufq.h" | |
| #ifdef USE_HTTP3 | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_LIBSSH | |
| @@ -21,13 +21,12 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| - | /* #define CURL_LIBSSH2_DEBUG */ |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_LIBSSH2 | |
| + | /* #define CURL_LIBSSH2_DEBUG */ |
| + | |
| #ifdef HAVE_NETINET_IN_H | |
| #include <netinet/in.h> | |
| #endif | |
| @@ -167,7 +166,7 @@ static void kbd_callback(const char *name, int name_len, | |
| (void)name_len; | |
| (void)instruction; | |
| (void)instruction_len; | |
| - | #endif /* CURL_LIBSSH2_DEBUG */ |
| + | #endif /* CURL_LIBSSH2_DEBUG */ |
| if(num_prompts == 1) { | |
| struct connectdata *conn = data->conn; | |
| responses[0].text = curlx_strdup(conn->passwd); | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_LIBSSH2 | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl AND ISC | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_SSH | |
| @@ -239,4 +238,4 @@ CURLcode Curl_ssh_range(struct Curl_easy *data, | |
| return CURLE_OK; | |
| } | |
| - | #endif /* if SSH is used */ |
| + | #endif /* USE_SSH */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #include "../urldata.h" | |
| @@ -37,4 +36,5 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, const char *homedir); | |
| CURLcode Curl_ssh_range(struct Curl_easy *data, | |
| const char *range, curl_off_t filesize, | |
| curl_off_t *startp, curl_off_t *sizep); | |
| + | |
| #endif /* HEADER_CURL_PATH_H */ | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_APPLE_SECTRUST | |
| @@ -24,6 +24,7 @@ | |
| #include "../curl_setup.h" | |
| #if defined(USE_MBEDTLS) || defined(USE_RUSTLS) | |
| + | |
| #include "cipher_suite.h" | |
| /* | |
| @@ -130,24 +131,24 @@ enum { | |
| CS_TXT_LEN, | |
| }; | |
| - | #define CS_ZIP_IDX(a, b, c, d, e, f, g, h) \ |
| - | { \ |
| - | (uint8_t) ((((a) << 2) & 0xFF) | ((b) & 0x3F) >> 4), \ |
| - | (uint8_t) ((((b) << 4) & 0xFF) | ((c) & 0x3F) >> 2), \ |
| - | (uint8_t) ((((c) << 6) & 0xFF) | ((d) & 0x3F)), \ |
| - | (uint8_t) ((((e) << 2) & 0xFF) | ((f) & 0x3F) >> 4), \ |
| - | (uint8_t) ((((f) << 4) & 0xFF) | ((g) & 0x3F) >> 2), \ |
| - | (uint8_t) ((((g) << 6) & 0xFF) | ((h) & 0x3F)) \ |
| + | #define CS_ZIP_IDX(a, b, c, d, e, f, g, h) \ |
| + | { \ |
| + | (uint8_t)((((a) << 2) & 0xFF) | ((b) & 0x3F) >> 4), \ |
| + | (uint8_t)((((b) << 4) & 0xFF) | ((c) & 0x3F) >> 2), \ |
| + | (uint8_t)((((c) << 6) & 0xFF) | ((d) & 0x3F)), \ |
| + | (uint8_t)((((e) << 2) & 0xFF) | ((f) & 0x3F) >> 4), \ |
| + | (uint8_t)((((f) << 4) & 0xFF) | ((g) & 0x3F) >> 2), \ |
| + | (uint8_t)((((g) << 6) & 0xFF) | ((h) & 0x3F)) \ |
| } | |
| - | #define CS_ENTRY(id, a, b, c, d, e, f, g, h) \ |
| - | { \ |
| - | id, \ |
| - | CS_ZIP_IDX( \ |
| - | CS_TXT_IDX_ ## a, CS_TXT_IDX_ ## b, \ |
| - | CS_TXT_IDX_ ## c, CS_TXT_IDX_ ## d, \ |
| - | CS_TXT_IDX_ ## e, CS_TXT_IDX_ ## f, \ |
| - | CS_TXT_IDX_ ## g, CS_TXT_IDX_ ## h \ |
| - | ) \ |
| + | #define CS_ENTRY(id, a, b, c, d, e, f, g, h) \ |
| + | { \ |
| + | id, \ |
| + | CS_ZIP_IDX( \ |
| + | CS_TXT_IDX_ ## a, CS_TXT_IDX_ ## b, \ |
| + | CS_TXT_IDX_ ## c, CS_TXT_IDX_ ## d, \ |
| + | CS_TXT_IDX_ ## e, CS_TXT_IDX_ ## f, \ |
| + | CS_TXT_IDX_ ## g, CS_TXT_IDX_ ## h \ |
| + | ) \ |
| } | |
| struct cs_entry { | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_MBEDTLS) || defined(USE_RUSTLS) | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for all GnuTLS-specific code for the TLS/SSL layer. No code | |
| * but vtls.c should ever call or use these functions. | |
| @@ -29,7 +28,6 @@ | |
| * Note: do not use the GnuTLS' *_t variable type names in this source code, | |
| * since they were not present in 1.0.X. | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_GNUTLS | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_GNUTLS | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_OPENSSL) || defined(USE_SCHANNEL) | |
| @@ -125,4 +124,4 @@ bool Curl_cert_hostcheck(const char *match, size_t matchlen, | |
| return FALSE; | |
| } | |
| - | #endif /* OPENSSL or SCHANNEL */ |
| + | #endif /* USE_OPENSSL || USE_SCHANNEL */ |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_OPENSSL) || defined(USE_SCHANNEL) | |
| @@ -144,4 +144,4 @@ bool Curl_tls_keylog_write(const char *label, | |
| return TRUE; | |
| } | |
| - | #endif /* TLS or QUIC backend */ |
| + | #endif /* TLS or QUIC backend */ |
| @@ -22,13 +22,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for all mbedTLS-specific code for the TLS/SSL layer. No code | |
| * but vtls.c should ever call or use these functions. | |
| * | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_MBEDTLS | |
| @@ -21,12 +21,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for all OpenSSL-specific code for the TLS/SSL layer. No code | |
| * but vtls.c should ever call or use these functions. | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_QUICHE) || defined(USE_OPENSSL) | |
| @@ -518,7 +516,7 @@ static CURLcode ossl_certchain(struct Curl_easy *data, SSL *ssl) | |
| return result; | |
| } | |
| - | #endif /* quiche or OpenSSL */ |
| + | #endif /* USE_QUICHE || USE_OPENSSL */ |
| #ifdef USE_OPENSSL | |
| @@ -4656,7 +4654,7 @@ out: | |
| curlx_dyn_free(&dname); | |
| return result; | |
| } | |
| - | #endif /* ! CURL_DISABLE_VERBOSE_STRINGS */ |
| + | #endif /* !CURL_DISABLE_VERBOSE_STRINGS */ |
| #ifdef USE_APPLE_SECTRUST | |
| struct ossl_certs_ctx { | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_OPENSSL | |
| @@ -5,8 +5,7 @@ | |
| * | (__| |_| | _ <| |___ | |
| * \___|\___/|_| \_\_____| | |
| * | |
| - | * Copyright (C) Jacob Hoffman-Andrews, |
| - | * <[email protected]> |
| + | * Copyright (C) Jacob Hoffman-Andrews, <[email protected]> |
| * Copyright (C) kpcyrd, <[email protected]> | |
| * Copyright (C) Daniel McCarney, <[email protected]> | |
| * | |
| @@ -1,3 +1,5 @@ | |
| + | #ifndef HEADER_CURL_RUSTLS_H |
| + | #define HEADER_CURL_RUSTLS_H |
| /*************************************************************************** | |
| * _ _ ____ _ | |
| * Project ___| | | | _ \| | | |
| @@ -5,8 +7,7 @@ | |
| * | (__| |_| | _ <| |___ | |
| * \___|\___/|_| \_\_____| | |
| * | |
| - | * Copyright (C) Jacob Hoffman-Andrews, |
| - | * <[email protected]> |
| + | * Copyright (C) Jacob Hoffman-Andrews, <[email protected]> |
| * | |
| * This software is licensed as described in the file COPYING, which | |
| * you should have received as part of this distribution. The terms | |
| @@ -22,9 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #ifndef HEADER_CURL_RUSTLS_H |
| - | #define HEADER_CURL_RUSTLS_H |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_RUSTLS | |
| @@ -23,12 +23,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for all Schannel-specific code for the TLS/SSL layer. No code | |
| * but vtls.c should ever call or use these functions. | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_SCHANNEL | |
| @@ -23,12 +23,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for Schannel-specific certificate verification. This code should | |
| * only be invoked by code in schannel.c. | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_SCHANNEL | |
| @@ -32,24 +32,22 @@ struct Curl_cfilter; | |
| struct Curl_easy; | |
| struct dynbuf; | |
| - | #define SSLSUPP_CA_PATH (1<<0) /* supports CAPATH */ |
| - | #define SSLSUPP_CERTINFO (1<<1) /* supports CURLOPT_CERTINFO */ |
| - | #define SSLSUPP_PINNEDPUBKEY (1<<2) /* supports CURLOPT_PINNEDPUBLICKEY */ |
| - | #define SSLSUPP_SSL_CTX (1<<3) /* supports CURLOPT_SSL_CTX */ |
| - | #define SSLSUPP_HTTPS_PROXY (1<<4) /* supports access via HTTPS proxies */ |
| - | #define SSLSUPP_TLS13_CIPHERSUITES (1<<5) /* supports TLS 1.3 ciphersuites */ |
| - | #define SSLSUPP_CAINFO_BLOB (1<<6) |
| - | #define SSLSUPP_ECH (1<<7) |
| - | #define SSLSUPP_CA_CACHE (1<<8) |
| - | #define SSLSUPP_CIPHER_LIST (1<<9) /* supports TLS 1.0-1.2 ciphersuites */ |
| - | #define SSLSUPP_SIGNATURE_ALGORITHMS (1<<10) /* supports TLS sigalgs */ |
| + | #define SSLSUPP_CA_PATH (1 << 0) /* supports CAPATH */ |
| + | #define SSLSUPP_CERTINFO (1 << 1) /* supports CURLOPT_CERTINFO */ |
| + | #define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */ |
| + | #define SSLSUPP_SSL_CTX (1 << 3) /* supports CURLOPT_SSL_CTX */ |
| + | #define SSLSUPP_HTTPS_PROXY (1 << 4) /* supports access via HTTPS proxies */ |
| + | #define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */ |
| + | #define SSLSUPP_CAINFO_BLOB (1 << 6) |
| + | #define SSLSUPP_ECH (1 << 7) |
| + | #define SSLSUPP_CA_CACHE (1 << 8) |
| + | #define SSLSUPP_CIPHER_LIST (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */ |
| + | #define SSLSUPP_SIGNATURE_ALGORITHMS (1 << 10) /* supports TLS sigalgs */ |
| #ifdef USE_ECH | |
| # include "../curlx/base64.h" | |
| # define ECH_ENABLED(__data__) \ | |
| - | (__data__->set.tls_ech && \ |
| - | !(__data__->set.tls_ech & CURLECH_DISABLE)\ |
| - | ) |
| + | (__data__->set.tls_ech && !(__data__->set.tls_ech & CURLECH_DISABLE)) |
| #endif /* USE_ECH */ | |
| #define ALPN_ACCEPTED "ALPN: server accepted " | |
| @@ -96,7 +94,7 @@ CURLsslset Curl_init_sslset_nolock(curl_sslbackend id, const char *name, | |
| const curl_ssl_backend ***avail); | |
| #ifndef MAX_PINNED_PUBKEY_SIZE | |
| - | #define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */ |
| + | #define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1 MiB */ |
| #endif | |
| curl_sslbackend Curl_ssl_backend(void); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_SSL | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "../curl_setup.h" | |
| + | |
| #include "../cfilters.h" | |
| #include "../urldata.h" | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_SSL) && defined(USE_SSLS_EXPORT) | |
| @@ -21,13 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * Source file for all wolfSSL specific code for the TLS/SSL layer. No code | |
| * but vtls.c should ever call or use these functions. | |
| * | |
| */ | |
| - | |
| #include "../curl_setup.h" | |
| #ifdef USE_WOLFSSL | |
| @@ -1712,7 +1710,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf, struct Curl_easy *data) | |
| wolfSSL_FreeArrays(wssl->ssl); | |
| } | |
| } | |
| - | #endif /* OPENSSL_EXTRA */ |
| + | #endif /* OPENSSL_EXTRA */ |
| detail = wolfSSL_get_error(wssl->ssl, ret); | |
| CURL_TRC_CF(data, cf, "wolfSSL_connect() -> %d, detail=%d", ret, detail); | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \ | |
| @@ -1260,5 +1259,5 @@ done: | |
| #endif /* WANT_EXTRACT_CERTINFO */ | |
| - | #endif /* USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL or USE_MBEDTLS or |
| + | #endif /* USE_GNUTLS || USE_WOLFSSL || USE_SCHANNEL || USE_MBEDTLS || |
| USE_RUSTLS */ | |
| @@ -24,7 +24,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "../curl_setup.h" | |
| #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \ | |
| @@ -87,9 +86,9 @@ CURLcode Curl_x509_GTime2str(struct dynbuf *store, | |
| /* used by unit1657.c */ | |
| CURLcode Curl_x509_getASN1Element(struct Curl_asn1Element *elem, | |
| const char *beg, const char *end); | |
| - | #endif |
| - | #endif |
| + | #endif /* USE_GNUTLS || USE_SCHANNEL || USE_MBEDTLS || RUSTLS */ |
| + | #endif /* UNITTESTS */ |
| - | #endif /* USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL or USE_MBEDTLS or |
| + | #endif /* USE_GNUTLS || USE_WOLFSSL || USE_SCHANNEL || USE_MBEDTLS || |
| USE_RUSTLS */ | |
| #endif /* HEADER_CURL_X509ASN1_H */ | |
| @@ -1088,6 +1088,7 @@ sub listhelp { | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_help.h" | |
| /* | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| /* | |
| * The purpose of this tool is to figure out which, if any, features that are | |
| * disabled which should otherwise exist and work. These are not visible in | |
| @@ -30,13 +29,14 @@ | |
| * Disabled protocols are visible in curl_version_info() and are not included | |
| * in this table. | |
| */ | |
| - | |
| #include "curl_setup.h" | |
| + | |
| #include "multihandle.h" /* for ENABLE_WAKEUP */ | |
| #include "tool_xattr.h" /* for USE_XATTR */ | |
| #include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */ | |
| #include "asyn.h" /* for CURLRES_ARES */ | |
| #include "fake_addrinfo.h" /* for USE_FAKE_GETADDRINFO */ | |
| + | |
| #include <stdio.h> | |
| static const char *disabled[] = { | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "tool_setup.h" | |
| #ifndef CURL_DISABLE_LIBCURL_OPTION | |
| @@ -23,8 +23,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "tool_setup.h" | |
| + | |
| #ifndef CURL_DISABLE_LIBCURL_OPTION | |
| /* linked-list structure with last node cache for easysrc */ | |
| @@ -23,8 +23,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_sdecls.h" | |
| #include "tool_urlglob.h" | |
| #include "var.h" | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #ifndef CURL_DISABLE_LIBCURL_OPTION | |
| /* global variable declarations, for easy-interface source code generation */ | |
| @@ -27,9 +27,8 @@ | |
| #ifndef CURL_DISABLE_IPFS | |
| #define MAX_GATEWAY_URL_LEN 10000 | |
| - | |
| CURLcode ipfs_url_rewrite(CURLU *uh, const char *protocol, char **url, | |
| struct OperationConfig *config); | |
| + | #endif |
| #endif /* HEADER_CURL_TOOL_IPFS_H */ | |
| - | #endif /* !CURL_DISABLE_IPFS */ |
| @@ -22,6 +22,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_help.h" | |
| /* | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_cfgable.h" | |
| void warnf(const char *fmt, ...) CURL_PRINTF(1, 2); | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_cb_hdr.h" | |
| #include "tool_cb_prg.h" | |
| #include "tool_sdecls.h" | |
| @@ -22,8 +22,8 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| - | #include "tool_operate.h" |
| + | #include "tool_operate.h" |
| #include "tool_cfgable.h" | |
| #include "tool_doswin.h" | |
| #include "tool_operhlp.h" | |
| @@ -22,6 +22,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_operate.h" | |
| #include "tool_progress.h" | |
| @@ -103,7 +103,7 @@ int tool_ftruncate64(int fd, curl_off_t where); | |
| #define HAVE_FTRUNCATE 1 | |
| #define USE_TOOL_FTRUNCATE 1 | |
| - | #endif /* ! HAVE_FTRUNCATE */ |
| + | #endif /* !HAVE_FTRUNCATE */ |
| #endif /* _WIN32 */ | |
| #endif /* HEADER_CURL_TOOL_SETUP_H */ | |
| @@ -21,8 +21,8 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_stderr.h" | |
| #include "tool_msgs.h" | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_cfgable.h" | |
| void tool_init_stderr(void); | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_operate.h" | |
| typedef enum { | |
| @@ -24,6 +24,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_writeout.h" | |
| int jsonquoted(const char *in, size_t len, struct dynbuf *out, bool lowercase); | |
| @@ -22,6 +22,7 @@ | |
| * | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| + | |
| #include "tool_xattr.h" | |
| #ifdef USE_XATTR | |
| @@ -23,7 +23,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "tool_getparam.h" | |
| struct tool_var { | |
| @@ -2652,7 +2652,7 @@ sub PORT_ftp { | |
| sendcontrol "500 silly you, go away\r\n"; | |
| return; | |
| } | |
| - | $port = ($5<<8)+$6; |
| + | $port = ($5 << 8) + $6; |
| $addr = "$1.$2.$3.$4"; | |
| } | |
| # EPRT |2|::1|49706| | |
| @@ -26,7 +26,7 @@ | |
| static size_t print_httppost_callback(void *arg, const char *buf, size_t len) | |
| { | |
| fwrite(buf, len, 1, stdout); | |
| - | (*(size_t *)arg) += len; |
| + | *((size_t *)arg) += len; |
| return len; | |
| } | |
| @@ -33,7 +33,6 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| NULL | |
| }; | |
| static int ix = 0; | |
| - | (void)nmemb; |
| (void)stream; | |
| if(chunks[ix]) { | |
| size_t len = strlen(chunks[ix]); | |
| @@ -36,4 +36,4 @@ char *tutil_suburl(const char *base, int i); | |
| void tutil_rlim2str(char *buf, size_t len, rlim_t val); | |
| #endif | |
| - | #endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */ |
| + | #endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */ |
| @@ -541,7 +541,7 @@ static CURLcode test_unit1658(const char *arg) | |
| UNITTEST_END(curl_global_cleanup()) | |
| } | |
| - | #else /* CURL_DISABLE_DOH or not HTTPSRR enabled */ |
| + | #else /* CURL_DISABLE_DOH || !USE_HTTPSRR */ |
| static CURLcode test_unit1658(const char *arg) | |
| { | |