Also a couple of minor formatting updates in the root `CMakeLists.txt`.
One swap to `#ifdef`.
Closes #17929
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
if(CURL_DISABLE_HTTP)
- set(CURL_DISABLE_IPFS ON)
- set(CURL_DISABLE_RTSP ON)
set(CURL_DISABLE_ALTSVC ON)
set(CURL_DISABLE_HSTS ON)
+ set(CURL_DISABLE_IPFS ON)
+ set(CURL_DISABLE_RTSP ON)
set(CURL_DISABLE_WEBSOCKETS ON)
endif()
set(CURL_DISABLE_FTP ON)
set(CURL_DISABLE_GOPHER ON)
set(CURL_DISABLE_IMAP ON)
+ set(CURL_DISABLE_IPFS ON)
set(CURL_DISABLE_LDAP ON)
set(CURL_DISABLE_LDAPS ON)
set(CURL_DISABLE_MQTT ON)
set(CURL_DISABLE_POP3 ON)
- set(CURL_DISABLE_IPFS ON)
set(CURL_DISABLE_RTSP ON)
set(CURL_DISABLE_SMB ON)
set(CURL_DISABLE_SMTP ON)
option(ENABLE_UNIX_SOCKETS "Enable Unix domain sockets support" ON)
if(ENABLE_UNIX_SOCKETS AND NOT WINCE)
if(WIN32 OR DOS)
- set(USE_UNIX_SOCKETS ON)
+ set(USE_UNIX_SOCKETS 1)
else()
include(CheckStructHasMember)
check_struct_has_member("struct sockaddr_un" "sun_path" "sys/un.h" USE_UNIX_SOCKETS)
AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
- #define __USE_INLINE__
- #include <proto/bsdsocket.h>
- #ifdef __amigaos4__
- struct SocketIFace *ISocket = NULL;
- #else
- struct Library *SocketBase = NULL;
- #endif
+ #define __USE_INLINE__
+ #include <proto/bsdsocket.h>
+ #ifdef __amigaos4__
+ struct SocketIFace *ISocket = NULL;
+ #else
+ struct Library *SocketBase = NULL;
+ #endif
]],[[
unsigned char host[] = "localhost";
gethostbyname(host);
context->title = "";
context->addTitle = true;
}
- (void) attributes;
+ (void)attributes;
}
//
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
- (void) curl_easy_perform(curl);
+ (void)curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
DEBUGASSERT(hints);
addr_ctx->hints = *hints;
#else
- (void) hints;
+ (void)hints;
#endif
Curl_mutex_init(&addr_ctx->mutx);
static voidpf
zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
{
- (void) opaque;
+ (void)opaque;
/* not a typo, keep it calloc() */
return (voidpf) calloc(items, size);
}
static void
zfree_cb(voidpf opaque, voidpf ptr)
{
- (void) opaque;
+ (void)opaque;
free(ptr);
}
struct Curl_cwriter *writer)
{
struct brotli_writer *bp = (struct brotli_writer *) writer;
- (void) data;
+ (void)data;
bp->br = BrotliDecoderCreateInstance(NULL, NULL, NULL);
return bp->br ? CURLE_OK : CURLE_OUT_OF_MEMORY;
struct Curl_cwriter *writer)
{
struct brotli_writer *bp = (struct brotli_writer *) writer;
- (void) data;
+ (void)data;
if(bp->br) {
BrotliDecoderDestroyInstance(bp->br);
struct Curl_cwriter *writer, int type,
const char *buf, size_t nbytes)
{
- (void) writer;
- (void) buf;
- (void) nbytes;
+ (void)writer;
+ (void)buf;
+ (void)nbytes;
if(!(type & CLIENTWRITE_BODY) || !nbytes)
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
static void error_do_close(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
- (void) data;
- (void) writer;
+ (void)data;
+ (void)writer;
}
static const struct Curl_cwtype error_writer = {
CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
const char *enclist, int is_transfer)
{
- (void) data;
- (void) enclist;
- (void) is_transfer;
+ (void)data;
+ (void)enclist;
+ (void)is_transfer;
return CURLE_NOT_BUILT_IN;
}
#ifndef HAVE_GETHOSTNAME
/* Allow compilation and return failure when unavailable */
- (void) name;
- (void) namelen;
+ (void)name;
+ (void)namelen;
return -1;
#else
*
***************************************************************************/
-#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
- || !defined(CURL_DISABLE_DIGEST_AUTH)
+#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
+ !defined(CURL_DISABLE_DIGEST_AUTH)
#include "curl_hmac.h"
infof(data, "SASL %p state change from %s to %s",
(void *)sasl, names[sasl->state], names[newstate]);
#else
- (void) data;
+ (void)data;
#endif
sasl->state = newstate;
struct bufref resp;
const char *hostname;
int port;
-#if defined(USE_KERBEROS5) || defined(USE_NTLM) \
- || !defined(CURL_DISABLE_DIGEST_AUTH)
+#if defined(USE_KERBEROS5) || defined(USE_NTLM) || \
+ !defined(CURL_DISABLE_DIGEST_AUTH)
const char *service = data->set.str[STRING_SERVICE_NAME] ?
data->set.str[STRING_SERVICE_NAME] :
sasl->params->service;
*
***************************************************************************/
-#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
- || defined(USE_LIBSSH2) || defined(USE_SSL)
+#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
+ defined(USE_LIBSSH2) || defined(USE_SSL)
#include <curl/curl.h>
#include "curl_hmac.h"
* @return CURLE_OK if succeed,
* error code otherwise
*/
-static CURLcode
-Curl_sha512_256_init(void *context)
+static CURLcode Curl_sha512_256_init(void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
* @return CURLE_OK if succeed,
* error code otherwise
*/
-static CURLcode
-Curl_sha512_256_update(void *context,
- const unsigned char *data,
- size_t length)
+static CURLcode Curl_sha512_256_update(void *context,
+ const unsigned char *data,
+ size_t length)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
* @return CURLE_OK if succeed,
* error code otherwise
*/
-static CURLcode
-Curl_sha512_256_finish(unsigned char *digest,
- void *context)
+static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
{
CURLcode ret;
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
* @param context the calculation context
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_init(void *context)
+static CURLcode Curl_sha512_256_init(void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
* @param length number of bytes in @a data
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_update(void *context,
- const unsigned char *data,
- size_t length)
+static CURLcode Curl_sha512_256_update(void *context,
+ const unsigned char *data,
+ size_t length)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
# bytes
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_finish(unsigned char *digest,
- void *context)
+static CURLcode Curl_sha512_256_finish(unsigned char *digest,
+ void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
#if !defined(CURL_FORCEINLINE) && \
defined(_MSC_VER) && !defined(__GNUC__) && !defined(__clang__)
-# define CURL_FORCEINLINE __forceinline
+#define CURL_FORCEINLINE __forceinline
#endif
-#if !defined(CURL_FORCEINLINE)
- /* Assume that 'CURL_INLINE' keyword works or the
- * macro was already defined correctly. */
-# define CURL_FORCEINLINE CURL_INLINE
+/* Assume that 'CURL_INLINE' keyword works or the
+ * macro was already defined correctly. */
+#ifndef CURL_FORCEINLINE
+#define CURL_FORCEINLINE CURL_INLINE
#endif
/* Bits manipulation macros and functions.
/* Defined as a function. The macro version may duplicate the binary code
* size as each argument is used twice, so if any calculation is used
* as an argument, the calculation could be done twice. */
-static CURL_FORCEINLINE curl_uint64_t
-Curl_rotr64(curl_uint64_t value, unsigned int bits)
+static CURL_FORCEINLINE curl_uint64_t Curl_rotr64(curl_uint64_t value,
+ unsigned int bits)
{
bits %= 64;
if(0 == bits)
/**
* SHA-512/256 calculation context
*/
-struct Curl_sha512_256ctx
-{
+struct Curl_sha512_256ctx {
/**
* Intermediate hash value. The variable is properly aligned. Smart
* compilers may automatically use fast load/store instruction for big
* @param context the calculation context
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_init(void *context)
+static CURLcode Curl_sha512_256_init(void *context)
{
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
* @param H hash values
* @param data the data buffer with #CURL_SHA512_256_BLOCK_SIZE bytes block
*/
-static void
-Curl_sha512_256_transform(curl_uint64_t H[SHA512_256_HASH_SIZE_WORDS],
- const void *data)
+static
+void Curl_sha512_256_transform(curl_uint64_t H[SHA512_256_HASH_SIZE_WORDS],
+ const void *data)
{
/* Working variables,
see FIPS PUB 180-4 section 6.7, 6.4. */
* @param length number of bytes in @a data
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_update(void *context,
- const unsigned char *data,
- size_t length)
+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 */
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
# bytes
* @return always CURLE_OK
*/
-static CURLcode
-Curl_sha512_256_finish(unsigned char *digest,
- void *context)
+static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
{
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
curl_uint64_t num_bits; /**< Number of processed bits */
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_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, \
+ 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);
* @param input_size the size of the data pointed by @a input
* @return always #CURLE_OK
*/
-CURLcode
-Curl_sha512_256it(unsigned char *output, const unsigned char *input,
- size_t input_size)
+CURLcode Curl_sha512_256it(unsigned char *output, const unsigned char *input,
+ size_t input_size)
{
Curl_sha512_256_ctx ctx;
CURLcode res;
res = Curl_sha512_256_update(&ctx, (const void *) input, input_size);
if(res != CURLE_OK) {
- (void) Curl_sha512_256_finish(output, &ctx);
+ (void)Curl_sha512_256_finish(output, &ctx);
return res;
}
}
/* Wrapper function, takes 'unsigned int' as length type, returns void */
-static void
-Curl_sha512_256_update_i(void *context,
- const unsigned char *data,
- unsigned int length)
+static void Curl_sha512_256_update_i(void *context,
+ const unsigned char *data,
+ unsigned int length)
{
/* Hypothetically the function may fail, but assume it does not */
- (void) Curl_sha512_256_update(context, data, length);
+ (void)Curl_sha512_256_update(context, data, length);
}
/* Wrapper function, returns void */
-static void
-Curl_sha512_256_finish_v(unsigned char *result,
- void *context)
+static void Curl_sha512_256_finish_v(unsigned char *result, void *context)
{
/* Hypothetically the function may fail, but assume it does not */
- (void) Curl_sha512_256_finish(result, context);
+ (void)Curl_sha512_256_finish(result, context);
}
/* Wrapper function, takes 'unsigned int' as length type, returns void */
#endif
#endif /* __MINGW32CE__ */
#ifndef SEC_E_INVALID_PARAMETER
-# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
+#define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
#endif
#ifndef SEC_E_DELEGATION_POLICY
-# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
+#define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
#endif
#ifndef SEC_E_POLICY_NLTM_ONLY
-# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
+#define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#endif
#ifdef __MINGW32CE__
#include "../curl_setup.h"
#ifdef _WIN32
-
- /*
- * MultiByte conversions using Windows kernel32 library.
- */
-
+/* MultiByte conversions using Windows kernel32 library. */
wchar_t *curlx_convert_UTF8_to_wchar(const char *str_utf8);
char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w);
-#endif /* _WIN32 */
+#endif
/*
* Macros curlx_convert_UTF8_to_tchar(), curlx_convert_tchar_to_UTF8()
uint64_t usecs;
if(0 == timebase.denom)
- (void) mach_timebase_info(&timebase);
+ (void)mach_timebase_info(&timebase);
usecs = mach_absolute_time();
usecs *= timebase.numer; /* spellchecker:disable-line */
struct Curl_easy *data = easy;
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) easy;
+ (void)easy;
#endif
(void)socketp;
return NULL;
}
-const struct curl_easyoption *curl_easy_option_by_id (CURLoption id)
+const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)
{
(void)id;
return NULL;
* Examples:
*
* Simple name/value pair with copied contents:
- * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
- * CURLFORM_COPYCONTENTS, "value", CURLFORM_END);
+ * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ * CURLFORM_COPYCONTENTS, "value", CURLFORM_END);
*
* name/value pair where only the content pointer is remembered:
- * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
- * CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10, CURLFORM_END);
+ * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ * CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10,
+ * CURLFORM_END);
* (if CURLFORM_CONTENTSLENGTH is missing strlen () is used)
*
* storing a filename (CONTENTTYPE is optional!):
- * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
- * CURLFORM_FILE, "filename1", CURLFORM_CONTENTTYPE, "plain/text",
- * CURLFORM_END);
+ * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ * CURLFORM_FILE, "filename1", CURLFORM_CONTENTTYPE, "plain/text",
+ * CURLFORM_END);
*
* storing multiple filenames:
- * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
- * CURLFORM_FILE, "filename1", CURLFORM_FILE, "filename2", CURLFORM_END);
+ * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ * CURLFORM_FILE, "filename1", CURLFORM_FILE, "filename2",
+ * CURLFORM_END);
*
* Returns:
* CURL_FORMADD_OK on success
int curl_formget(struct curl_httppost *form, void *arg,
curl_formget_callback append)
{
- (void) form;
- (void) arg;
- (void) append;
+ (void)form;
+ (void)arg;
+ (void)append;
return CURL_FORMADD_DISABLED;
}
char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num)
{
- (void) h;
- (void) num;
+ (void)h;
+ (void)num;
return NULL;
}
char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header)
{
- (void) h;
- (void) header;
+ (void)h;
+ (void)header;
return NULL;
}
#if defined(USE_IPV6) && \
!defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
- (void) local_scope_id;
+ (void)local_scope_id;
#endif
if(getifaddrs(&head) >= 0) {
const char *interf,
char *buf, size_t buf_size)
{
- (void) af;
+ (void)af;
#ifdef USE_IPV6
- (void) remote_scope;
- (void) local_scope_id;
+ (void)remote_scope;
+ (void)local_scope_id;
#endif
- (void) interf;
- (void) buf;
- (void) buf_size;
+ (void)interf;
+ (void)buf;
+ (void)buf_size;
return IF2IP_NOT_FOUND;
}
size_t decoded_sz = 0;
CURLcode error;
- (void) data;
+ (void)data;
if(!conn->mech)
/* not initialized, return error */
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
mbedtls_md4(ctx->data, ctx->size, result);
#else
- (void) mbedtls_md4_ret(ctx->data, ctx->size, result);
+ (void)mbedtls_md4_ret(ctx->data, ctx->size, result);
#endif
Curl_safefree(ctx->data);
#include "curl_setup.h"
-#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
- || !defined(CURL_DISABLE_DIGEST_AUTH)
+#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
+ !defined(CURL_DISABLE_DIGEST_AUTH)
#include <string.h>
#include <curl/curl.h>
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
- (void) mbedtls_md5_update(ctx, data, length);
+ (void)mbedtls_md5_update(ctx, data, length);
#else
- (void) mbedtls_md5_update_ret(ctx, data, length);
+ (void)mbedtls_md5_update_ret(ctx, data, length);
#endif
}
static void my_md5_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
- (void) mbedtls_md5_finish(ctx, digest);
+ (void)mbedtls_md5_finish(ctx, digest);
#else
- (void) mbedtls_md5_finish_ret(ctx, digest);
+ (void)mbedtls_md5_finish_ret(ctx, digest);
#endif
}
#include "strdup.h"
#include "curlx/base64.h"
-#if !defined(CURL_DISABLE_MIME) && (!defined(CURL_DISABLE_HTTP) || \
- !defined(CURL_DISABLE_SMTP) || \
- !defined(CURL_DISABLE_IMAP))
+#if !defined(CURL_DISABLE_MIME) && \
+ (!defined(CURL_DISABLE_HTTP) || \
+ !defined(CURL_DISABLE_SMTP) || \
+ !defined(CURL_DISABLE_IMAP))
#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
#include <libgen.h>
#include "memdebug.h"
#ifdef _WIN32
-# ifndef R_OK
+# ifndef R_OK
# define R_OK 4
-# endif
+# endif
#endif
-
-#define READ_ERROR ((size_t) -1)
-#define STOP_FILLING ((size_t) -2)
+#define READ_ERROR ((size_t) -1)
+#define STOP_FILLING ((size_t) -2)
static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
void *instream, bool *hasread);
#define QP_CR 3 /* Carriage return. */
#define QP_LF 4 /* Line-feed. */
static const unsigned char qp_class[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 07 */
- 0, QP_SP, QP_LF, 0, 0, QP_CR, 0, 0, /* 08 - 0F */
- 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 17 */
- 0, 0, 0, 0, 0, 0, 0, 0, /* 18 - 1F */
- QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 20 - 27 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 28 - 2F */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 30 - 37 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0 , QP_OK, QP_OK, /* 38 - 3F */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 40 - 47 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 48 - 4F */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 50 - 57 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 58 - 5F */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 60 - 67 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 68 - 6F */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 70 - 77 */
- QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0, /* 78 - 7F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F0 - FF */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 07 */
+ 0, QP_SP, QP_LF, 0, 0, QP_CR, 0, 0, /* 08 - 0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 17 */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 18 - 1F */
+ QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 20 - 27 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 28 - 2F */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 30 - 37 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0 , QP_OK, QP_OK, /* 38 - 3F */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 40 - 47 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 48 - 4F */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 50 - 57 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 58 - 5F */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 60 - 67 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 68 - 6F */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 70 - 77 */
+ QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0, /* 78 - 7F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F0 - FF */
};
struct mime_encoder_state *st = &part->encstate;
size_t insize = st->bufend - st->bufbeg;
- (void) ateof;
+ (void)ateof;
if(!size)
return STOP_FILLING;
struct mime_encoder_state *st = &part->encstate;
size_t cursize = st->bufend - st->bufbeg;
- (void) ateof;
+ (void)ateof;
if(!size)
return STOP_FILLING;
{
curl_mimepart *part = (curl_mimepart *) instream;
size_t sz = curlx_sotouz(part->datasize - part->state.offset);
- (void) size; /* Always 1.*/
+ (void)size; /* Always 1.*/
if(!nitems)
return STOP_FILLING;
{
curl_mime *mime = (curl_mime *) instream;
size_t cursize = 0;
- (void) size; /* Always 1. */
+ (void)size; /* Always 1. */
while(nitems) {
size_t sz = 0;
size_t ret;
bool hasread;
- (void) size; /* Always 1. */
+ (void)size; /* Always 1. */
/* If `nitems` is <= 4, some encoders will return STOP_FILLING without
* adding any data and this loops infinitely. */
/* Mime not compiled in: define stubs for externally-referenced functions. */
curl_mime *curl_mime_init(CURL *easy)
{
- (void) easy;
+ (void)easy;
return NULL;
}
void curl_mime_free(curl_mime *mime)
{
- (void) mime;
+ (void)mime;
}
curl_mimepart *curl_mime_addpart(curl_mime *mime)
{
- (void) mime;
+ (void)mime;
return NULL;
}
CURLcode curl_mime_name(curl_mimepart *part, const char *name)
{
- (void) part;
- (void) name;
+ (void)part;
+ (void)name;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_filename(curl_mimepart *part, const char *filename)
{
- (void) part;
- (void) filename;
+ (void)part;
+ (void)filename;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype)
{
- (void) part;
- (void) mimetype;
+ (void)part;
+ (void)mimetype;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding)
{
- (void) part;
- (void) encoding;
+ (void)part;
+ (void)encoding;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_data(curl_mimepart *part,
const char *data, size_t datasize)
{
- (void) part;
- (void) data;
- (void) datasize;
+ (void)part;
+ (void)data;
+ (void)datasize;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename)
{
- (void) part;
- (void) filename;
+ (void)part;
+ (void)filename;
return CURLE_NOT_BUILT_IN;
}
curl_free_callback freefunc,
void *arg)
{
- (void) part;
- (void) datasize;
- (void) readfunc;
- (void) seekfunc;
- (void) freefunc;
- (void) arg;
+ (void)part;
+ (void)datasize;
+ (void)readfunc;
+ (void)seekfunc;
+ (void)freefunc;
+ (void)arg;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_subparts(curl_mimepart *part, curl_mime *subparts)
{
- (void) part;
- (void) subparts;
+ (void)part;
+ (void)subparts;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_headers(curl_mimepart *part,
struct curl_slist *headers, int take_ownership)
{
- (void) part;
- (void) headers;
- (void) take_ownership;
+ (void)part;
+ (void)headers;
+ (void)take_ownership;
return CURLE_NOT_BUILT_IN;
}
static size_t mev_sh_entry_hash(void *key, size_t key_length, size_t slots_num)
{
curl_socket_t fd = *((curl_socket_t *) key);
- (void) key_length;
+ (void)key_length;
return (fd % (curl_socket_t)slots_num);
}
static size_t mev_sh_entry_compare(void *k1, size_t k1_len,
void *k2, size_t k2_len)
{
- (void) k1_len; (void) k2_len;
+ (void)k1_len; (void)k2_len;
return (*((curl_socket_t *) k1)) == (*((curl_socket_t *) k2));
}
bool dead_connection)
{
struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
- (void) dead_connection;
+ (void)dead_connection;
#ifndef USE_SSL
(void)data;
#endif
void Curl_cwriter_def_close(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
- (void) data;
- (void) writer;
+ (void)data;
+ (void)writer;
}
static size_t get_max_body_write_len(struct Curl_easy *data, curl_off_t limit)
#include "curl_setup.h"
-#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
- || defined(USE_LIBSSH2) || defined(USE_SSL)
+#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
+ defined(USE_LIBSSH2) || defined(USE_SSL)
#include "curlx/warnless.h"
#include "curl_sha256.h"
static CURLcode my_sha256_init(void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
- (void) mbedtls_sha256_starts(ctx, 0);
+ (void)mbedtls_sha256_starts(ctx, 0);
#else
- (void) mbedtls_sha256_starts_ret(ctx, 0);
+ (void)mbedtls_sha256_starts_ret(ctx, 0);
#endif
return CURLE_OK;
}
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
- (void) mbedtls_sha256_update(ctx, data, length);
+ (void)mbedtls_sha256_update(ctx, data, length);
#else
- (void) mbedtls_sha256_update_ret(ctx, data, length);
+ (void)mbedtls_sha256_update_ret(ctx, data, length);
#endif
}
static void my_sha256_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
- (void) mbedtls_sha256_finish(ctx, digest);
+ (void)mbedtls_sha256_finish(ctx, digest);
#else
- (void) mbedtls_sha256_finish_ret(ctx, digest);
+ (void)mbedtls_sha256_finish_ret(ctx, digest);
#endif
}
static CURLcode my_sha256_init(void *ctx)
{
- (void) CC_SHA256_Init(ctx);
+ (void)CC_SHA256_Init(ctx);
return CURLE_OK;
}
const unsigned char *data,
unsigned int length)
{
- (void) CC_SHA256_Update(ctx, data, length);
+ (void)CC_SHA256_Update(ctx, data, length);
}
static void my_sha256_final(unsigned char *digest, void *ctx)
{
- (void) CC_SHA256_Final(digest, ctx);
+ (void)CC_SHA256_Final(digest, ctx);
}
#elif defined(USE_WIN32_CRYPTO)
struct smb_conn *smbc = Curl_conn_meta_get(conn, CURL_META_SMB_CONN);
char *slash;
- (void) done;
+ (void)done;
if(!smbc)
return CURLE_FAILED_INIT;
host->name = host->name + 1;
/* Attempt to convert the hostname to IDN ACE */
- (void) Curl_idnconvert_hostname(host);
+ (void)Curl_idnconvert_hostname(host);
/* If Curl_idnconvert_hostname() fails then we shall attempt to continue
and send the hostname using UTF-8 rather than as 7-bit ACE (which is
CURLcode result = CURLE_OK;
#ifdef CURL_DISABLE_VERBOSE_STRINGS
- (void) data;
+ (void)data;
#endif
*hostname_result = NULL;
SecBufferDesc chlg_desc;
SECURITY_STATUS status;
- (void) data;
+ (void)data;
/* Query the security package for DigestSSP */
status =
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
- (void) userp;
- (void) passwdp;
+ (void)userp;
+ (void)passwdp;
if(!krb5->spn) {
gss_buffer_desc spn_token = GSS_C_EMPTY_BUFFER;
SECURITY_STATUS status;
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) data;
+ (void)data;
#endif
/* Ensure we have a valid challenge message */
{
const char *p = buf;
- (void) handle;
+ (void)handle;
fprintf(stderr, "0x");
while(len-- > 0)
size_t type2len = Curl_bufref_len(type2ref);
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) data;
+ (void)data;
#endif
if(type2len >= 48) {
struct ntlmdata *ntlm)
{
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) data;
+ (void)data;
#endif
/* Ensure we have a valid type-2 message */
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) data;
+ (void)data;
#endif
- (void) passwdp;
- (void) userp;
+ (void)passwdp;
+ (void)userp;
/* Setup the type-2 "input" security buffer */
type_2_desc.ulVersion = SECBUFFER_VERSION;
gss_channel_bindings_t chan_bindings = GSS_C_NO_CHANNEL_BINDINGS;
struct gss_channel_bindings_struct chan;
- (void) user;
- (void) password;
+ (void)user;
+ (void)password;
if(nego->context && nego->status == GSS_S_COMPLETE) {
/* We finished successfully our part of authentication, but server
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
- (void) data;
+ (void)data;
#endif
if(nego->context && nego->status == SEC_E_OK) {
TCHAR *tchar_spn = NULL;
TCHAR *dupe_tchar_spn = NULL;
- (void) realm;
+ (void)realm;
/* Note: We could use DsMakeSPN() or DsClientMakeSpnForTargetServer() rather
than doing this ourselves but the first is only available in Windows XP
!defined(CURL_DISABLE_HTTP)
static int https_proxy_present(curl_version_info_data *info)
{
- (void) info;
+ (void)info;
return Curl_ssl_supports(NULL, SSLSUPP_HTTPS_PROXY);
}
#endif
#if defined(USE_SSL) && defined(USE_ECH)
static int ech_present(curl_version_info_data *info)
{
- (void) info;
+ (void)info;
return Curl_ssl_supports(NULL, SSLSUPP_ECH);
}
#endif
if(block) {
curl_socket_t fd_read = conn->sock[FIRSTSOCKET];
/* wait for the socket to become ready */
- (void) Curl_socket_check(fd_read, CURL_SOCKET_BAD,
- CURL_SOCKET_BAD, left > 1000 ? 1000 : left);
+ (void)Curl_socket_check(fd_read, CURL_SOCKET_BAD,
+ CURL_SOCKET_BAD, left > 1000 ? 1000 : left);
}
}
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
- (void) dead_connection;
+ (void)dead_connection;
if(sshc && sshc->ssh_session && sshp) {
/* only if there is a session still around to use! */
bool premature)
{
struct ssh_conn *sshc = Curl_conn_meta_get(data->conn, CURL_META_SSH_CONN);
- (void) premature; /* not used */
+ (void)premature; /* not used */
if(!sshc)
return CURLE_FAILED_INIT;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
- (void) sockindex; /* we only support SCP on the fixed known primary socket */
+ (void)sockindex; /* we only support SCP on the fixed known primary socket */
(void)eos;
*pnwritten = 0;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
ssize_t nread;
- (void) sockindex; /* we only support SCP on the fixed known primary socket */
+ (void)sockindex; /* we only support SCP on the fixed known primary socket */
*pnread = 0;
if(!sshc)
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
CURLcode result = CURLE_OK;
- (void) dead_connection;
+ (void)dead_connection;
DEBUGF(infof(data, "SSH DISCONNECT starts now"));
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
- (void) dead_connection;
+ (void)dead_connection;
if(sshc && sshc->ssh_session && sshp) {
/* only if there is a session still around to use! */
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
- (void) dead_connection;
+ (void)dead_connection;
DEBUGF(infof(data, "SSH DISCONNECT starts now"));
struct gtls_ssl_backend_data *backend =
(struct gtls_ssl_backend_data *)connssl->backend;
- (void) data;
+ (void)data;
DEBUGASSERT(backend);
CURL_TRC_CF(data, cf, "close");
if(backend->gtls.session) {
#include "../curl_setup.h"
-#if defined(USE_OPENSSL) \
- || defined(USE_SCHANNEL)
+#if defined(USE_OPENSSL) || defined(USE_SCHANNEL)
/* these backends use functions from this file */
#ifdef HAVE_NETINET_IN_H
};
/* apply threading? */
-#if (defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)) || \
- defined(_WIN32)
+#if (defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)) || defined(_WIN32)
#define HAS_THREADING_SUPPORT
#endif
int line_nb, const char *line)
{
struct Curl_easy *data = (struct Curl_easy *)context;
- (void) level;
- (void) line_nb;
- (void) f_name;
+ (void)level;
+ (void)line_nb;
+ (void)f_name;
if(data) {
size_t len = strlen(line);
return CURLE_OUT_OF_MEMORY;
#ifndef HAS_TLS13_SUPPORT
- (void) ciphers13, (void) j;
+ (void)ciphers13, (void)j;
#else
if(!ciphers13) {
/* Add default TLSv1.3 ciphers to selection */
mbed_dump_cert_info(struct Curl_easy *data, const mbedtls_x509_crt *crt)
{
#if defined(CURL_DISABLE_VERBOSE_STRINGS) || \
- (MBEDTLS_VERSION_NUMBER >= 0x03000000 && defined(MBEDTLS_X509_REMOVE_INFO))
- (void) data, (void) crt;
+ (MBEDTLS_VERSION_NUMBER >= 0x03000000 && defined(MBEDTLS_X509_REMOVE_INFO))
+ (void)data, (void)crt;
#else
const size_t bufsize = 16384;
char *p, *buffer = malloc(bufsize);
}
}
#else
- (void) data;
+ (void)data;
#endif
return CURLE_OK;
}
list = beg;
}
#endif
- (void) data;
+ (void)data;
return list;
}
Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
CURLINFO_SSL_DATA_IN, (const char *)buf, len);
- (void) ssl;
+ (void)ssl;
}
#endif
long ssl_version = conn_config->version;
long ssl_version_max = conn_config->version_max;
- (void) data; /* In case it is unused. */
+ (void)data; /* In case it is unused. */
switch(ssl_version) {
case CURL_SSLVERSION_TLSv1_3:
{
EVP_MD_CTX *mdctx;
unsigned int len = 0;
- (void) unused;
+ (void)unused;
mdctx = EVP_MD_CTX_create();
if(!mdctx)
#include "vtls.h"
-#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) \
- && !defined(CURL_WINDOWS_UWP)
+#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) && \
+ !defined(CURL_WINDOWS_UWP)
#define HAS_MANUAL_VERIFY_API
#endif
-#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) \
- && !defined(DISABLE_SCHANNEL_CLIENT_CERT)
+#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) && \
+ !defined(DISABLE_SCHANNEL_CLIENT_CERT)
#define HAS_CLIENT_CERT_PATH
#endif
#ifndef UNDER_CE
if(result == CURLE_OK &&
- (conn_config->CAfile || conn_config->ca_info_blob) &&
- BACKEND->use_manual_cred_validation) {
+ (conn_config->CAfile || conn_config->ca_info_blob) &&
+ BACKEND->use_manual_cred_validation) {
/*
* Create a chain engine that uses the certificates in the CA file as
* trusted certificates. This is only supported on Windows 7+.
static int
wssl_legacy_CTX_set_max_proto_version(WOLFSSL_CTX* ctx, int version)
{
- (void) ctx, (void) version;
+ (void)ctx, (void)version;
return WOLFSSL_NOT_IMPLEMENTED;
}
#define wolfSSL_CTX_set_min_proto_version wssl_legacy_CTX_set_min_proto_version
struct ssl_connect_data *connssl = cf->ctx;
struct wssl_ctx *wssl = (struct wssl_ctx *)connssl->backend;
- (void) data;
+ (void)data;
DEBUGASSERT(wssl);
static void ws_cw_close(struct Curl_easy *data, struct Curl_cwriter *writer)
{
struct ws_cw_ctx *ctx = writer->ctx;
- (void) data;
+ (void)data;
Curl_bufq_free(&ctx->buf);
}
/* char RAND_screen(void) {return 0;} In headers, but not present */
char CRYPTO_cleanup_all_ex_data(void) {return 0;}
char SSL_get_shutdown(void) {return 0;}
-char ENGINE_load_builtin_engines (void) {return 0;}
+char ENGINE_load_builtin_engines(void) {return 0;}
/* And these are to pass the test that uses headers. */
/* Because the HP OpenSSL transfer vectors are currently in Upper case only */
CURL *curl)
{
struct GlobalConfig *global = config->global;
- (void) config;
+ (void)config;
/* where to store */
my_setopt(curl, CURLOPT_WRITEDATA, per);
my_setopt(curl, CURLOPT_INTERLEAVEDATA, per);
{
int i;
- (void) argc;
- (void) argv;
+ (void)argc;
+ (void)argv;
for(i = 0; disabled[i]; i++)
printf("%s\n", disabled[i]);
#define BUF_SIZE 0x10000
static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
{
- (void) opaque;
+ (void)opaque;
/* not a typo, keep it calloc() */
return (voidpf) calloc(items, size);
}
static void zfree_func(voidpf opaque, voidpf ptr)
{
- (void) opaque;
+ (void)opaque;
free(ptr);
}
#ifdef LINK
static void write_linked_location(CURL *curl, const char *location,
- size_t loclen, FILE *stream);
+ size_t loclen, FILE *stream);
#endif
int tool_write_headers(struct HdrCbData *hdrcbdata, FILE *stream)
/*
** callback for CURLOPT_HEADERFUNCTION
*/
-
size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
{
struct per_transfer *per = userdata;
* should not be needed but the real world returns plenty of relative
* URLs here.
*/
-static
-void write_linked_location(CURL *curl, const char *location, size_t loclen,
- FILE *stream) {
+static void write_linked_location(CURL *curl, const char *location,
+ size_t loclen, FILE *stream)
+{
/* This would so simple if CURLINFO_REDIRECT_URL were available here */
CURLU *u = NULL;
char *copyloc = NULL, *locurl = NULL, *scheme = NULL, *finalurl = NULL;
#if defined(_WIN32) || (defined(MSDOS) && !defined(__DJGPP__))
# define mkdir(x,y) (mkdir)((x))
# ifndef F_OK
-# define F_OK 0
+# define F_OK 0
# endif
#endif
#endif
}
}
-#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \
- defined(_WIN32) */
+#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || defined(_WIN32) */
{
struct tool_mime *sip = (struct tool_mime *) arg;
curl_off_t bytesleft;
- (void) size; /* Always 1: ignored. */
+ (void)size; /* Always 1: ignored. */
if(sip->size >= 0) {
if(sip->curpos >= sip->size)
result = curlx_dyn_addn(&escaped, str, s - str);
if(!result)
- (void) !curlx_dyn_addn(&escaped, "...", cutoff);
+ (void)!curlx_dyn_addn(&escaped, "...", cutoff);
return curlx_dyn_ptr(&escaped);
}
#define my_setopt_offt(x,y,z) \
curl_easy_setopt(x, y, (curl_off_t)(z))
-#define my_setopt_str(x,y,z) \
+#define my_setopt_str(x,y,z) \
curl_easy_setopt(x, y, z)
#define my_setopt_enum(x,y,z) \
#ifdef __VMS
#if defined(__DECC) && !defined(__VAX) && \
- defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
+ defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
#include <unixlib.h>
#endif
}
#if defined(__DECC) && !defined(__VAX) && \
- defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
+ defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
/*
* 2004-09-19 SMS.
#undef exit
#define exit(__code) vms_special_exit((__code), (0))
-#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
-#define VMSSTS_HIDE VMS_STS(1,0,0,0)
+#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
+#define VMSSTS_HIDE VMS_STS(1,0,0,0)
#endif /* __VMS */
CURLE_OK }
};
-static int hasbody;
+static int hasbody;
static size_t writedata(char *data, size_t size, size_t nmemb, void *userdata)
{
- (void) data;
- (void) userdata;
+ (void)data;
+ (void)userdata;
if(size && nmemb)
hasbody = 1;
{
#if defined(SOL_SOCKET) && defined(SO_SNDBUF)
int sndbufsize = 4 * 1024; /* 4KB send buffer */
- (void) clientp;
- (void) purpose;
+ (void)clientp;
+ (void)purpose;
setsockopt(curlfd, SOL_SOCKET, SO_SNDBUF,
(char *)&sndbufsize, sizeof(sndbufsize));
#else
unsigned tid_count = NUM_THREADS, i;
CURLcode test_failure = CURLE_OK;
curl_version_info_data *ver;
- (void) URL;
+ (void)URL;
ver = curl_version_info(CURLVERSION_NOW);
if((ver->features & CURL_VERSION_THREADSAFE) == 0) {
unsigned tid_count = NUM_THREADS, i;
CURLcode test_failure = CURLE_OK;
curl_version_info_data *ver;
- (void) URL;
+ (void)URL;
ver = curl_version_info(CURLVERSION_NOW);
if((ver->features & CURL_VERSION_THREADSAFE) == 0) {
static void execute(CURLSH *share, struct Ctx *ctx)
{
size_t i;
- (void) share;
+ (void)share;
for(i = 0; i < THREAD_SIZE; i++) {
test_thread((void *)&ctx[i]);
}
{
size_t *pcounter = (size_t *) userp;
- (void) buf;
+ (void)buf;
*pcounter += len;
return len;
}
struct t668_WriteThis *pooh = (struct t668_WriteThis *)userp;
size_t len = strlen(pooh->readptr);
- (void) size; /* Always 1.*/
+ (void)size; /* Always 1.*/
if(len > nmemb)
len = nmemb;
{
struct t670_ReadThis *pooh = (struct t670_ReadThis *) clientp;
- (void) dltotal;
- (void) dlnow;
- (void) ultotal;
- (void) ulnow;
+ (void)dltotal;
+ (void)dlnow;
+ (void)ultotal;
+ (void)ulnow;
if(pooh->origin) {
time_t delta = time(NULL) - pooh->origin;
}
if(loadfile(cafile, &certdata, &certsize)) {
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
- curl_easy_setopt(curl, CURLOPT_URL, url);
- curl_easy_setopt(curl, CURLOPT_USERAGENT, "CURLOPT_CAINFO_BLOB");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "CURLOPT_CAINFO_BLOB");
curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
(long)CURLSSLOPT_REVOKE_BEST_EFFORT);
/* write callback that does nothing */
static size_t write_it(char *ptr, size_t size, size_t nmemb, void *userdata)
{
- (void) ptr;
- (void) userdata;
+ (void)ptr;
+ (void)userdata;
return size * nmemb;
}
}
# display summary information about curl and the test host
- logmsg ("********* System characteristics ******** \n",
- "* $curl\n",
- "* $libcurl\n",
- "* Protocols: $proto\n",
- "* Features: $feat\n",
- "* Disabled: $dis\n",
- "* Host: $hostname\n",
- "* System: $hosttype\n",
- "* OS: $hostos\n",
- "* Perl: $^V ($^X)\n",
- "* diff: $havediff\n",
- "* Args: $args\n");
+ logmsg("********* System characteristics ******** \n",
+ "* $curl\n",
+ "* $libcurl\n",
+ "* Protocols: $proto\n",
+ "* Features: $feat\n",
+ "* Disabled: $dis\n",
+ "* Host: $hostname\n",
+ "* System: $hosttype\n",
+ "* OS: $hostos\n",
+ "* Perl: $^V ($^X)\n",
+ "* diff: $havediff\n",
+ "* Args: $args\n");
if($jobs) {
# Only show if not the default for now
$run_event_based?"event-based ":"",
$nghttpx_h3);
logmsg sprintf("%s\n", $libtool?"Libtool ":"");
- logmsg ("* Seed: $randseed\n");
+ logmsg "* Seed: $randseed\n";
}
#######################################################################
}
logmsg("end of one transfer");
-
}
dnsd_cleanup:
return 1;
}
-
-
/*
do
-
encodedByte = X MOD 128
X = X DIV 128
/* send back this on HTTP 404 file not found */
static const char *doc404_HTTP = "HTTP/1.1 404 Not Found\r\n"
- "Server: " RTSPDVERSION "\r\n"
- "Connection: close\r\n"
- "Content-Type: text/html"
- END_OF_HEADERS
- "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
- "<HTML><HEAD>\n"
- "<TITLE>404 Not Found</TITLE>\n"
- "</HEAD><BODY>\n"
- "<H1>Not Found</H1>\n"
- "The requested URL was not found on this server.\n"
- "<P><HR><ADDRESS>" RTSPDVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
+ "Server: " RTSPDVERSION "\r\n"
+ "Connection: close\r\n"
+ "Content-Type: text/html"
+ END_OF_HEADERS
+ "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
+ "<HTML><HEAD>\n"
+ "<TITLE>404 Not Found</TITLE>\n"
+ "</HEAD><BODY>\n"
+ "<H1>Not Found</H1>\n"
+ "The requested URL was not found on this server.\n"
+ "<P><HR><ADDRESS>" RTSPDVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
/* send back this on RTSP 404 file not found */
static const char *doc404_RTSP = "RTSP/1.0 404 Not Found\r\n"
- "Server: " RTSPDVERSION
- END_OF_HEADERS;
+ "Server: " RTSPDVERSION
+ END_OF_HEADERS;
/* Default size to send away fake RTP data */
#define RTP_DATA_SIZE 12
/* send back this on 404 file not found */
static const char *doc404 = "HTTP/1.1 404 Not Found\r\n"
- "Server: " SWSVERSION "\r\n"
- "Connection: close\r\n"
- "Content-Type: text/html"
- END_OF_HEADERS
- "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
- "<HTML><HEAD>\n"
- "<TITLE>404 Not Found</TITLE>\n"
- "</HEAD><BODY>\n"
- "<H1>Not Found</H1>\n"
- "The requested URL was not found on this server.\n"
- "<P><HR><ADDRESS>" SWSVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
+ "Server: " SWSVERSION "\r\n"
+ "Connection: close\r\n"
+ "Content-Type: text/html"
+ END_OF_HEADERS
+ "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
+ "<HTML><HEAD>\n"
+ "<TITLE>404 Not Found</TITLE>\n"
+ "</HEAD><BODY>\n"
+ "<H1>Not Found</H1>\n"
+ "The requested URL was not found on this server.\n"
+ "<P><HR><ADDRESS>" SWSVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
/* work around for handling trailing headers */
static int already_recv_zeroed_chunk = FALSE;
logmsg("No test number in path");
req->testno = DOCNUMBER_NOTHING;
}
-
}
if(req->testno == DOCNUMBER_NOTHING) {
for(;;) {
#if defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
long i;
- (void) IoctlSocket(f, FIONBIO, &i);
+ (void)IoctlSocket(f, FIONBIO, &i);
#elif defined(HAVE_IOCTLSOCKET)
unsigned long i;
- (void) ioctlsocket(f, FIONREAD, &i);
+ (void)ioctlsocket(f, FIONREAD, &i);
#else
int i;
- (void) ioctl(f, FIONREAD, &i);
+ (void)ioctl(f, FIONREAD, &i);
#endif
if(i) {
j++;
else
fromaddrlen = sizeof(fromaddr.sa6);
#endif
- (void) recvfrom(f, rbuf, sizeof(rbuf), 0,
- &fromaddr.sa, &fromaddrlen);
+ (void)recvfrom(f, rbuf, sizeof(rbuf), 0,
+ &fromaddr.sa, &fromaddrlen);
}
else
break;
sdp->th_block = htons(sendblock);
timeout = 0;
#ifdef HAVE_SIGSETJMP
- (void) sigsetjmp(timeoutbuf, 1);
+ (void)sigsetjmp(timeoutbuf, 1);
#endif
if(test->writedelay) {
logmsg("Pausing %d seconds before %d bytes", test->writedelay,
break;
}
/* Re-synchronize with the other side */
- (void) synchnet(peer);
+ (void)synchnet(peer);
if(sap->th_block == (sendblock-1)) {
goto send_data;
}
rap->th_block = htons(recvblock);
recvblock++;
#ifdef HAVE_SIGSETJMP
- (void) sigsetjmp(timeoutbuf, 1);
+ (void)sigsetjmp(timeoutbuf, 1);
#endif
send_ack:
logmsg("write");
break; /* normal */
}
/* Re-synchronize with the other side */
- (void) synchnet(peer);
+ (void)synchnet(peer);
if(rdp->th_block == (recvblock-1))
goto send_ack; /* rexmit */
}
rap->th_opcode = htons(opcode_ACK); /* send the "final" ack */
rap->th_block = htons(recvblock);
- (void) swrite(peer, &ackbuf.storage[0], 4);
+ (void)swrite(peer, &ackbuf.storage[0], 4);
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, justtimeout); /* just abort read on timeout */
alarm(rexmtval);
if(n >= 4 && /* if read some data */
rdp->th_opcode == opcode_DATA && /* and got a data block */
recvblock == rdp->th_block) { /* then my last ack was lost */
- (void) swrite(peer, &ackbuf.storage[0], 4); /* resend final ack */
+ (void)swrite(peer, &ackbuf.storage[0], 4); /* resend final ack */
}
abort:
/* make sure the output file is closed in case of abort */
{
#ifdef USE_WINSOCK
WSACleanup();
-#endif /* USE_WINSOCK */
+#endif
/* flush buffers of all streams regardless of their mode */
_flushall();
if(oldhdlr != SIG_ERR)
siginterrupt(signum, (int) restartable);
#else
- (void) restartable;
+ (void)restartable;
#endif
return oldhdlr;
{
#ifdef SIGHUP
if(SIG_ERR != old_sighup_handler)
- (void) set_signal(SIGHUP, old_sighup_handler, FALSE);
+ (void)set_signal(SIGHUP, old_sighup_handler, FALSE);
#endif
#ifdef SIGPIPE
if(SIG_ERR != old_sigpipe_handler)
- (void) set_signal(SIGPIPE, old_sigpipe_handler, FALSE);
+ (void)set_signal(SIGPIPE, old_sigpipe_handler, FALSE);
#endif
#ifdef SIGALRM
if(!keep_sigalrm) {
if(SIG_ERR != old_sigalrm_handler)
- (void) set_signal(SIGALRM, old_sigalrm_handler, FALSE);
+ (void)set_signal(SIGALRM, old_sigalrm_handler, FALSE);
}
#else
(void)keep_sigalrm;
#endif
#ifdef SIGINT
if(SIG_ERR != old_sigint_handler)
- (void) set_signal(SIGINT, old_sigint_handler, FALSE);
+ (void)set_signal(SIGINT, old_sigint_handler, FALSE);
#endif
#ifdef SIGTERM
if(SIG_ERR != old_sigterm_handler)
- (void) set_signal(SIGTERM, old_sigterm_handler, FALSE);
+ (void)set_signal(SIGTERM, old_sigterm_handler, FALSE);
#endif
#if defined(SIGBREAK) && defined(_WIN32)
if(SIG_ERR != old_sigbreak_handler)
- (void) set_signal(SIGBREAK, old_sigbreak_handler, FALSE);
+ (void)set_signal(SIGBREAK, old_sigbreak_handler, FALSE);
#endif
#ifdef _WIN32
#ifndef UNDER_CE
{
UNITTEST_BEGIN_SIMPLE
-#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
- || !defined(CURL_DISABLE_DIGEST_AUTH)
+#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
+ !defined(CURL_DISABLE_DIGEST_AUTH)
static const char string1[] = "1";
static const char string2[] = "hello-you-fool";
{
UNITTEST_BEGIN(t1610_setup())
-#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
- || defined(USE_LIBSSH2)
+#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
+ defined(USE_LIBSSH2)
static const char string1[] = "1";
static const char string2[] = "hello-you-fool";
{
UNITTEST_BEGIN_SIMPLE
-#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
- || !defined(CURL_DISABLE_DIGEST_AUTH)
+#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
+ !defined(CURL_DISABLE_DIGEST_AUTH)
static const char password[] = "Pa55worD";
static const char string1[] = "1";
for(i = 0; i < 45; i++) {
unsigned char backup = cert[i];
cert[i] = (unsigned char) (byte & 0xff);
- (void) Curl_extract_certinfo(data, 0, beg, end);
+ (void)Curl_extract_certinfo(data, 0, beg, end);
cert[i] = backup;
}
}
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
-CFLAGS = /I. /I ../lib /I../include /nologo /W4 /EHsc /FD /c /DBUILDING_LIBCURL
+CFLAGS = /I. /I../lib /I../include /nologo /W4 /EHsc /FD /c /DBUILDING_LIBCURL
!ENDIF
LFLAGS = /nologo /machine:$(MACHINE)