mirror of
https://github.com/curl/curl.git
synced 2026-08-04 14:06:15 +03:00
tidy-up: miscellaneous
- drop stray duplicate empty lines in docs, scripts, test data, include, examples, tests. - drop duplicate PP parenthesis. - curl-functions.m4: move literals to the right side in if expressions, to match rest of the source code. - FAQ.md: delete language designator from an URL. - packages: apply clang-format (OS400, VMS). - scripts/schemetable.c: apply clang-format. - data320: delete duplicate empty line that doesn't change the outcome. - spacecheck: extend to check for duplicate empty lines (with exceptions.) - fix whitespace nits Closes #19936
This commit is contained in:
parent
141ce4be64
commit
fe8393d7db
116 changed files with 674 additions and 1039 deletions
|
|
@ -229,7 +229,6 @@ struct curl_httppost {
|
|||
set. Added in 7.46.0 */
|
||||
};
|
||||
|
||||
|
||||
/* This is a return code for the progress callback that, when returned, will
|
||||
signal libcurl to continue executing the default progress function */
|
||||
#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
|
||||
|
|
@ -844,7 +843,7 @@ typedef enum {
|
|||
#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 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 */
|
||||
|
|
@ -916,7 +915,6 @@ typedef int
|
|||
/* return CURLE_OK to accept */
|
||||
/* or something else to refuse */
|
||||
|
||||
|
||||
/* parameter for the CURLOPT_USE_SSL option */
|
||||
#define CURLUSESSL_NONE 0L /* do not attempt to use SSL */
|
||||
#define CURLUSESSL_TRY 1L /* try using SSL, proceed anyway otherwise */
|
||||
|
|
@ -1115,7 +1113,6 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
|
|||
/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
|
||||
string options from the header file */
|
||||
|
||||
|
||||
#define CURLOPT(na,t,nu) na = t + nu
|
||||
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
|
||||
|
||||
|
|
@ -1874,9 +1871,7 @@ typedef enum {
|
|||
|
||||
libcurl will ask for the compressed methods it knows of, and if that
|
||||
is not any, it will not ask for transfer-encoding at all even if this
|
||||
option is set to 1.
|
||||
|
||||
*/
|
||||
option is set to 1. */
|
||||
CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
|
||||
|
||||
/* Callback function for closing socket (instead of close(2)). The callback
|
||||
|
|
@ -2294,10 +2289,9 @@ typedef enum {
|
|||
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
|
||||
#endif
|
||||
|
||||
|
||||
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
|
||||
name resolves addresses using more than one IP protocol version, this
|
||||
option might be handy to force libcurl to use a specific IP version. */
|
||||
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
|
||||
name resolves addresses using more than one IP protocol version, this
|
||||
option might be handy to force libcurl to use a specific IP version. */
|
||||
#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
|
||||
versions that your system allows */
|
||||
#define CURL_IPRESOLVE_V4 1L /* uses only IPv4 addresses/connections */
|
||||
|
|
@ -2381,7 +2375,7 @@ enum CURL_NETRC_OPTION {
|
|||
#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
|
||||
#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
|
||||
|
||||
/* never use, keep last */
|
||||
/* never use, keep last */
|
||||
#define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
|
||||
|
||||
#define CURL_TLSAUTH_NONE 0L
|
||||
|
|
@ -2403,7 +2397,7 @@ enum CURL_TLSAUTH {
|
|||
#define CURL_REDIR_POST_302 2L
|
||||
#define CURL_REDIR_POST_303 4L
|
||||
#define CURL_REDIR_POST_ALL \
|
||||
(CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
|
||||
(CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303)
|
||||
|
||||
#define CURL_TIMECOND_NONE 0L
|
||||
#define CURL_TIMECOND_IFMODSINCE 1L
|
||||
|
|
@ -2418,7 +2412,7 @@ typedef enum {
|
|||
} curl_TimeCond;
|
||||
|
||||
/* Special size_t value signaling a null-terminated string. */
|
||||
#define CURL_ZERO_TERMINATED ((size_t) -1)
|
||||
#define CURL_ZERO_TERMINATED ((size_t)-1)
|
||||
|
||||
/* curl_strequal() and curl_strnequal() are subject for removal in a future
|
||||
release */
|
||||
|
|
@ -2705,7 +2699,6 @@ CURL_EXTERN char *curl_easy_escape(CURL *handle,
|
|||
CURL_EXTERN char *curl_escape(const char *string,
|
||||
int length);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_unescape()
|
||||
*
|
||||
|
|
@ -2743,10 +2736,9 @@ CURL_EXTERN void curl_free(void *p);
|
|||
*
|
||||
* curl_global_init() should be invoked exactly once for each application that
|
||||
* uses libcurl and before any call of other libcurl functions.
|
||||
|
||||
*
|
||||
* This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
|
||||
* curl_version_info_data.features flag (fetch by curl_version_info()).
|
||||
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_global_init(long flags);
|
||||
|
||||
|
|
@ -2787,10 +2779,9 @@ CURL_EXTERN void curl_global_cleanup(void);
|
|||
*
|
||||
* curl_global_trace() can be invoked at application start to
|
||||
* configure which components in curl should participate in tracing.
|
||||
|
||||
*
|
||||
* This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
|
||||
* curl_version_info_data.features flag (fetch by curl_version_info()).
|
||||
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_global_trace(const char *config);
|
||||
|
||||
|
|
@ -3017,12 +3008,11 @@ typedef enum {
|
|||
|
||||
#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_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)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Setup defines, protos etc for the sharing stuff.
|
||||
*/
|
||||
|
|
@ -3060,7 +3050,6 @@ typedef void (*curl_unlock_function)(CURL *handle,
|
|||
curl_lock_data data,
|
||||
void *userptr);
|
||||
|
||||
|
||||
typedef enum {
|
||||
CURLSHE_OK, /* all is fine */
|
||||
CURLSHE_BAD_OPTION, /* 1 */
|
||||
|
|
@ -3264,8 +3253,8 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
|||
#define CURLPAUSE_SEND (1<<2)
|
||||
#define CURLPAUSE_SEND_CONT (0)
|
||||
|
||||
#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
|
||||
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
|
||||
#define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
|
||||
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
|
||||
|
||||
/*
|
||||
* NAME curl_easy_ssls_import()
|
||||
|
|
@ -3310,7 +3299,6 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
|
|||
curl_ssls_export_cb *export_fn,
|
||||
void *userptr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl);
|
|||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_duphandle()
|
||||
*
|
||||
|
|
@ -108,7 +107,6 @@ CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
|
|||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
|
||||
size_t buflen, size_t *n);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_upkeep()
|
||||
*
|
||||
|
|
|
|||
|
|
@ -136,25 +136,25 @@ CURL_EXTERN CURLM *curl_multi_init(void);
|
|||
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_remove_handle()
|
||||
*
|
||||
* Desc: removes a curl handle from the multi stack again
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
/*
|
||||
* Name: curl_multi_remove_handle()
|
||||
*
|
||||
* Desc: removes a curl handle from the multi stack again
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_fdset()
|
||||
*
|
||||
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
|
||||
* poll() on. We want curl_multi_perform() called as soon as one of
|
||||
* them are ready.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
/*
|
||||
* Name: curl_multi_fdset()
|
||||
*
|
||||
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
|
||||
* poll() on. We want curl_multi_perform() called as soon as one of
|
||||
* them are ready.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||
fd_set *read_fd_set,
|
||||
fd_set *write_fd_set,
|
||||
|
|
@ -198,35 +198,35 @@ CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
|
|||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_perform()
|
||||
*
|
||||
* Desc: When the app thinks there is data available for curl it calls this
|
||||
* function to read/write whatever there is right now. This returns
|
||||
* as soon as the reads and writes are done. This function does not
|
||||
* require that there actually is data available for reading or that
|
||||
* data can be written, it can be called just in case. It returns
|
||||
* the number of handles that still transfer data in the second
|
||||
* argument's integer-pointer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
|
||||
* returns errors etc regarding the whole multi stack. There might
|
||||
* still have occurred problems on individual transfers even when
|
||||
* this returns OK.
|
||||
*/
|
||||
/*
|
||||
* Name: curl_multi_perform()
|
||||
*
|
||||
* Desc: When the app thinks there is data available for curl it calls this
|
||||
* function to read/write whatever there is right now. This returns
|
||||
* as soon as the reads and writes are done. This function does not
|
||||
* require that there actually is data available for reading or that
|
||||
* data can be written, it can be called just in case. It returns
|
||||
* the number of handles that still transfer data in the second
|
||||
* argument's integer-pointer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
|
||||
* returns errors etc regarding the whole multi stack. There might
|
||||
* still have occurred problems on individual transfers even when
|
||||
* this returns OK.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
|
||||
int *running_handles);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_cleanup()
|
||||
*
|
||||
* Desc: Cleans up and removes a whole multi stack. It does not free or
|
||||
* touch any individual easy handles in any way. We need to define
|
||||
* in what state those handles will be if this function is called
|
||||
* in the middle of a transfer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
/*
|
||||
* Name: curl_multi_cleanup()
|
||||
*
|
||||
* Desc: Cleans up and removes a whole multi stack. It does not free or
|
||||
* touch any individual easy handles in any way. We need to define
|
||||
* in what state those handles will be if this function is called
|
||||
* in the middle of a transfer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
||||
|
||||
/*
|
||||
|
|
@ -327,8 +327,8 @@ curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
|
|||
|
||||
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
|
||||
/* This macro below was added in 7.16.3 to push users who recompile to use
|
||||
the new curl_multi_socket_action() instead of the old curl_multi_socket()
|
||||
*/
|
||||
* the new curl_multi_socket_action() instead of the old curl_multi_socket()
|
||||
*/
|
||||
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
|
||||
#endif
|
||||
|
||||
|
|
@ -351,10 +351,10 @@ typedef enum {
|
|||
/* This is the argument passed to the socket callback */
|
||||
CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2),
|
||||
|
||||
/* set to 1 to enable pipelining for this multi handle */
|
||||
/* set to 1 to enable pipelining for this multi handle */
|
||||
CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3),
|
||||
|
||||
/* This is the timer callback function pointer */
|
||||
/* This is the timer callback function pointer */
|
||||
CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4),
|
||||
|
||||
/* This is the argument passed to the timer callback */
|
||||
|
|
@ -429,7 +429,6 @@ typedef enum {
|
|||
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
|
||||
CURLMoption option, ...);
|
||||
|
||||
|
||||
/*
|
||||
* Name: curl_multi_assign()
|
||||
*
|
||||
|
|
@ -454,7 +453,6 @@ CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
|
|||
*/
|
||||
CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle);
|
||||
|
||||
|
||||
typedef enum {
|
||||
CURLMINFO_NONE, /* first, never use this */
|
||||
/* The number of easy handles currently managed by the multi handle,
|
||||
|
|
|
|||
|
|
@ -264,7 +264,6 @@
|
|||
*/
|
||||
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
||||
|
||||
|
||||
/* the actual warnings, triggered by calling the Wcurl_easy_setopt_err*
|
||||
* functions */
|
||||
|
||||
|
|
@ -590,8 +589,9 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
|
|||
#define curlcheck_off_t_info(info) \
|
||||
(CURLINFO_OFF_T < (info))
|
||||
|
||||
|
||||
/* typecheck helpers -- check whether given expression has requested type */
|
||||
/*
|
||||
* typecheck helpers -- check whether given expression has requested type
|
||||
*/
|
||||
|
||||
/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
|
||||
* otherwise define a new macro. Search for __builtin_types_compatible_p
|
||||
|
|
@ -641,7 +641,6 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
|
|||
(curlcheck_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), CURL *))
|
||||
|
||||
|
||||
/* evaluates to true if expr is a long (no matter the signedness)
|
||||
* XXX: for now, int is also accepted (and therefore short and char, which
|
||||
* are promoted to int when passed to a variadic function) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue