]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: miscellaneous
authorViktor Szakats <commit@vsz.me>
Fri, 12 Dec 2025 19:51:52 +0000 (20:51 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 18 Dec 2025 20:27:58 +0000 (21:27 +0100)
- apply more clang-format.
- lib/version: use `CURL_ARRAYSIZE()`.
- INSTALL-CMAKE.md: sync-up an option description with others.
- examples: delete unused main args.
- examples/ftpgetinfo: document `_CRT_SECURE_NO_WARNINGS` symbol.
- delete remaining stray duplicate lines.
- acinclude.m4: drop an unnecessary x-hack.
- vtls/mbedtls: join a URL split into two lines.
- src/tool_cb_see: add parentheses around macro expressions.
- src/tool_operate: move literals to the right side of comparisons.
- libtests: sync up fopen/fstat error messages between tests.
- curl_setup.h: replace `if ! defined __LP64` with `ifndef __LP64`.
  I assume it makes no difference on Tandem systems, as the latter form
  is already used in `include/curl/system.h`.

Closes #20018

53 files changed:
acinclude.m4
docs/INSTALL-CMAKE.md
docs/examples/ephiperfifo.c
docs/examples/evhiperfifo.c
docs/examples/ftpgetinfo.c
docs/examples/hiperfifo.c
lib/conncache.c
lib/content_encoding.c
lib/curl_setup.h
lib/curl_setup_once.h
lib/easy.c
lib/easy_lock.h
lib/ftp.c
lib/imap.c
lib/mime.c
lib/rtsp.c
lib/smtp.c
lib/telnet.c
lib/tftp.c
lib/urldata.h
lib/version.c
lib/vquic/vquic.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/schannel.c
lib/vtls/wolfssl.c
lib/vtls/x509asn1.c
lib/ws.c
m4/curl-reentrant.m4
scripts/managen
src/tool_cb_prg.c
src/tool_cb_prg.h
src/tool_cb_see.c
src/tool_cfgable.h
src/tool_filetime.c
src/tool_formparse.c
src/tool_libinfo.c
src/tool_listhelp.c
src/tool_msgs.c
src/tool_operate.c
src/tool_paramhlp.c
src/tool_setup.h
src/tool_writeout_json.c
src/tool_writeout_json.h
tests/libtest/lib505.c
tests/libtest/lib525.c
tests/libtest/lib541.c
tests/libtest/lib568.c
tests/libtest/lib572.c
tests/test1139.pl
tests/unit/unit1664.c

index f38eac8211070f6d67cfa9b4fa9e537f1cf9c129..775102033cdb12146244c675ac6f9a22e5028cf3 100644 (file)
@@ -1168,7 +1168,7 @@ AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
     dnl --with-ca-path given
     capath="$want_capath"
     ca="no"
-  elif test "x$ca_native" != "xno"; then
+  elif test "$ca_native" != "no"; then
     # native ca configured, do not look further
     ca="no"
     capath="no"
index a3598c790a5e9c6436fd6acfffb46d89bc5bd3fe..03b96761459cb4d65ec7eac757cdb6b47ef5df9c 100644 (file)
@@ -389,7 +389,7 @@ Details via CMake
 - `OPENSSL_USE_STATIC_LIBS`:                Look for static OpenSSL libraries.
 - `ZLIB_INCLUDE_DIR`:                       Absolute path to zlib include directory.
 - `ZLIB_LIBRARY`:                           Absolute path to `zlib` library.
-- `ZLIB_USE_STATIC_LIBS`:                   Look for static ZLIB library (requires CMake v3.24).
+- `ZLIB_USE_STATIC_LIBS`:                   Look for static `zlib` library (requires CMake v3.24).
 
 ## Dependency options (tools)
 
index a2cd0f2e7ee3e3a3b1f04fa210d756fff7091435..f5b5913747f3b397f5c2577df851e1964303f306 100644 (file)
@@ -451,15 +451,13 @@ void sigint_handler(int signo)
   g_should_exit_ = 1;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURLcode result;
   struct GlobalInfo g;
   struct itimerspec its;
   struct epoll_event ev;
   struct epoll_event events[10];
-  (void)argc;
-  (void)argv;
 
   result = curl_global_init(CURL_GLOBAL_ALL);
   if(result)
index 776ab06a8832d61353db89237f248847ae8d3e17..aecbfe8f15c93b19c93da7ed90238008c6d513a0 100644 (file)
@@ -410,12 +410,10 @@ static int init_fifo(struct GlobalInfo *g)
   return 0;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURLcode result;
   struct GlobalInfo g;
-  (void)argc;
-  (void)argv;
 
   result = curl_global_init(CURL_GLOBAL_ALL);
   if(result)
index 7d3181b9f3239eee1d60a3995d2926d73b87a1d9..82861c21a8397a36dbc6075c4d634b802ecde9a9 100644 (file)
@@ -27,7 +27,7 @@
  */
 #ifdef _MSC_VER
 #ifndef _CRT_SECURE_NO_WARNINGS
-#define _CRT_SECURE_NO_WARNINGS  /* for fopen() */
+#define _CRT_SECURE_NO_WARNINGS  /* for ctime(), fopen() */
 #endif
 #endif
 
index 4bdba3607a26b96eb1444d107e507227ef56554b..fc4c180582da4256dc5a1e1d3f51a973f0abcfbc 100644 (file)
@@ -419,12 +419,10 @@ static void clean_fifo(struct GlobalInfo *g)
   unlink(fifo);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURLcode result;
   struct GlobalInfo g;
-  (void)argc;
-  (void)argv;
 
   result = curl_global_init(CURL_GLOBAL_ALL);
   if(result)
index 458d85d11024f3a8e5635ad01b951a6b63577311..d9efb61a079d70941b916af3a0c7277b52310e2b 100644 (file)
@@ -69,7 +69,6 @@
     }                                                                   \
   } while(0)
 
-
 /* A list of connections to the same destination. */
 struct cpool_bundle {
   struct Curl_llist conns; /* connections in the bundle */
@@ -167,7 +166,6 @@ static struct cpool_bundle *cpool_find_bundle(struct cpool *cpool,
                         conn->destination, strlen(conn->destination) + 1);
 }
 
-
 static void cpool_remove_bundle(struct cpool *cpool,
                                 struct cpool_bundle *bundle)
 {
index 47adac0f430255e3a8d4addd3145d630a0d09aa9..f0e527e8c4d982126a831987a1f48d5e118f8f6f 100644 (file)
@@ -287,8 +287,10 @@ static const struct Curl_cwtype deflate_encoding = {
   sizeof(struct zlib_writer)
 };
 
+/*
+ * Gzip handler.
+ */
 
-/* Gzip handler. */
 static CURLcode gzip_do_init(struct Curl_easy *data,
                              struct Curl_cwriter *writer)
 {
index 7ba32f069fa8ab97b649a7294389f4d3f9fd01a9..d487bfdff9dfc956d68df3443ab382d49c8f9648 100644 (file)
 
 /* ================================================================ */
 /* Definition of preprocessor macros/symbols which modify compiler  */
-/* behavior or generated code characteristics must be done here,   */
+/* behavior or generated code characteristics must be done here,    */
 /* as appropriate, before any system header file is included. It is */
 /* also possible to have them defined in the config file included   */
 /* before this point. As a result of all this we frown inclusion of */
 #include <assert.h>
 
 #ifdef __TANDEM /* for ns*-tandem-nsk systems */
-#  if ! defined __LP64
+#  ifndef __LP64
 #    include <floss.h> /* FLOSS is only used for 32-bit builds. */
 #  endif
 #endif
  * Definition of our NOP statement Object-like macro
  */
 #ifndef Curl_nop_stmt
-#define Curl_nop_stmt do { } while(0)
+#define Curl_nop_stmt do {} while(0)
 #endif
 
 /*
 Therefore we specify it explicitly. https://github.com/curl/curl/pull/258
 */
 #if defined(_WIN32) || defined(MSDOS)
-#define FOPEN_READTEXT "rt"
-#define FOPEN_WRITETEXT "wt"
+#define FOPEN_READTEXT   "rt"
+#define FOPEN_WRITETEXT  "wt"
 #define FOPEN_APPENDTEXT "at"
 #elif defined(__CYGWIN__)
 /* Cygwin has specific behavior we need to address when _WIN32 is not defined.
@@ -853,12 +853,12 @@ For write we want our output to have line endings of LF and be compatible with
 other Cygwin utilities. For read we want to handle input that may have line
 endings either CRLF or LF so 't' is appropriate.
 */
-#define FOPEN_READTEXT "rt"
-#define FOPEN_WRITETEXT "w"
+#define FOPEN_READTEXT   "rt"
+#define FOPEN_WRITETEXT  "w"
 #define FOPEN_APPENDTEXT "a"
 #else
-#define FOPEN_READTEXT "r"
-#define FOPEN_WRITETEXT "w"
+#define FOPEN_READTEXT   "r"
+#define FOPEN_WRITETEXT  "w"
 #define FOPEN_APPENDTEXT "a"
 #endif
 
@@ -919,7 +919,10 @@ extern curl_calloc_callback Curl_ccalloc;
  * This macro also assigns NULL to given pointer when free'd.
  */
 #define Curl_safefree(ptr) \
-  do { curlx_free(ptr); (ptr) = NULL;} while(0)
+  do {                     \
+    curlx_free(ptr);       \
+    (ptr) = NULL;          \
+  } while(0)
 
 #include <curl/curl.h> /* for CURL_EXTERN, mprintf.h */
 
@@ -1002,15 +1005,13 @@ CURL_EXTERN RECV_TYPE_RETV curl_dbg_recv(RECV_TYPE_ARG1 sockfd,
 
 /* FILE functions */
 CURL_EXTERN int curl_dbg_fclose(FILE *file, int line, const char *source);
-CURL_EXTERN ALLOC_FUNC
-  FILE *curl_dbg_fopen(const char *file, const char *mode,
-                       int line, const char *source);
-CURL_EXTERN ALLOC_FUNC
-  FILE *curl_dbg_freopen(const char *file, const char *mode, FILE *fh,
-                         int line, const char *source);
-CURL_EXTERN ALLOC_FUNC
-  FILE *curl_dbg_fdopen(int filedes, const char *mode,
-                        int line, const char *source);
+CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fopen(const char *file, const char *mode,
+                                            int line, const char *source);
+CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_freopen(const char *file,
+                                              const char *mode, FILE *fh,
+                                              int line, const char *source);
+CURL_EXTERN ALLOC_FUNC FILE *curl_dbg_fdopen(int filedes, const char *mode,
+                                             int line, const char *source);
 
 #define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
 #define fake_sclose(sockfd) curl_dbg_mark_sclose(sockfd, __LINE__, __FILE__)
@@ -1059,47 +1060,47 @@ CURL_EXTERN ALLOC_FUNC
 
 #ifdef CURLDEBUG
 
-#define curlx_strdup(ptr)         curl_dbg_strdup(ptr, __LINE__, __FILE__)
-#define curlx_malloc(size)        curl_dbg_malloc(size, __LINE__, __FILE__)
-#define curlx_calloc(nbelem,size) \
-                              curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
-#define curlx_realloc(ptr,size)   \
-                              curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
-#define curlx_free(ptr)           curl_dbg_free(ptr, __LINE__, __FILE__)
+#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
+#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
+#define curlx_calloc(nbelem, size) \
+  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
+#define curlx_realloc(ptr, size) \
+  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
+#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
 
 #ifdef _WIN32
 #ifdef UNICODE
-#define curlx_tcsdup(ptr)         curl_dbg_wcsdup(ptr, __LINE__, __FILE__)
+#define curlx_tcsdup(ptr)          curl_dbg_wcsdup(ptr, __LINE__, __FILE__)
 #else
-#define curlx_tcsdup(ptr)         curlx_strdup(ptr)
+#define curlx_tcsdup(ptr)          curlx_strdup(ptr)
 #endif
 #endif /* _WIN32 */
 
 #else /* !CURLDEBUG */
 
 #ifdef BUILDING_LIBCURL
-#define curlx_strdup(ptr)         Curl_cstrdup(ptr)
-#define curlx_malloc(size)        Curl_cmalloc(size)
-#define curlx_calloc(nbelem,size) Curl_ccalloc(nbelem, size)
-#define curlx_realloc(ptr,size)   Curl_crealloc(ptr, size)
-#define curlx_free(ptr)           Curl_cfree(ptr)
+#define curlx_strdup(ptr)          Curl_cstrdup(ptr)
+#define curlx_malloc(size)         Curl_cmalloc(size)
+#define curlx_calloc(nbelem, size) Curl_ccalloc(nbelem, size)
+#define curlx_realloc(ptr, size)   Curl_crealloc(ptr, size)
+#define curlx_free(ptr)            Curl_cfree(ptr)
 #else /* !BUILDING_LIBCURL */
 #ifdef _WIN32
-#define curlx_strdup(ptr)         _strdup(ptr)
+#define curlx_strdup(ptr)          _strdup(ptr)
 #else
-#define curlx_strdup(ptr)         strdup(ptr)
+#define curlx_strdup(ptr)          strdup(ptr)
 #endif
-#define curlx_malloc(size)        malloc(size)
-#define curlx_calloc(nbelem,size) calloc(nbelem, size)
-#define curlx_realloc(ptr,size)   realloc(ptr, size)
-#define curlx_free(ptr)           free(ptr)
+#define curlx_malloc(size)         malloc(size)
+#define curlx_calloc(nbelem, size) calloc(nbelem, size)
+#define curlx_realloc(ptr, size)   realloc(ptr, size)
+#define curlx_free(ptr)            free(ptr)
 #endif /* BUILDING_LIBCURL */
 
 #ifdef _WIN32
 #ifdef UNICODE
-#define curlx_tcsdup(ptr)         Curl_wcsdup(ptr)
+#define curlx_tcsdup(ptr)          Curl_wcsdup(ptr)
 #else
-#define curlx_tcsdup(ptr)         curlx_strdup(ptr)
+#define curlx_tcsdup(ptr)          curlx_strdup(ptr)
 #endif
 #endif /* _WIN32 */
 
@@ -1124,8 +1125,8 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
 #endif
 
 #if (defined(USE_NGTCP2) && defined(USE_NGHTTP3)) || \
-    (defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)) || \
-    defined(USE_QUICHE)
+  (defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)) || \
+  defined(USE_QUICHE)
 
 #ifdef CURL_WITH_MULTI_SSL
 #error "MultiSSL combined with QUIC is not supported"
index 742d000b8556110660da3464632bd257a2f16a19..898b9a61ad965e95fd21fefb17115f85ff2e0792 100644 (file)
@@ -263,7 +263,7 @@ typedef unsigned int bit;
 #ifdef DEBUGBUILD
 #define DEBUGF(x) x
 #else
-#define DEBUGF(x) do { } while(0)
+#define DEBUGF(x) do {} while(0)
 #endif
 
 /*
@@ -273,7 +273,7 @@ typedef unsigned int bit;
 #ifdef DEBUGBUILD
 #define DEBUGASSERT(x) assert(x)
 #else
-#define DEBUGASSERT(x) do { } while(0)
+#define DEBUGASSERT(x) do {} while(0)
 #endif
 
 /*
index 3dd28d55c7355cdc96de117df3701254b72e3d90..d7d766a4f8ad264213d0a929273c0854e24a24df 100644 (file)
@@ -643,7 +643,6 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
         }
       }
 
-
       if(!ev->msbump && ev->ms >= 0) {
         /* If nothing updated the timeout, we decrease it by the spent time.
          * If it was updated, it has the new timeout time stored already.
index a10fe3103a8d74a5336a9c3dfffa0b068a4aa076..927b11d70f728571deb8d1825b706ca67b435fc9 100644 (file)
@@ -59,7 +59,7 @@
 #endif
 #endif
 
-#endif
+#endif /* !__INTEL_COMPILER */
 
 static CURL_INLINE void curl_simple_lock_lock(curl_simple_lock *lock)
 {
index f35743017a65de60dcc504802aa844a0b3d7d9d7..00f3385440e5422120fb99be496fcc55ba8ac8d9 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3685,7 +3685,6 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
   return result;
 }
 
-
 /***********************************************************************
  *
  * ftp_perform()
index 5bb2474b33e7a91027b7d6ffb106e47b80a27c46..8b8bd9ca035a50f72fe3a7b71486024e16ba12ec 100644 (file)
@@ -142,7 +142,6 @@ struct IMAP {
   BIT(uidvalidity_set);
 };
 
-
 /* Local API functions */
 static CURLcode imap_regular_transfer(struct Curl_easy *data,
                                       struct IMAP *imap,
index 92edd78878c808756c6869a25c93cd022bc2dd5c..4f01086c1299016b8a442042b974945f894b3bd3 100644 (file)
@@ -262,7 +262,6 @@ static char *Curl_basename(char *path)
 #define basename(x)  Curl_basename(x)
 #endif
 
-
 /* Set readback state. */
 static void mimesetstate(struct mime_state *state,
                          enum mimestate tok, void *ptr)
@@ -272,7 +271,6 @@ static void mimesetstate(struct mime_state *state,
   state->offset = 0;
 }
 
-
 /* Escape header string into allocated memory. */
 static char *escape_string(struct Curl_easy *data,
                            const char *src, enum mimestrategy strategy)
index 8cd756c4a7f99653535f3744eea8ad501dbdcfca..d73ad318132cf69fb00ec832d051bcdfa0d839a1 100644 (file)
@@ -43,7 +43,6 @@
 #include "bufref.h"
 #include "curlx/strparse.h"
 
-
 /* meta key for storing protocol meta at easy handle */
 #define CURL_META_RTSP_EASY   "meta:proto:rtsp:easy"
 /* meta key for storing protocol meta at connection */
@@ -72,7 +71,6 @@ struct RTSP {
   long CSeq_recv; /* CSeq received */
 };
 
-
 #define RTP_PKT_LENGTH(p) ((((unsigned int)((unsigned char)((p)[2]))) << 8) | \
                             ((unsigned int)((unsigned char)((p)[3]))))
 
index f8cef899f3524929eb896be325ce6d3f7e58d7cd..8ae7bc169dca78b6392c59f1a33e4b714f5ef90d 100644 (file)
@@ -1703,7 +1703,6 @@ static CURLcode smtp_regular_transfer(struct Curl_easy *data,
   return result;
 }
 
-
 static void smtp_easy_dtor(void *key, size_t klen, void *entry)
 {
   struct SMTP *smtp = entry;
index 843a6e5b00fcf76c34337a5c4b7b712842f60d54..4a25527388c9ad9bd81f1a7302147e153cf518b7 100644 (file)
@@ -94,7 +94,6 @@
 #define CURL_EMPTY       0
 #define CURL_OPPOSITE    1
 
-
 /* meta key for storing protocol meta at easy handle */
 #define CURL_META_TELNET_EASY   "meta:proto:telnet:easy"
 
index c39222d9c335528ef2450414da5f3c9b0a35d4e2..19b368a6841a8c5c593c80e316af1ed720c6bf0b 100644 (file)
@@ -143,7 +143,6 @@ struct tftp_conn {
   BIT(remote_pinned);
 };
 
-
 /* Forward declarations */
 static CURLcode tftp_rx(struct tftp_conn *state, tftp_event_t event);
 static CURLcode tftp_tx(struct tftp_conn *state, tftp_event_t event);
@@ -162,7 +161,6 @@ static CURLcode tftp_translate_code(tftp_error_t error);
 /*
  * TFTP protocol handler.
  */
-
 const struct Curl_handler Curl_handler_tftp = {
   "tftp",                               /* scheme */
   tftp_setup_connection,                /* setup_connection */
index f3bdf372355322dbcdd03b0bb25dda54be04e07b..8ff5ad98b5c766c794679e7eb0510a5c0acb3a80 100644 (file)
@@ -741,14 +741,14 @@ struct connectdata {
 
 #ifndef CURL_DISABLE_PROXY
 #define CURL_CONN_HOST_DISPNAME(c) \
-          ((c)->bits.socksproxy ? (c)->socks_proxy.host.dispname : \
-            (c)->bits.httpproxy ? (c)->http_proxy.host.dispname : \
-              (c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \
-                (c)->host.dispname)
+  ((c)->bits.socksproxy ? (c)->socks_proxy.host.dispname : \
+    (c)->bits.httpproxy ? (c)->http_proxy.host.dispname : \
+      (c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \
+        (c)->host.dispname)
 #else
 #define CURL_CONN_HOST_DISPNAME(c) \
-          (c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \
-            (c)->host.dispname
+  (c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \
+    (c)->host.dispname
 #endif
 
 /* The end of connectdata. */
@@ -1162,7 +1162,7 @@ enum dupstring {
   STRING_SSL_CIPHER_LIST, /* list of ciphers to use */
   STRING_SSL_CIPHER13_LIST, /* list of TLS 1.3 ciphers to use */
   STRING_SSL_CRLFILE,     /* CRL file to check certificate */
-  STRING_SSL_ISSUERCERT, /* issuer cert file to check certificate */
+  STRING_SSL_ISSUERCERT,  /* issuer cert file to check certificate */
   STRING_SERVICE_NAME,    /* Service name */
 #ifndef CURL_DISABLE_PROXY
   STRING_CERT_PROXY,      /* client certificate filename */
index fe4f637d6796bb87b11fc74b038f570282df5375..246e7871db43f033a00db2043945b5553e258b62 100644 (file)
@@ -551,9 +551,7 @@ static const struct feat features_table[] = {
   {NULL,                 NULL,                0}
 };
 
-static const char *feature_names[sizeof(features_table) /
-                                 sizeof(features_table[0])] = {NULL};
-
+static const char *feature_names[CURL_ARRAYSIZE(features_table)] = { NULL };
 
 static curl_version_info_data version_info = {
   CURLVERSION_NOW,
index be35a96021fe1c451a5a9a9f4d5a89e28bb488ea..03da05dccecff75208d906010fde9cd7980e8543 100644 (file)
@@ -54,7 +54,6 @@
 #define NW_CHUNK_SIZE     (64 * 1024)
 #define NW_SEND_CHUNKS    1
 
-
 int Curl_vquic_init(void)
 {
 #if defined(USE_NGTCP2) && defined(OPENSSL_QUIC_API2)
index e03ad5a9688b55419f6dfbd3fc9b2c63be93fb87..1108d70cb256361d9ee6bd54b82b57a2a11f98e9 100644 (file)
@@ -282,7 +282,6 @@ static const char *myssh_statename(sshstate state)
 #define myssh_statename(x)    ""
 #endif /* !CURL_DISABLE_VERBOSE_STRINGS */
 
-
 #define myssh_to(x, y, z) myssh_set_state(x, y, z)
 
 /*
index ba2a9375d728ed7b52c83223cced6a86685c820f..0f023078eb9ccfaf671053a8d0d07172fa3e3dcb 100644 (file)
@@ -123,7 +123,6 @@ const struct Curl_handler Curl_handler_scp = {
   PROTOPT_NOURLQUERY | PROTOPT_CONN_REUSE
 };
 
-
 /*
  * SFTP protocol handler.
  */
@@ -353,7 +352,6 @@ static const char *myssh_statename(sshstate state)
 #define myssh_statename(x)    ""
 #endif /* !CURL_DISABLE_VERBOSE_STRINGS */
 
-
 #define myssh_state(x, y, z) myssh_set_state(x, y, z)
 
 /*
index 4841e690888e7c61553d8274bb09dae88a844930..b299f684dc7c7192b2bad2839e39558bd7b30524 100644 (file)
@@ -229,9 +229,9 @@ static const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = {
   1024,      /* RSA min key len */
 };
 
-/* See https://web.archive.org/web/20200921194007/tls.mbed.org/discussions/
  generic/howto-determine-exact-buffer-len-for-mbedtls_pk_write_pubkey_der
-*/
+/* See:
* https://web.archive.org/web/20200921194007/tls.mbed.org/discussions/generic/howto-determine-exact-buffer-len-for-mbedtls_pk_write_pubkey_der
+ */
 #define RSA_PUB_DER_MAX_BYTES   (38 + 2 * MBEDTLS_MPI_MAX_SIZE)
 #define ECP_PUB_DER_MAX_BYTES   (30 + 2 * MBEDTLS_ECP_MAX_BYTES)
 
index 7563d9a09031c61c9a7f526fd37728aecd71586e..d09e2d1a71905903ea45b5f84f1fcc454cd36fc9 100644 (file)
@@ -1443,7 +1443,6 @@ fail:
   return 1;
 }
 
-
 static CURLcode client_cert(struct Curl_easy *data,
                             SSL_CTX* ctx,
                             char *cert_file,
@@ -3629,7 +3628,6 @@ static CURLcode ossl_init_ssl(struct ossl_ctx *octx,
                                      alpns_requested, sess_reuse_cb);
 }
 
-
 static CURLcode ossl_init_method(struct Curl_cfilter *cf,
                                  struct Curl_easy *data,
                                  struct ssl_peer *peer,
@@ -3828,7 +3826,7 @@ CURLcode Curl_ossl_ctx_init(struct ossl_ctx *octx,
      OpenSSL supports processing "jumbo TLS record" (8 TLS records) in one go
      for some algorithms, so match that here.
      Experimentation shows that a slightly larger buffer is needed
-      to avoid short reads.
+     to avoid short reads.
 
      However using a large buffer (8 packets) actually decreases performance.
      4 packets is better.
@@ -4669,7 +4667,6 @@ out:
 }
 #endif /* ! CURL_DISABLE_VERBOSE_STRINGS */
 
-
 #ifdef USE_APPLE_SECTRUST
 struct ossl_certs_ctx {
   STACK_OF(X509) *sk;
index 8a6550d8bf1201a59bad8cfa61634006ba1d107b..2aa889bde29cb783083043c7000dbee3d099bc3c 100644 (file)
@@ -70,8 +70,8 @@
 #define SCH_DEV_SHOWBOOL(x)                                   \
   infof(data, "schannel: " #x " %s", (x) ? "TRUE" : "FALSE");
 #else
-#define SCH_DEV(x) do { } while(0)
-#define SCH_DEV_SHOWBOOL(x) do { } while(0)
+#define SCH_DEV(x) do {} while(0)
+#define SCH_DEV_SHOWBOOL(x) do {} while(0)
 #endif
 
 /* Offered by mingw-w64 v8+. MS SDK 7.0A+. */
index cf3774b5e896b69fb815a12327e424851c3eae15..3632d962ef58fb0ef199276a3494e2307ea093ce 100644 (file)
@@ -36,7 +36,6 @@
 #include <wolfssl/options.h>
 #include <wolfssl/version.h>
 
-
 #if LIBWOLFSSL_VERSION_HEX < 0x03004006 /* wolfSSL 3.4.6 (2015) */
 #error "wolfSSL version should be at least 3.4.6"
 #endif
index 4f3c6ca170b9615f4d9b126baa9c74e84aea3b3d..e06499751c68079a9112d64a6df8ad9b736d523c 100644 (file)
@@ -92,7 +92,6 @@
 /* #define CURL_ASN1_CHARACTER_STRING      29 */
 #define CURL_ASN1_BMP_STRING            30
 
-
 #ifdef WANT_EXTRACT_CERTINFO
 /* ASN.1 OID table entry. */
 struct Curl_OID {
index bde13419e63f120343d6ceddf795d46427560208..aea3bac98ce88a997b3d3e3f32a88edea53cfdf4 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -43,7 +43,6 @@
 #include "curlx/strparse.h"
 #include "curlx/warnless.h"
 
-
 /***
     RFC 6455 Section 5.2
 
@@ -770,7 +769,6 @@ static const struct Curl_cwtype ws_cw_decode = {
   sizeof(struct ws_cw_ctx)
 };
 
-
 static void ws_enc_info(struct ws_encoder *enc, struct Curl_easy *data,
                         const char *msg)
 {
index 5141622aefed7737fe494595b339abc2afbb0835..501278eec341d493bab76f34ffe03bc5932547cc 100644 (file)
@@ -184,6 +184,7 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_STRERROR_R], [
   fi
 ])
 
+
 dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
 dnl -------------------------------------------------
 dnl Checks if the preprocessor _REENTRANT definition
index bd3a54424c6880af098325935e2d43d60a0699ea..a537e3843200ec7ca5e6b57500ba4bf03fee4391 100755 (executable)
@@ -1127,7 +1127,7 @@ HEAD
                 $bitmask .= ' | ';
             }
         }
-        $bitmask =~ s/(?=.{76}).{1,76}\|/$&\n  /g;
+        $bitmask =~ s/(?=.{76}).{1,76}\|/$&\n   /g;
         my $arg = $arglong{$long};
         if($arg) {
             $opt .= " $arg";
@@ -1135,7 +1135,7 @@ HEAD
         my $desc = $helplong{$f};
         $desc =~ s/\"/\\\"/g; # escape double quotes
 
-        my $line = sprintf "  {\"%s\",\n   \"%s\",\n  %s},\n", $opt, $desc, $bitmask;
+        my $line = sprintf "  { \"%s\",\n    \"%s\",\n   %s },\n", $opt, $desc, $bitmask;
 
         if(length($opt) > 78) {
             print STDERR "WARN: the --$long name is too long\n";
index ca437de501077a14a34523f8a709677c0de61a6e..8d9302f2e1887128809c6a14d8863c74bc9dde29 100644 (file)
@@ -229,8 +229,7 @@ int tool_progress_cb(void *clientp,
   return 0;
 }
 
-void progressbarinit(struct ProgressData *bar,
-                     struct OperationConfig *config)
+void progressbarinit(struct ProgressData *bar, struct OperationConfig *config)
 {
   memset(bar, 0, sizeof(struct ProgressData));
 
index a8b8930616f3fae170d9e0955eec813a02f6301e..9c2dda2d7e35b3ebfcdedf4fd7ea22c296033dcd 100644 (file)
@@ -42,8 +42,7 @@ struct ProgressData {
 
 struct OperationConfig;
 
-void progressbarinit(struct ProgressData *bar,
-                     struct OperationConfig *config);
+void progressbarinit(struct ProgressData *bar, struct OperationConfig *config);
 
 /*
 ** callback for CURLOPT_PROGRESSFUNCTION
index 6c3cadc7f58fdbb8b33c60888eb52e2e72fc8c77..112faf0dc24aef11ee480368bf9044f8833dd076 100644 (file)
@@ -44,8 +44,8 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
    both represent the same value. Maximum offset used here when we lseek
    using a 'long' data type offset */
 
-#define OUR_MAX_SEEK_L  2147483647L - 1L
-#define OUR_MAX_SEEK_O  0x7FFFFFFF - 0x1
+#define OUR_MAX_SEEK_L (2147483647L - 1L)
+#define OUR_MAX_SEEK_O (0x7FFFFFFF - 0x1)
 
   /* The offset check following here is only interesting if curl_off_t is
      larger than off_t and we are not using the Win32 large file support
index ae6092076cd123513ad5a3516e4238ec35ff13db..6b442dd1c94d264f8ba028f776c041ff0feb53bd 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 #endif
 
-#define MAX_CONFIG_LINE_LENGTH (10*1024*1024)
+#define MAX_CONFIG_LINE_LENGTH (10 * 1024 * 1024)
 
 #define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
 
index 9e548cd50e3e2be6ac69f15946db676fc58f631c..a959af9937229007c74880ba78d1e7d0368eaef0 100644 (file)
@@ -44,8 +44,7 @@ int getfiletime(const char *filename, curl_off_t *stamp)
   TCHAR *tchar_filename = curlx_convert_UTF8_to_tchar(filename);
 
   hfile = CreateFile(tchar_filename, FILE_READ_ATTRIBUTES,
-                     (FILE_SHARE_READ | FILE_SHARE_WRITE |
-                      FILE_SHARE_DELETE),
+                     (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE),
                      NULL, OPEN_EXISTING, 0, NULL);
   curlx_free(tchar_filename);
   if(hfile != INVALID_HANDLE_VALUE) {
@@ -110,8 +109,7 @@ void setfiletime(curl_off_t filetime, const char *filename)
   }
 
   hfile = CreateFile(tchar_filename, FILE_WRITE_ATTRIBUTES,
-                     (FILE_SHARE_READ | FILE_SHARE_WRITE |
-                      FILE_SHARE_DELETE),
+                     (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE),
                      NULL, OPEN_EXISTING, 0, NULL);
   curlx_free(tchar_filename);
   if(hfile != INVALID_HANDLE_VALUE) {
index 543f817cc3e48af382d33b9fcadfd2291c05a3a8..31b381d7e0f1fbe13e330fe5eff4c6ddc90a38e6 100644 (file)
@@ -840,9 +840,9 @@ int formparse(const char *input,
         part->headers = headers;
         headers = NULL;
         if(res == CURLE_READ_ERROR) {
-            /* An error occurred while reading stdin: if read has started,
-               issue the error now. Else, delay it until processed by
-               libcurl. */
+          /* An error occurred while reading stdin: if read has started,
+             issue the error now. Else, delay it until processed by
+             libcurl. */
           if(part->size > 0) {
             warnf("error while reading standard input");
             goto fail;
index 18e0d6964ee5e5f06d1aa9d4dafec6f76a19d0af..4ce22bd2273b86663fd0aff2c784cc0498f4dfc5 100644 (file)
@@ -61,7 +61,7 @@ static struct proto_name_tokenp {
   { "scp",      &proto_scp   },
   { "sftp",     &proto_sftp  },
   { "tftp",     &proto_tftp  },
-  {  NULL,      NULL         }
+  { NULL,       NULL         }
 };
 
 bool feature_altsvc = FALSE;
@@ -87,38 +87,38 @@ static struct feature_name_presentp {
   int           feature_bitmask;
 } const maybe_feature[] = {
   /* Keep alphabetically sorted. */
-  {"alt-svc",        &feature_altsvc,     CURL_VERSION_ALTSVC},
-  {"AsynchDNS",      NULL,                CURL_VERSION_ASYNCHDNS},
-  {"brotli",         &feature_brotli,     CURL_VERSION_BROTLI},
-  {"CharConv",       NULL,                CURL_VERSION_CONV},
-  {"Debug",          NULL,                CURL_VERSION_DEBUG},
-  {"ECH",            &feature_ech,        0},
-  {"gsasl",          NULL,                CURL_VERSION_GSASL},
-  {"GSS-API",        NULL,                CURL_VERSION_GSSAPI},
-  {"HSTS",           &feature_hsts,       CURL_VERSION_HSTS},
-  {"HTTP2",          &feature_http2,      CURL_VERSION_HTTP2},
-  {"HTTP3",          &feature_http3,      CURL_VERSION_HTTP3},
-  {"HTTPS-proxy",    &feature_httpsproxy, CURL_VERSION_HTTPS_PROXY},
-  {"IDN",            NULL,                CURL_VERSION_IDN},
-  {"IPv6",           NULL,                CURL_VERSION_IPV6},
-  {"Kerberos",       NULL,                CURL_VERSION_KERBEROS5},
-  {"Largefile",      NULL,                CURL_VERSION_LARGEFILE},
-  {"libz",           &feature_libz,       CURL_VERSION_LIBZ},
-  {"MultiSSL",       NULL,                CURL_VERSION_MULTI_SSL},
-  {"NTLM",           &feature_ntlm,       CURL_VERSION_NTLM},
-  {"NTLM_WB",        &feature_ntlm_wb,    CURL_VERSION_NTLM_WB},
-  {"PSL",            NULL,                CURL_VERSION_PSL},
-  {"SPNEGO",         &feature_spnego,     CURL_VERSION_SPNEGO},
-  {"SSL",            &feature_ssl,        CURL_VERSION_SSL},
-  {"SSPI",           NULL,                CURL_VERSION_SSPI},
-  {"SSLS-EXPORT",    &feature_ssls_export, 0},
-  {"threadsafe",     NULL,                CURL_VERSION_THREADSAFE},
-  {"TLS-SRP",        &feature_tls_srp,    CURL_VERSION_TLSAUTH_SRP},
-  {"TrackMemory",    NULL,                CURL_VERSION_CURLDEBUG},
-  {"Unicode",        NULL,                CURL_VERSION_UNICODE},
-  {"UnixSockets",    NULL,                CURL_VERSION_UNIX_SOCKETS},
-  {"zstd",           &feature_zstd,       CURL_VERSION_ZSTD},
-  {NULL,             NULL,                0}
+  { "alt-svc",        &feature_altsvc,      CURL_VERSION_ALTSVC },
+  { "AsynchDNS",      NULL,                 CURL_VERSION_ASYNCHDNS },
+  { "brotli",         &feature_brotli,      CURL_VERSION_BROTLI },
+  { "CharConv",       NULL,                 CURL_VERSION_CONV },
+  { "Debug",          NULL,                 CURL_VERSION_DEBUG },
+  { "ECH",            &feature_ech,         0 },
+  { "gsasl",          NULL,                 CURL_VERSION_GSASL },
+  { "GSS-API",        NULL,                 CURL_VERSION_GSSAPI },
+  { "HSTS",           &feature_hsts,        CURL_VERSION_HSTS },
+  { "HTTP2",          &feature_http2,       CURL_VERSION_HTTP2 },
+  { "HTTP3",          &feature_http3,       CURL_VERSION_HTTP3 },
+  { "HTTPS-proxy",    &feature_httpsproxy,  CURL_VERSION_HTTPS_PROXY },
+  { "IDN",            NULL,                 CURL_VERSION_IDN },
+  { "IPv6",           NULL,                 CURL_VERSION_IPV6 },
+  { "Kerberos",       NULL,                 CURL_VERSION_KERBEROS5 },
+  { "Largefile",      NULL,                 CURL_VERSION_LARGEFILE },
+  { "libz",           &feature_libz,        CURL_VERSION_LIBZ },
+  { "MultiSSL",       NULL,                 CURL_VERSION_MULTI_SSL },
+  { "NTLM",           &feature_ntlm,        CURL_VERSION_NTLM },
+  { "NTLM_WB",        &feature_ntlm_wb,     CURL_VERSION_NTLM_WB },
+  { "PSL",            NULL,                 CURL_VERSION_PSL },
+  { "SPNEGO",         &feature_spnego,      CURL_VERSION_SPNEGO },
+  { "SSL",            &feature_ssl,         CURL_VERSION_SSL },
+  { "SSPI",           NULL,                 CURL_VERSION_SSPI },
+  { "SSLS-EXPORT",    &feature_ssls_export, 0 },
+  { "threadsafe",     NULL,                 CURL_VERSION_THREADSAFE },
+  { "TLS-SRP",        &feature_tls_srp,     CURL_VERSION_TLSAUTH_SRP },
+  { "TrackMemory",    NULL,                 CURL_VERSION_CURLDEBUG },
+  { "Unicode",        NULL,                 CURL_VERSION_UNICODE },
+  { "UnixSockets",    NULL,                 CURL_VERSION_UNIX_SOCKETS },
+  { "zstd",           &feature_zstd,        CURL_VERSION_ZSTD },
+  { NULL,             NULL,                 0 }
 };
 
 static const char *fnames[CURL_ARRAYSIZE(maybe_feature)];
@@ -186,7 +186,7 @@ CURLcode get_libcurl_info(void)
   }
 
   feature_libssh2 = curlinfo->libssh_version &&
-    !strncmp("libssh2", curlinfo->libssh_version, 7);
+                    !strncmp("libssh2", curlinfo->libssh_version, 7);
   return CURLE_OK;
 }
 
index 21019c7de1617b98be9b864418a2204cc91f43cf..48a32214b8018f8fc9c6122f14a91b127dbecbd9 100644 (file)
  */
 
 const struct helptxt helptext[] = {
-  {"    --abstract-unix-socket <path>",
-   "Connect via abstract Unix domain socket",
-   CURLHELP_CONNECTION},
-  {"    --alt-svc <filename>",
-   "Enable alt-svc with this cache file",
-   CURLHELP_HTTP},
-  {"    --anyauth",
-   "Pick any authentication method",
-   CURLHELP_HTTP | CURLHELP_PROXY | CURLHELP_AUTH},
-  {"-a, --append",
-   "Append to target file when uploading",
-   CURLHELP_FTP | CURLHELP_SFTP},
-  {"    --aws-sigv4 <provider1[:prvdr2[:reg[:srv]]]>",
-   "AWS V4 signature auth",
-   CURLHELP_AUTH | CURLHELP_HTTP},
-  {"    --basic",
-   "HTTP Basic Authentication",
-   CURLHELP_AUTH},
-  {"    --ca-native",
-   "Load CA certs from the OS",
-   CURLHELP_TLS},
-  {"    --cacert <file>",
-   "CA certificate to verify peer against",
-   CURLHELP_TLS},
-  {"    --capath <dir>",
-   "CA directory to verify peer against",
-   CURLHELP_TLS},
-  {"-E, --cert <certificate[:password]>",
-   "Client certificate file and password",
-   CURLHELP_TLS},
-  {"    --cert-status",
-   "Verify server cert status OCSP-staple",
-   CURLHELP_TLS},
-  {"    --cert-type <type>",
-   "Certificate type (DER/PEM/ENG/PROV/P12)",
-   CURLHELP_TLS},
-  {"    --ciphers <list>",
-   "TLS 1.2 (1.1, 1.0) ciphers to use",
-   CURLHELP_TLS},
-  {"    --compressed",
-   "Request compressed response",
-   CURLHELP_HTTP},
-  {"    --compressed-ssh",
-   "Enable SSH compression",
-   CURLHELP_SCP | CURLHELP_SSH},
-  {"-K, --config <file>",
-   "Read config from a file",
-   CURLHELP_CURL},
-  {"    --connect-timeout <seconds>",
-   "Maximum time allowed to connect",
-   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
-  {"    --connect-to <HOST1:PORT1:HOST2:PORT2>",
-   "Connect to host2 instead of host1",
-   CURLHELP_CONNECTION | CURLHELP_DNS},
-  {"-C, --continue-at <offset>",
-   "Resumed transfer offset",
-   CURLHELP_CONNECTION},
-  {"-b, --cookie <data|filename>",
-   "Send cookies from string/load from file",
-   CURLHELP_HTTP},
-  {"-c, --cookie-jar <filename>",
-   "Save cookies to <filename> after operation",
-   CURLHELP_HTTP},
-  {"    --create-dirs",
-   "Create necessary local directory hierarchy",
-   CURLHELP_OUTPUT},
-  {"    --create-file-mode <mode>",
-   "File mode for created files",
-   CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_FILE | CURLHELP_UPLOAD},
-  {"    --crlf",
-   "Convert LF to CRLF in upload",
-   CURLHELP_FTP | CURLHELP_SMTP},
-  {"    --crlfile <file>",
-   "Certificate Revocation list",
-   CURLHELP_TLS},
-  {"    --curves <list>",
-   "(EC) TLS key exchange algorithms to request",
-   CURLHELP_TLS},
-  {"-d, --data <data>",
-   "HTTP POST data",
-   CURLHELP_IMPORTANT | CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"    --data-ascii <data>",
-   "HTTP POST ASCII data",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"    --data-binary <data>",
-   "HTTP POST binary data",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"    --data-raw <data>",
-   "HTTP POST data, '@' allowed",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"    --data-urlencode <data>",
-   "HTTP POST data URL encoded",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"    --delegation <LEVEL>",
-   "GSS-API delegation permission",
-   CURLHELP_AUTH},
-  {"    --digest",
-   "HTTP Digest Authentication",
-   CURLHELP_PROXY | CURLHELP_AUTH | CURLHELP_HTTP},
-  {"-q, --disable",
-   "Disable .curlrc",
-   CURLHELP_CURL},
-  {"    --disable-eprt",
-   "Inhibit using EPRT or LPRT",
-   CURLHELP_FTP},
-  {"    --disable-epsv",
-   "Inhibit using EPSV",
-   CURLHELP_FTP},
-  {"    --disallow-username-in-url",
-   "Disallow username in URL",
-   CURLHELP_CURL},
-  {"    --dns-interface <interface>",
-   "Interface to use for DNS requests",
-   CURLHELP_DNS},
-  {"    --dns-ipv4-addr <address>",
-   "IPv4 address to use for DNS requests",
-   CURLHELP_DNS},
-  {"    --dns-ipv6-addr <address>",
-   "IPv6 address to use for DNS requests",
-   CURLHELP_DNS},
-  {"    --dns-servers <addresses>",
-   "DNS server addrs to use",
-   CURLHELP_DNS},
-  {"    --doh-cert-status",
-   "Verify DoH server cert status OCSP-staple",
-   CURLHELP_DNS | CURLHELP_TLS},
-  {"    --doh-insecure",
-   "Allow insecure DoH server connections",
-   CURLHELP_DNS | CURLHELP_TLS},
-  {"    --doh-url <URL>",
-   "Resolve hostnames over DoH",
-   CURLHELP_DNS},
-  {"    --dump-ca-embed",
-   "Write the embedded CA bundle to standard output",
-   CURLHELP_HTTP | CURLHELP_PROXY | CURLHELP_TLS},
-  {"-D, --dump-header <filename>",
-   "Write the received headers to <filename>",
-   CURLHELP_HTTP | CURLHELP_FTP},
-  {"    --ech <config>",
-   "Configure ECH",
-   CURLHELP_TLS},
-  {"    --egd-file <file>",
-   "EGD socket path for random data",
-   CURLHELP_DEPRECATED},
-  {"    --engine <name>",
-   "Crypto engine to use",
-   CURLHELP_TLS},
-  {"    --etag-compare <file>",
-   "Load ETag from file",
-   CURLHELP_HTTP},
-  {"    --etag-save <file>",
-   "Parse incoming ETag and save to a file",
-   CURLHELP_HTTP},
-  {"    --expect100-timeout <seconds>",
-   "How long to wait for 100-continue",
-   CURLHELP_HTTP | CURLHELP_TIMEOUT},
-  {"-f, --fail",
-   "Fail fast with no output on HTTP errors",
-   CURLHELP_IMPORTANT | CURLHELP_HTTP},
-  {"    --fail-early",
-   "Fail on first transfer error",
-   CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --fail-with-body",
-   "Fail on HTTP errors but save the body",
-   CURLHELP_HTTP | CURLHELP_OUTPUT},
-  {"    --false-start",
-   "Enable TLS False Start",
-   CURLHELP_DEPRECATED},
-  {"    --follow",
-   "Follow redirects per spec",
-   CURLHELP_HTTP},
-  {"-F, --form <name=content>",
-   "Specify multipart MIME data",
-   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_IMAP |
-   CURLHELP_SMTP},
-  {"    --form-escape",
-   "Escape form fields using backslash",
-   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST},
-  {"    --form-string <name=string>",
-   "Specify multipart MIME data",
-   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_SMTP |
-   CURLHELP_IMAP},
-  {"    --ftp-account <data>",
-   "Account data string",
-   CURLHELP_FTP | CURLHELP_AUTH},
-  {"    --ftp-alternative-to-user <command>",
-   "String to replace USER [name]",
-   CURLHELP_FTP},
-  {"    --ftp-create-dirs",
-   "Create the remote dirs if not present",
-   CURLHELP_FTP | CURLHELP_SFTP},
-  {"    --ftp-method <method>",
-   "Control CWD usage",
-   CURLHELP_FTP},
-  {"    --ftp-pasv",
-   "Send PASV/EPSV instead of PORT",
-   CURLHELP_FTP},
-  {"-P, --ftp-port <address>",
-   "Send PORT instead of PASV",
-   CURLHELP_FTP},
-  {"    --ftp-pret",
-   "Send PRET before PASV",
-   CURLHELP_FTP},
-  {"    --ftp-skip-pasv-ip",
-   "Skip the IP address for PASV",
-   CURLHELP_FTP},
-  {"    --ftp-ssl-ccc",
-   "Send CCC after authenticating",
-   CURLHELP_FTP | CURLHELP_TLS},
-  {"    --ftp-ssl-ccc-mode <active/passive>",
-   "Set CCC mode",
-   CURLHELP_FTP | CURLHELP_TLS},
-  {"    --ftp-ssl-control",
-   "Require TLS for login, clear for transfer",
-   CURLHELP_FTP | CURLHELP_TLS},
-  {"-G, --get",
-   "Put the post data in the URL and use GET",
-   CURLHELP_HTTP},
-  {"-g, --globoff",
-   "Disable URL globbing with {} and []",
-   CURLHELP_CURL},
-  {"    --happy-eyeballs-timeout-ms <ms>",
-   "Time for IPv6 before IPv4",
-   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
-  {"    --haproxy-clientip <ip>",
-   "Set address in HAProxy PROXY",
-   CURLHELP_HTTP | CURLHELP_PROXY},
-  {"    --haproxy-protocol",
-   "Send HAProxy PROXY protocol v1 header",
-   CURLHELP_HTTP | CURLHELP_PROXY},
-  {"-I, --head",
-   "Show document info only",
-   CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_FILE},
-  {"-H, --header <header/@file>",
-   "Pass custom header(s) to server",
-   CURLHELP_HTTP | CURLHELP_IMAP | CURLHELP_SMTP},
-  {"-h, --help <subject>",
-   "Get help for commands",
-   CURLHELP_IMPORTANT | CURLHELP_CURL},
-  {"    --hostpubmd5 <md5>",
-   "Acceptable MD5 hash of host public key",
-   CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH},
-  {"    --hostpubsha256 <sha256>",
-   "Acceptable SHA256 hash of host public key",
-   CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH},
-  {"    --hsts <filename>",
-   "Enable HSTS with this cache file",
-   CURLHELP_HTTP},
-  {"    --http0.9",
-   "Allow HTTP/0.9 responses",
-   CURLHELP_HTTP},
-  {"-0, --http1.0",
-   "Use HTTP/1.0",
-   CURLHELP_HTTP},
-  {"    --http1.1",
-   "Use HTTP/1.1",
-   CURLHELP_HTTP},
-  {"    --http2",
-   "Use HTTP/2",
-   CURLHELP_HTTP},
-  {"    --http2-prior-knowledge",
-   "Use HTTP/2 without HTTP/1.1 Upgrade",
-   CURLHELP_HTTP},
-  {"    --http3",
-   "Use HTTP/3",
-   CURLHELP_HTTP},
-  {"    --http3-only",
-   "Use HTTP/3 only",
-   CURLHELP_HTTP},
-  {"    --ignore-content-length",
-   "Ignore the size of the remote resource",
-   CURLHELP_HTTP | CURLHELP_FTP},
-  {"-k, --insecure",
-   "Allow insecure server connections",
-   CURLHELP_TLS | CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH},
-  {"    --interface <name>",
-   "Use network interface",
-   CURLHELP_CONNECTION},
-  {"    --ip-tos <string>",
-   "Set IP Type of Service or Traffic Class",
-   CURLHELP_CONNECTION},
-  {"    --ipfs-gateway <URL>",
-   "Gateway for IPFS",
-   CURLHELP_CURL},
-  {"-4, --ipv4",
-   "Resolve names to IPv4 addresses",
-   CURLHELP_CONNECTION | CURLHELP_DNS},
-  {"-6, --ipv6",
-   "Resolve names to IPv6 addresses",
-   CURLHELP_CONNECTION | CURLHELP_DNS},
-  {"    --json <data>",
-   "HTTP POST JSON",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"-j, --junk-session-cookies",
-   "Ignore session cookies read from file",
-   CURLHELP_HTTP},
-  {"    --keepalive-cnt <integer>",
-   "Maximum number of keepalive probes",
-   CURLHELP_CONNECTION},
-  {"    --keepalive-time <seconds>",
-   "Interval time for keepalive probes",
-   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
-  {"    --key <key>",
-   "Private key filename",
-   CURLHELP_TLS | CURLHELP_SSH},
-  {"    --key-type <type>",
-   "Private key file type (DER/PEM/ENG)",
-   CURLHELP_TLS},
-  {"    --knownhosts <file>",
-   "Specify knownhosts path",
-   CURLHELP_SSH},
-  {"    --krb <level>",
-   "Enable Kerberos with security <level>",
-   CURLHELP_DEPRECATED},
-  {"    --libcurl <file>",
-   "Generate libcurl code for this command line",
-   CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --limit-rate <speed>",
-   "Limit transfer speed to RATE",
-   CURLHELP_CONNECTION},
-  {"-l, --list-only",
-   "List only mode",
-   CURLHELP_FTP | CURLHELP_POP3 | CURLHELP_SFTP | CURLHELP_FILE},
-  {"    --local-port <range>",
-   "Use a local port number within RANGE",
-   CURLHELP_CONNECTION},
-  {"-L, --location",
-   "Follow redirects",
-   CURLHELP_HTTP},
-  {"    --location-trusted",
-   "As --location, but send secrets to other hosts",
-   CURLHELP_HTTP | CURLHELP_AUTH},
-  {"    --login-options <options>",
-   "Server login options",
-   CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP | CURLHELP_AUTH |
-   CURLHELP_LDAP},
-  {"    --mail-auth <address>",
-   "Originator address of the original email",
-   CURLHELP_SMTP},
-  {"    --mail-from <address>",
-   "Mail from this address",
-   CURLHELP_SMTP},
-  {"    --mail-rcpt <address>",
-   "Mail to this address",
-   CURLHELP_SMTP},
-  {"    --mail-rcpt-allowfails",
-   "Allow RCPT TO command to fail",
-   CURLHELP_SMTP},
-  {"-M, --manual",
-   "Display the full manual",
-   CURLHELP_CURL},
-  {"    --max-filesize <bytes>",
-   "Maximum file size to download",
-   CURLHELP_CONNECTION},
-  {"    --max-redirs <num>",
-   "Maximum number of redirects allowed",
-   CURLHELP_HTTP},
-  {"-m, --max-time <seconds>",
-   "Maximum time allowed for transfer",
-   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
-  {"    --metalink",
-   "Process given URLs as metalink XML file",
-   CURLHELP_DEPRECATED},
-  {"    --mptcp",
-   "Enable Multipath TCP",
-   CURLHELP_CONNECTION},
-  {"    --negotiate",
-   "Use HTTP Negotiate (SPNEGO) authentication",
-   CURLHELP_AUTH | CURLHELP_HTTP},
-  {"-n, --netrc",
-   "Must read .netrc for username and password",
-   CURLHELP_AUTH},
-  {"    --netrc-file <filename>",
-   "Specify FILE for netrc",
-   CURLHELP_AUTH},
-  {"    --netrc-optional",
-   "Use either .netrc or URL",
-   CURLHELP_AUTH},
-  {"-:, --next",
-   "Make next URL use separate options",
-   CURLHELP_CURL},
-  {"    --no-alpn",
-   "Disable the ALPN TLS extension",
-   CURLHELP_TLS | CURLHELP_HTTP},
-  {"-N, --no-buffer",
-   "Disable buffering of the output stream",
-   CURLHELP_OUTPUT},
-  {"    --no-clobber",
-   "Do not overwrite files that already exist",
-   CURLHELP_OUTPUT},
-  {"    --no-keepalive",
-   "Disable TCP keepalive on the connection",
-   CURLHELP_CONNECTION},
-  {"    --no-npn",
-   "Disable the NPN TLS extension",
-   CURLHELP_DEPRECATED},
-  {"    --no-progress-meter",
-   "Do not show the progress meter",
-   CURLHELP_VERBOSE},
-  {"    --no-sessionid",
-   "Disable SSL session-ID reusing",
-   CURLHELP_TLS},
-  {"    --noproxy <no-proxy-list>",
-   "List of hosts which do not use proxy",
-   CURLHELP_PROXY},
-  {"    --ntlm",
-   "HTTP NTLM authentication",
-   CURLHELP_AUTH | CURLHELP_HTTP},
-  {"    --ntlm-wb",
-   "HTTP NTLM authentication with winbind",
-   CURLHELP_DEPRECATED},
-  {"    --oauth2-bearer <token>",
-   "OAuth 2 Bearer Token",
-   CURLHELP_AUTH | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
-   CURLHELP_LDAP},
-  {"    --out-null",
-   "Discard response data into the void",
-   CURLHELP_OUTPUT},
-  {"-o, --output <file>",
-   "Write to file instead of stdout",
-   CURLHELP_IMPORTANT | CURLHELP_OUTPUT},
-  {"    --output-dir <dir>",
-   "Directory to save files in",
-   CURLHELP_OUTPUT},
-  {"-Z, --parallel",
-   "Perform transfers in parallel",
-   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --parallel-immediate",
-   "Do not wait for multiplexing",
-   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --parallel-max <num>",
-   "Maximum concurrency for parallel transfers",
-   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --parallel-max-host <num>",
-   "Maximum connections to a single host",
-   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"    --pass <phrase>",
-   "Passphrase for the private key",
-   CURLHELP_SSH | CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --path-as-is",
-   "Do not squash .. sequences in URL path",
-   CURLHELP_CURL},
-  {"    --pinnedpubkey <hashes>",
-   "Public key to verify peer against",
-   CURLHELP_TLS},
-  {"    --post301",
-   "Do not switch to GET after a 301 redirect",
-   CURLHELP_HTTP | CURLHELP_POST},
-  {"    --post302",
-   "Do not switch to GET after a 302 redirect",
-   CURLHELP_HTTP | CURLHELP_POST},
-  {"    --post303",
-   "Do not switch to GET after a 303 redirect",
-   CURLHELP_HTTP | CURLHELP_POST},
-  {"    --preproxy <[protocol://]host[:port]>",
-   "Use this proxy first",
-   CURLHELP_PROXY},
-  {"-#, --progress-bar",
-   "Display transfer progress as a bar",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --proto <protocols>",
-   "Enable/disable PROTOCOLS",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
-  {"    --proto-default <protocol>",
-   "Use PROTOCOL for any URL missing a scheme",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
-  {"    --proto-redir <protocols>",
-   "Enable/disable PROTOCOLS on redirect",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
-  {"-x, --proxy <[protocol://]host[:port]>",
-   "Use this proxy",
-   CURLHELP_PROXY},
-  {"    --proxy-anyauth",
-   "Pick any proxy authentication method",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --proxy-basic",
-   "Use Basic authentication on the proxy",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --proxy-ca-native",
-   "Load CA certs from the OS to verify proxy",
-   CURLHELP_TLS},
-  {"    --proxy-cacert <file>",
-   "CA certificates to verify proxy against",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-capath <dir>",
-   "CA directory to verify proxy against",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-cert <cert[:passwd]>",
-   "Set client certificate for proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-cert-type <type>",
-   "Client certificate type for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-ciphers <list>",
-   "TLS 1.2 (1.1, 1.0) ciphers to use for proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-crlfile <file>",
-   "Set a CRL list for proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-digest",
-   "Digest auth with the proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-header <header/@file>",
-   "Pass custom header(s) to proxy",
-   CURLHELP_PROXY},
-  {"    --proxy-http2",
-   "Use HTTP/2 with HTTPS proxy",
-   CURLHELP_HTTP | CURLHELP_PROXY},
-  {"    --proxy-insecure",
-   "Skip HTTPS proxy cert verification",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-key <key>",
-   "Private key for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-key-type <type>",
-   "Private key file type for proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-negotiate",
-   "HTTP Negotiate (SPNEGO) auth with the proxy",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --proxy-ntlm",
-   "NTLM authentication with the proxy",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --proxy-pass <phrase>",
-   "Passphrase for private key for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --proxy-pinnedpubkey <hashes>",
-   "FILE/HASHES public key to verify proxy with",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-service-name <name>",
-   "SPNEGO proxy service name",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-ssl-allow-beast",
-   "Allow this security flaw for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-ssl-auto-client-cert",
-   "Auto client certificate for proxy",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-tls13-ciphers <list>",
-   "TLS 1.3 proxy cipher suites",
-   CURLHELP_PROXY | CURLHELP_TLS},
-  {"    --proxy-tlsauthtype <type>",
-   "TLS authentication type for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --proxy-tlspassword <string>",
-   "TLS password for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --proxy-tlsuser <name>",
-   "TLS username for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --proxy-tlsv1",
-   "TLSv1 for HTTPS proxy",
-   CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
-  {"-U, --proxy-user <user:password>",
-   "Proxy user and password",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --proxy1.0 <host[:port]>",
-   "Use HTTP/1.0 proxy on given port",
-   CURLHELP_PROXY},
-  {"-p, --proxytunnel",
-   "HTTP proxy tunnel (using CONNECT)",
-   CURLHELP_PROXY},
-  {"    --pubkey <key>",
-   "SSH Public key filename",
-   CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH | CURLHELP_AUTH},
-  {"-Q, --quote <command>",
-   "Send command(s) to server before transfer",
-   CURLHELP_FTP | CURLHELP_SFTP},
-  {"    --random-file <file>",
-   "File for reading random data from",
-   CURLHELP_DEPRECATED},
-  {"-r, --range <range>",
-   "Retrieve only the bytes within RANGE",
-   CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_FILE},
-  {"    --rate <max request rate>",
-   "Request rate for serial transfers",
-   CURLHELP_CONNECTION | CURLHELP_GLOBAL},
-  {"    --raw",
-   "Do HTTP raw; no transfer decoding",
-   CURLHELP_HTTP},
-  {"-e, --referer <URL>",
-   "Referrer URL",
-   CURLHELP_HTTP},
-  {"-J, --remote-header-name",
-   "Use the header-provided filename",
-   CURLHELP_OUTPUT},
-  {"-O, --remote-name",
-   "Write output to file named as remote file",
-   CURLHELP_IMPORTANT | CURLHELP_OUTPUT},
-  {"    --remote-name-all",
-   "Use the remote filename for all URLs",
-   CURLHELP_OUTPUT},
-  {"-R, --remote-time",
-   "Set remote file's time on local output",
-   CURLHELP_OUTPUT},
-  {"    --remove-on-error",
-   "Remove output file on errors",
-   CURLHELP_OUTPUT},
-  {"-X, --request <method>",
-   "Specify request method to use",
-   CURLHELP_CONNECTION | CURLHELP_POP3 | CURLHELP_FTP | CURLHELP_IMAP |
-   CURLHELP_SMTP},
-  {"    --request-target <path>",
-   "Specify the target for this request",
-   CURLHELP_HTTP},
-  {"    --resolve <[+]host:port:addr[,addr]...>",
-   "Resolve host+port to address",
-   CURLHELP_CONNECTION | CURLHELP_DNS},
-  {"    --retry <num>",
-   "Retry request if transient problems occur",
-   CURLHELP_CURL},
-  {"    --retry-all-errors",
-   "Retry all errors (with --retry)",
-   CURLHELP_CURL},
-  {"    --retry-connrefused",
-   "Retry on connection refused (with --retry)",
-   CURLHELP_CURL},
-  {"    --retry-delay <seconds>",
-   "Wait time between retries",
-   CURLHELP_CURL | CURLHELP_TIMEOUT},
-  {"    --retry-max-time <seconds>",
-   "Retry only within this period",
-   CURLHELP_CURL | CURLHELP_TIMEOUT},
-  {"    --sasl-authzid <identity>",
-   "Identity for SASL PLAIN authentication",
-   CURLHELP_AUTH},
-  {"    --sasl-ir",
-   "Initial response in SASL authentication",
-   CURLHELP_AUTH},
-  {"    --service-name <name>",
-   "SPNEGO service name",
-   CURLHELP_AUTH},
-  {"-S, --show-error",
-   "Show error even when -s is used",
-   CURLHELP_CURL | CURLHELP_GLOBAL},
-  {"-i, --show-headers",
-   "Show response headers in output",
-   CURLHELP_IMPORTANT | CURLHELP_VERBOSE | CURLHELP_OUTPUT},
-  {"    --sigalgs <list>",
-   "TLS signature algorithms to use",
-   CURLHELP_TLS},
-  {"-s, --silent",
-   "Silent mode",
-   CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
-  {"    --skip-existing",
-   "Skip download if local file already exists",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
-  {"    --socks4 <host[:port]>",
-   "SOCKS4 proxy on given host + port",
-   CURLHELP_PROXY},
-  {"    --socks4a <host[:port]>",
-   "SOCKS4a proxy on given host + port",
-   CURLHELP_PROXY},
-  {"    --socks5 <host[:port]>",
-   "SOCKS5 proxy on given host + port",
-   CURLHELP_PROXY},
-  {"    --socks5-basic",
-   "Username/password auth for SOCKS5 proxies",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --socks5-gssapi",
-   "Enable GSS-API auth for SOCKS5 proxies",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --socks5-gssapi-nec",
-   "Compatibility with NEC SOCKS5 server",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --socks5-gssapi-service <name>",
-   "SOCKS5 proxy service name for GSS-API",
-   CURLHELP_PROXY | CURLHELP_AUTH},
-  {"    --socks5-hostname <host[:port]>",
-   "SOCKS5 proxy, pass hostname to proxy",
-   CURLHELP_PROXY},
-  {"-Y, --speed-limit <speed>",
-   "Stop transfers slower than this",
-   CURLHELP_CONNECTION},
-  {"-y, --speed-time <seconds>",
-   "Trigger 'speed-limit' abort after this time",
-   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
-  {"    --ssl",
-   "Try enabling TLS",
-   CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
-   CURLHELP_LDAP},
-  {"    --ssl-allow-beast",
-   "Allow security flaw to improve interop",
-   CURLHELP_TLS},
-  {"    --ssl-auto-client-cert",
-   "Use auto client certificate (Schannel)",
-   CURLHELP_TLS},
-  {"    --ssl-no-revoke",
-   "Disable cert revocation checks (Schannel)",
-   CURLHELP_TLS},
-  {"    --ssl-reqd",
-   "Require SSL/TLS",
-   CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
-   CURLHELP_LDAP},
-  {"    --ssl-revoke-best-effort",
-   "Ignore missing cert CRL dist points",
-   CURLHELP_TLS},
-  {"    --ssl-sessions <filename>",
-   "Load/save SSL session tickets from/to this file",
-   CURLHELP_TLS},
-  {"-2, --sslv2",
-   "SSLv2",
-   CURLHELP_DEPRECATED},
-  {"-3, --sslv3",
-   "SSLv3",
-   CURLHELP_DEPRECATED},
-  {"    --stderr <file>",
-   "Where to redirect stderr",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --styled-output",
-   "Enable styled output for HTTP headers",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --suppress-connect-headers",
-   "Suppress proxy CONNECT response headers",
-   CURLHELP_PROXY},
-  {"    --tcp-fastopen",
-   "Use TCP Fast Open",
-   CURLHELP_CONNECTION},
-  {"    --tcp-nodelay",
-   "Set TCP_NODELAY",
-   CURLHELP_CONNECTION},
-  {"-t, --telnet-option <opt=val>",
-   "Set telnet option",
-   CURLHELP_TELNET},
-  {"    --tftp-blksize <value>",
-   "Set TFTP BLKSIZE option",
-   CURLHELP_TFTP},
-  {"    --tftp-no-options",
-   "Do not send any TFTP options",
-   CURLHELP_TFTP},
-  {"-z, --time-cond <time>",
-   "Transfer based on a time condition",
-   CURLHELP_HTTP | CURLHELP_FTP},
-  {"    --tls-earlydata",
-   "Allow use of TLSv1.3 early data (0RTT)",
-   CURLHELP_TLS},
-  {"    --tls-max <VERSION>",
-   "Maximum allowed TLS version",
-   CURLHELP_TLS},
-  {"    --tls13-ciphers <list>",
-   "TLS 1.3 cipher suites to use",
-   CURLHELP_TLS},
-  {"    --tlsauthtype <type>",
-   "TLS authentication type",
-   CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --tlspassword <string>",
-   "TLS password",
-   CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --tlsuser <name>",
-   "TLS username",
-   CURLHELP_TLS | CURLHELP_AUTH},
-  {"-1, --tlsv1",
-   "TLSv1.0 or greater",
-   CURLHELP_TLS},
-  {"    --tlsv1.0",
-   "TLSv1.0 or greater",
-   CURLHELP_TLS},
-  {"    --tlsv1.1",
-   "TLSv1.1 or greater",
-   CURLHELP_TLS},
-  {"    --tlsv1.2",
-   "TLSv1.2 or greater",
-   CURLHELP_TLS},
-  {"    --tlsv1.3",
-   "TLSv1.3 or greater",
-   CURLHELP_TLS},
-  {"    --tr-encoding",
-   "Request compressed transfer encoding",
-   CURLHELP_HTTP},
-  {"    --trace <file>",
-   "Write a debug trace to FILE",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --trace-ascii <file>",
-   "Like --trace, but without hex output",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --trace-config <string>",
-   "Details to log in trace/verbose output",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --trace-ids",
-   "Transfer + connection ids in verbose output",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --trace-time",
-   "Add time stamps to trace/verbose output",
-   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"    --unix-socket <path>",
-   "Connect through this Unix domain socket",
-   CURLHELP_CONNECTION},
-  {"-T, --upload-file <file>",
-   "Transfer local FILE to destination",
-   CURLHELP_IMPORTANT | CURLHELP_UPLOAD},
-  {"    --upload-flags <flags>",
-   "IMAP upload behavior",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
-  {"    --url <url/file>",
-   "URL(s) to work with",
-   CURLHELP_CURL},
-  {"    --url-query <data>",
-   "Add a URL query part",
-   CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
-  {"-B, --use-ascii",
-   "Use ASCII/text transfer",
-   CURLHELP_FTP | CURLHELP_OUTPUT | CURLHELP_LDAP | CURLHELP_TFTP},
-  {"-u, --user <user:password>",
-   "Server user and password",
-   CURLHELP_IMPORTANT | CURLHELP_AUTH},
-  {"-A, --user-agent <name>",
-   "Send User-Agent <name> to server",
-   CURLHELP_IMPORTANT | CURLHELP_HTTP},
-  {"    --variable <[%]name=text/@file>",
-   "Set variable",
-   CURLHELP_CURL},
-  {"-v, --verbose",
-   "Make the operation more talkative",
-   CURLHELP_IMPORTANT | CURLHELP_VERBOSE | CURLHELP_GLOBAL},
-  {"-V, --version",
-   "Show version number and quit",
-   CURLHELP_IMPORTANT | CURLHELP_CURL},
-  {"    --vlan-priority <priority>",
-   "Set VLAN priority",
-   CURLHELP_CONNECTION},
-  {"-w, --write-out <format>",
-   "Output FORMAT after completion",
-   CURLHELP_VERBOSE},
-  {"    --xattr",
-   "Store metadata in extended file attributes",
-   CURLHELP_OUTPUT},
+  { "    --abstract-unix-socket <path>",
+    "Connect via abstract Unix domain socket",
+    CURLHELP_CONNECTION },
+  { "    --alt-svc <filename>",
+    "Enable alt-svc with this cache file",
+    CURLHELP_HTTP },
+  { "    --anyauth",
+    "Pick any authentication method",
+    CURLHELP_HTTP | CURLHELP_PROXY | CURLHELP_AUTH },
+  { "-a, --append",
+    "Append to target file when uploading",
+    CURLHELP_FTP | CURLHELP_SFTP },
+  { "    --aws-sigv4 <provider1[:prvdr2[:reg[:srv]]]>",
+    "AWS V4 signature auth",
+    CURLHELP_AUTH | CURLHELP_HTTP },
+  { "    --basic",
+    "HTTP Basic Authentication",
+    CURLHELP_AUTH },
+  { "    --ca-native",
+    "Load CA certs from the OS",
+    CURLHELP_TLS },
+  { "    --cacert <file>",
+    "CA certificate to verify peer against",
+    CURLHELP_TLS },
+  { "    --capath <dir>",
+    "CA directory to verify peer against",
+    CURLHELP_TLS },
+  { "-E, --cert <certificate[:password]>",
+    "Client certificate file and password",
+    CURLHELP_TLS },
+  { "    --cert-status",
+    "Verify server cert status OCSP-staple",
+    CURLHELP_TLS },
+  { "    --cert-type <type>",
+    "Certificate type (DER/PEM/ENG/PROV/P12)",
+    CURLHELP_TLS },
+  { "    --ciphers <list>",
+    "TLS 1.2 (1.1, 1.0) ciphers to use",
+    CURLHELP_TLS },
+  { "    --compressed",
+    "Request compressed response",
+    CURLHELP_HTTP },
+  { "    --compressed-ssh",
+    "Enable SSH compression",
+    CURLHELP_SCP | CURLHELP_SSH },
+  { "-K, --config <file>",
+    "Read config from a file",
+    CURLHELP_CURL },
+  { "    --connect-timeout <seconds>",
+    "Maximum time allowed to connect",
+    CURLHELP_CONNECTION | CURLHELP_TIMEOUT },
+  { "    --connect-to <HOST1:PORT1:HOST2:PORT2>",
+    "Connect to host2 instead of host1",
+    CURLHELP_CONNECTION | CURLHELP_DNS },
+  { "-C, --continue-at <offset>",
+    "Resumed transfer offset",
+    CURLHELP_CONNECTION },
+  { "-b, --cookie <data|filename>",
+    "Send cookies from string/load from file",
+    CURLHELP_HTTP },
+  { "-c, --cookie-jar <filename>",
+    "Save cookies to <filename> after operation",
+    CURLHELP_HTTP },
+  { "    --create-dirs",
+    "Create necessary local directory hierarchy",
+    CURLHELP_OUTPUT },
+  { "    --create-file-mode <mode>",
+    "File mode for created files",
+    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_FILE | CURLHELP_UPLOAD },
+  { "    --crlf",
+    "Convert LF to CRLF in upload",
+    CURLHELP_FTP | CURLHELP_SMTP },
+  { "    --crlfile <file>",
+    "Certificate Revocation list",
+    CURLHELP_TLS },
+  { "    --curves <list>",
+    "(EC) TLS key exchange algorithms to request",
+    CURLHELP_TLS },
+  { "-d, --data <data>",
+    "HTTP POST data",
+    CURLHELP_IMPORTANT | CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "    --data-ascii <data>",
+    "HTTP POST ASCII data",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "    --data-binary <data>",
+    "HTTP POST binary data",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "    --data-raw <data>",
+    "HTTP POST data, '@' allowed",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "    --data-urlencode <data>",
+    "HTTP POST data URL encoded",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "    --delegation <LEVEL>",
+    "GSS-API delegation permission",
+    CURLHELP_AUTH },
+  { "    --digest",
+    "HTTP Digest Authentication",
+    CURLHELP_PROXY | CURLHELP_AUTH | CURLHELP_HTTP },
+  { "-q, --disable",
+    "Disable .curlrc",
+    CURLHELP_CURL },
+  { "    --disable-eprt",
+    "Inhibit using EPRT or LPRT",
+    CURLHELP_FTP },
+  { "    --disable-epsv",
+    "Inhibit using EPSV",
+    CURLHELP_FTP },
+  { "    --disallow-username-in-url",
+    "Disallow username in URL",
+    CURLHELP_CURL },
+  { "    --dns-interface <interface>",
+    "Interface to use for DNS requests",
+    CURLHELP_DNS },
+  { "    --dns-ipv4-addr <address>",
+    "IPv4 address to use for DNS requests",
+    CURLHELP_DNS },
+  { "    --dns-ipv6-addr <address>",
+    "IPv6 address to use for DNS requests",
+    CURLHELP_DNS },
+  { "    --dns-servers <addresses>",
+    "DNS server addrs to use",
+    CURLHELP_DNS },
+  { "    --doh-cert-status",
+    "Verify DoH server cert status OCSP-staple",
+    CURLHELP_DNS | CURLHELP_TLS },
+  { "    --doh-insecure",
+    "Allow insecure DoH server connections",
+    CURLHELP_DNS | CURLHELP_TLS },
+  { "    --doh-url <URL>",
+    "Resolve hostnames over DoH",
+    CURLHELP_DNS },
+  { "    --dump-ca-embed",
+    "Write the embedded CA bundle to standard output",
+    CURLHELP_HTTP | CURLHELP_PROXY | CURLHELP_TLS },
+  { "-D, --dump-header <filename>",
+    "Write the received headers to <filename>",
+    CURLHELP_HTTP | CURLHELP_FTP },
+  { "    --ech <config>",
+    "Configure ECH",
+    CURLHELP_TLS },
+  { "    --egd-file <file>",
+    "EGD socket path for random data",
+    CURLHELP_DEPRECATED },
+  { "    --engine <name>",
+    "Crypto engine to use",
+    CURLHELP_TLS },
+  { "    --etag-compare <file>",
+    "Load ETag from file",
+    CURLHELP_HTTP },
+  { "    --etag-save <file>",
+    "Parse incoming ETag and save to a file",
+    CURLHELP_HTTP },
+  { "    --expect100-timeout <seconds>",
+    "How long to wait for 100-continue",
+    CURLHELP_HTTP | CURLHELP_TIMEOUT },
+  { "-f, --fail",
+    "Fail fast with no output on HTTP errors",
+    CURLHELP_IMPORTANT | CURLHELP_HTTP },
+  { "    --fail-early",
+    "Fail on first transfer error",
+    CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --fail-with-body",
+    "Fail on HTTP errors but save the body",
+    CURLHELP_HTTP | CURLHELP_OUTPUT },
+  { "    --false-start",
+    "Enable TLS False Start",
+    CURLHELP_DEPRECATED },
+  { "    --follow",
+    "Follow redirects per spec",
+    CURLHELP_HTTP },
+  { "-F, --form <name=content>",
+    "Specify multipart MIME data",
+    CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_IMAP |
+    CURLHELP_SMTP },
+  { "    --form-escape",
+    "Escape form fields using backslash",
+    CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST },
+  { "    --form-string <name=string>",
+    "Specify multipart MIME data",
+    CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_SMTP |
+    CURLHELP_IMAP },
+  { "    --ftp-account <data>",
+    "Account data string",
+    CURLHELP_FTP | CURLHELP_AUTH },
+  { "    --ftp-alternative-to-user <command>",
+    "String to replace USER [name]",
+    CURLHELP_FTP },
+  { "    --ftp-create-dirs",
+    "Create the remote dirs if not present",
+    CURLHELP_FTP | CURLHELP_SFTP },
+  { "    --ftp-method <method>",
+    "Control CWD usage",
+    CURLHELP_FTP },
+  { "    --ftp-pasv",
+    "Send PASV/EPSV instead of PORT",
+    CURLHELP_FTP },
+  { "-P, --ftp-port <address>",
+    "Send PORT instead of PASV",
+    CURLHELP_FTP },
+  { "    --ftp-pret",
+    "Send PRET before PASV",
+    CURLHELP_FTP },
+  { "    --ftp-skip-pasv-ip",
+    "Skip the IP address for PASV",
+    CURLHELP_FTP },
+  { "    --ftp-ssl-ccc",
+    "Send CCC after authenticating",
+    CURLHELP_FTP | CURLHELP_TLS },
+  { "    --ftp-ssl-ccc-mode <active/passive>",
+    "Set CCC mode",
+    CURLHELP_FTP | CURLHELP_TLS },
+  { "    --ftp-ssl-control",
+    "Require TLS for login, clear for transfer",
+    CURLHELP_FTP | CURLHELP_TLS },
+  { "-G, --get",
+    "Put the post data in the URL and use GET",
+    CURLHELP_HTTP },
+  { "-g, --globoff",
+    "Disable URL globbing with {} and []",
+    CURLHELP_CURL },
+  { "    --happy-eyeballs-timeout-ms <ms>",
+    "Time for IPv6 before IPv4",
+    CURLHELP_CONNECTION | CURLHELP_TIMEOUT },
+  { "    --haproxy-clientip <ip>",
+    "Set address in HAProxy PROXY",
+    CURLHELP_HTTP | CURLHELP_PROXY },
+  { "    --haproxy-protocol",
+    "Send HAProxy PROXY protocol v1 header",
+    CURLHELP_HTTP | CURLHELP_PROXY },
+  { "-I, --head",
+    "Show document info only",
+    CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_FILE },
+  { "-H, --header <header/@file>",
+    "Pass custom header(s) to server",
+    CURLHELP_HTTP | CURLHELP_IMAP | CURLHELP_SMTP },
+  { "-h, --help <subject>",
+    "Get help for commands",
+    CURLHELP_IMPORTANT | CURLHELP_CURL },
+  { "    --hostpubmd5 <md5>",
+    "Acceptable MD5 hash of host public key",
+    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH },
+  { "    --hostpubsha256 <sha256>",
+    "Acceptable SHA256 hash of host public key",
+    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH },
+  { "    --hsts <filename>",
+    "Enable HSTS with this cache file",
+    CURLHELP_HTTP },
+  { "    --http0.9",
+    "Allow HTTP/0.9 responses",
+    CURLHELP_HTTP },
+  { "-0, --http1.0",
+    "Use HTTP/1.0",
+    CURLHELP_HTTP },
+  { "    --http1.1",
+    "Use HTTP/1.1",
+    CURLHELP_HTTP },
+  { "    --http2",
+    "Use HTTP/2",
+    CURLHELP_HTTP },
+  { "    --http2-prior-knowledge",
+    "Use HTTP/2 without HTTP/1.1 Upgrade",
+    CURLHELP_HTTP },
+  { "    --http3",
+    "Use HTTP/3",
+    CURLHELP_HTTP },
+  { "    --http3-only",
+    "Use HTTP/3 only",
+    CURLHELP_HTTP },
+  { "    --ignore-content-length",
+    "Ignore the size of the remote resource",
+    CURLHELP_HTTP | CURLHELP_FTP },
+  { "-k, --insecure",
+    "Allow insecure server connections",
+    CURLHELP_TLS | CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH },
+  { "    --interface <name>",
+    "Use network interface",
+    CURLHELP_CONNECTION },
+  { "    --ip-tos <string>",
+    "Set IP Type of Service or Traffic Class",
+    CURLHELP_CONNECTION },
+  { "    --ipfs-gateway <URL>",
+    "Gateway for IPFS",
+    CURLHELP_CURL },
+  { "-4, --ipv4",
+    "Resolve names to IPv4 addresses",
+    CURLHELP_CONNECTION | CURLHELP_DNS },
+  { "-6, --ipv6",
+    "Resolve names to IPv6 addresses",
+    CURLHELP_CONNECTION | CURLHELP_DNS },
+  { "    --json <data>",
+    "HTTP POST JSON",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "-j, --junk-session-cookies",
+    "Ignore session cookies read from file",
+    CURLHELP_HTTP },
+  { "    --keepalive-cnt <integer>",
+    "Maximum number of keepalive probes",
+    CURLHELP_CONNECTION },
+  { "    --keepalive-time <seconds>",
+    "Interval time for keepalive probes",
+    CURLHELP_CONNECTION | CURLHELP_TIMEOUT },
+  { "    --key <key>",
+    "Private key filename",
+    CURLHELP_TLS | CURLHELP_SSH },
+  { "    --key-type <type>",
+    "Private key file type (DER/PEM/ENG)",
+    CURLHELP_TLS },
+  { "    --knownhosts <file>",
+    "Specify knownhosts path",
+    CURLHELP_SSH },
+  { "    --krb <level>",
+    "Enable Kerberos with security <level>",
+    CURLHELP_DEPRECATED },
+  { "    --libcurl <file>",
+    "Generate libcurl code for this command line",
+    CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --limit-rate <speed>",
+    "Limit transfer speed to RATE",
+    CURLHELP_CONNECTION },
+  { "-l, --list-only",
+    "List only mode",
+    CURLHELP_FTP | CURLHELP_POP3 | CURLHELP_SFTP | CURLHELP_FILE },
+  { "    --local-port <range>",
+    "Use a local port number within RANGE",
+    CURLHELP_CONNECTION },
+  { "-L, --location",
+    "Follow redirects",
+    CURLHELP_HTTP },
+  { "    --location-trusted",
+    "As --location, but send secrets to other hosts",
+    CURLHELP_HTTP | CURLHELP_AUTH },
+  { "    --login-options <options>",
+    "Server login options",
+    CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP | CURLHELP_AUTH |
+    CURLHELP_LDAP },
+  { "    --mail-auth <address>",
+    "Originator address of the original email",
+    CURLHELP_SMTP },
+  { "    --mail-from <address>",
+    "Mail from this address",
+    CURLHELP_SMTP },
+  { "    --mail-rcpt <address>",
+    "Mail to this address",
+    CURLHELP_SMTP },
+  { "    --mail-rcpt-allowfails",
+    "Allow RCPT TO command to fail",
+    CURLHELP_SMTP },
+  { "-M, --manual",
+    "Display the full manual",
+    CURLHELP_CURL },
+  { "    --max-filesize <bytes>",
+    "Maximum file size to download",
+    CURLHELP_CONNECTION },
+  { "    --max-redirs <num>",
+    "Maximum number of redirects allowed",
+    CURLHELP_HTTP },
+  { "-m, --max-time <seconds>",
+    "Maximum time allowed for transfer",
+    CURLHELP_CONNECTION | CURLHELP_TIMEOUT },
+  { "    --metalink",
+    "Process given URLs as metalink XML file",
+    CURLHELP_DEPRECATED },
+  { "    --mptcp",
+    "Enable Multipath TCP",
+    CURLHELP_CONNECTION },
+  { "    --negotiate",
+    "Use HTTP Negotiate (SPNEGO) authentication",
+    CURLHELP_AUTH | CURLHELP_HTTP },
+  { "-n, --netrc",
+    "Must read .netrc for username and password",
+    CURLHELP_AUTH },
+  { "    --netrc-file <filename>",
+    "Specify FILE for netrc",
+    CURLHELP_AUTH },
+  { "    --netrc-optional",
+    "Use either .netrc or URL",
+    CURLHELP_AUTH },
+  { "-:, --next",
+    "Make next URL use separate options",
+    CURLHELP_CURL },
+  { "    --no-alpn",
+    "Disable the ALPN TLS extension",
+    CURLHELP_TLS | CURLHELP_HTTP },
+  { "-N, --no-buffer",
+    "Disable buffering of the output stream",
+    CURLHELP_OUTPUT },
+  { "    --no-clobber",
+    "Do not overwrite files that already exist",
+    CURLHELP_OUTPUT },
+  { "    --no-keepalive",
+    "Disable TCP keepalive on the connection",
+    CURLHELP_CONNECTION },
+  { "    --no-npn",
+    "Disable the NPN TLS extension",
+    CURLHELP_DEPRECATED },
+  { "    --no-progress-meter",
+    "Do not show the progress meter",
+    CURLHELP_VERBOSE },
+  { "    --no-sessionid",
+    "Disable SSL session-ID reusing",
+    CURLHELP_TLS },
+  { "    --noproxy <no-proxy-list>",
+    "List of hosts which do not use proxy",
+    CURLHELP_PROXY },
+  { "    --ntlm",
+    "HTTP NTLM authentication",
+    CURLHELP_AUTH | CURLHELP_HTTP },
+  { "    --ntlm-wb",
+    "HTTP NTLM authentication with winbind",
+    CURLHELP_DEPRECATED },
+  { "    --oauth2-bearer <token>",
+    "OAuth 2 Bearer Token",
+    CURLHELP_AUTH | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+    CURLHELP_LDAP },
+  { "    --out-null",
+    "Discard response data into the void",
+    CURLHELP_OUTPUT },
+  { "-o, --output <file>",
+    "Write to file instead of stdout",
+    CURLHELP_IMPORTANT | CURLHELP_OUTPUT },
+  { "    --output-dir <dir>",
+    "Directory to save files in",
+    CURLHELP_OUTPUT },
+  { "-Z, --parallel",
+    "Perform transfers in parallel",
+    CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --parallel-immediate",
+    "Do not wait for multiplexing",
+    CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --parallel-max <num>",
+    "Maximum concurrency for parallel transfers",
+    CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --parallel-max-host <num>",
+    "Maximum connections to a single host",
+    CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "    --pass <phrase>",
+    "Passphrase for the private key",
+    CURLHELP_SSH | CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --path-as-is",
+    "Do not squash .. sequences in URL path",
+    CURLHELP_CURL },
+  { "    --pinnedpubkey <hashes>",
+    "Public key to verify peer against",
+    CURLHELP_TLS },
+  { "    --post301",
+    "Do not switch to GET after a 301 redirect",
+    CURLHELP_HTTP | CURLHELP_POST },
+  { "    --post302",
+    "Do not switch to GET after a 302 redirect",
+    CURLHELP_HTTP | CURLHELP_POST },
+  { "    --post303",
+    "Do not switch to GET after a 303 redirect",
+    CURLHELP_HTTP | CURLHELP_POST },
+  { "    --preproxy <[protocol://]host[:port]>",
+    "Use this proxy first",
+    CURLHELP_PROXY },
+  { "-#, --progress-bar",
+    "Display transfer progress as a bar",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --proto <protocols>",
+    "Enable/disable PROTOCOLS",
+    CURLHELP_CONNECTION | CURLHELP_CURL },
+  { "    --proto-default <protocol>",
+    "Use PROTOCOL for any URL missing a scheme",
+    CURLHELP_CONNECTION | CURLHELP_CURL },
+  { "    --proto-redir <protocols>",
+    "Enable/disable PROTOCOLS on redirect",
+    CURLHELP_CONNECTION | CURLHELP_CURL },
+  { "-x, --proxy <[protocol://]host[:port]>",
+    "Use this proxy",
+    CURLHELP_PROXY },
+  { "    --proxy-anyauth",
+    "Pick any proxy authentication method",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --proxy-basic",
+    "Use Basic authentication on the proxy",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --proxy-ca-native",
+    "Load CA certs from the OS to verify proxy",
+    CURLHELP_TLS },
+  { "    --proxy-cacert <file>",
+    "CA certificates to verify proxy against",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-capath <dir>",
+    "CA directory to verify proxy against",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-cert <cert[:passwd]>",
+    "Set client certificate for proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-cert-type <type>",
+    "Client certificate type for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-ciphers <list>",
+    "TLS 1.2 (1.1, 1.0) ciphers to use for proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-crlfile <file>",
+    "Set a CRL list for proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-digest",
+    "Digest auth with the proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-header <header/@file>",
+    "Pass custom header(s) to proxy",
+    CURLHELP_PROXY },
+  { "    --proxy-http2",
+    "Use HTTP/2 with HTTPS proxy",
+    CURLHELP_HTTP | CURLHELP_PROXY },
+  { "    --proxy-insecure",
+    "Skip HTTPS proxy cert verification",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-key <key>",
+    "Private key for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-key-type <type>",
+    "Private key file type for proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-negotiate",
+    "HTTP Negotiate (SPNEGO) auth with the proxy",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --proxy-ntlm",
+    "NTLM authentication with the proxy",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --proxy-pass <phrase>",
+    "Passphrase for private key for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --proxy-pinnedpubkey <hashes>",
+    "FILE/HASHES public key to verify proxy with",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-service-name <name>",
+    "SPNEGO proxy service name",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-ssl-allow-beast",
+    "Allow this security flaw for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-ssl-auto-client-cert",
+    "Auto client certificate for proxy",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-tls13-ciphers <list>",
+    "TLS 1.3 proxy cipher suites",
+    CURLHELP_PROXY | CURLHELP_TLS },
+  { "    --proxy-tlsauthtype <type>",
+    "TLS authentication type for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --proxy-tlspassword <string>",
+    "TLS password for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --proxy-tlsuser <name>",
+    "TLS username for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --proxy-tlsv1",
+    "TLSv1 for HTTPS proxy",
+    CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH },
+  { "-U, --proxy-user <user:password>",
+    "Proxy user and password",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --proxy1.0 <host[:port]>",
+    "Use HTTP/1.0 proxy on given port",
+    CURLHELP_PROXY },
+  { "-p, --proxytunnel",
+    "HTTP proxy tunnel (using CONNECT)",
+    CURLHELP_PROXY },
+  { "    --pubkey <key>",
+    "SSH Public key filename",
+    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_SSH | CURLHELP_AUTH },
+  { "-Q, --quote <command>",
+    "Send command(s) to server before transfer",
+    CURLHELP_FTP | CURLHELP_SFTP },
+  { "    --random-file <file>",
+    "File for reading random data from",
+    CURLHELP_DEPRECATED },
+  { "-r, --range <range>",
+    "Retrieve only the bytes within RANGE",
+    CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_FILE },
+  { "    --rate <max request rate>",
+    "Request rate for serial transfers",
+    CURLHELP_CONNECTION | CURLHELP_GLOBAL },
+  { "    --raw",
+    "Do HTTP raw; no transfer decoding",
+    CURLHELP_HTTP },
+  { "-e, --referer <URL>",
+    "Referrer URL",
+    CURLHELP_HTTP },
+  { "-J, --remote-header-name",
+    "Use the header-provided filename",
+    CURLHELP_OUTPUT },
+  { "-O, --remote-name",
+    "Write output to file named as remote file",
+    CURLHELP_IMPORTANT | CURLHELP_OUTPUT },
+  { "    --remote-name-all",
+    "Use the remote filename for all URLs",
+    CURLHELP_OUTPUT },
+  { "-R, --remote-time",
+    "Set remote file's time on local output",
+    CURLHELP_OUTPUT },
+  { "    --remove-on-error",
+    "Remove output file on errors",
+    CURLHELP_OUTPUT },
+  { "-X, --request <method>",
+    "Specify request method to use",
+    CURLHELP_CONNECTION | CURLHELP_POP3 | CURLHELP_FTP | CURLHELP_IMAP |
+    CURLHELP_SMTP },
+  { "    --request-target <path>",
+    "Specify the target for this request",
+    CURLHELP_HTTP },
+  { "    --resolve <[+]host:port:addr[,addr]...>",
+    "Resolve host+port to address",
+    CURLHELP_CONNECTION | CURLHELP_DNS },
+  { "    --retry <num>",
+    "Retry request if transient problems occur",
+    CURLHELP_CURL },
+  { "    --retry-all-errors",
+    "Retry all errors (with --retry)",
+    CURLHELP_CURL },
+  { "    --retry-connrefused",
+    "Retry on connection refused (with --retry)",
+    CURLHELP_CURL },
+  { "    --retry-delay <seconds>",
+    "Wait time between retries",
+    CURLHELP_CURL | CURLHELP_TIMEOUT },
+  { "    --retry-max-time <seconds>",
+    "Retry only within this period",
+    CURLHELP_CURL | CURLHELP_TIMEOUT },
+  { "    --sasl-authzid <identity>",
+    "Identity for SASL PLAIN authentication",
+    CURLHELP_AUTH },
+  { "    --sasl-ir",
+    "Initial response in SASL authentication",
+    CURLHELP_AUTH },
+  { "    --service-name <name>",
+    "SPNEGO service name",
+    CURLHELP_AUTH },
+  { "-S, --show-error",
+    "Show error even when -s is used",
+    CURLHELP_CURL | CURLHELP_GLOBAL },
+  { "-i, --show-headers",
+    "Show response headers in output",
+    CURLHELP_IMPORTANT | CURLHELP_VERBOSE | CURLHELP_OUTPUT },
+  { "    --sigalgs <list>",
+    "TLS signature algorithms to use",
+    CURLHELP_TLS },
+  { "-s, --silent",
+    "Silent mode",
+    CURLHELP_IMPORTANT | CURLHELP_VERBOSE },
+  { "    --skip-existing",
+    "Skip download if local file already exists",
+    CURLHELP_CURL | CURLHELP_OUTPUT },
+  { "    --socks4 <host[:port]>",
+    "SOCKS4 proxy on given host + port",
+    CURLHELP_PROXY },
+  { "    --socks4a <host[:port]>",
+    "SOCKS4a proxy on given host + port",
+    CURLHELP_PROXY },
+  { "    --socks5 <host[:port]>",
+    "SOCKS5 proxy on given host + port",
+    CURLHELP_PROXY },
+  { "    --socks5-basic",
+    "Username/password auth for SOCKS5 proxies",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --socks5-gssapi",
+    "Enable GSS-API auth for SOCKS5 proxies",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --socks5-gssapi-nec",
+    "Compatibility with NEC SOCKS5 server",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --socks5-gssapi-service <name>",
+    "SOCKS5 proxy service name for GSS-API",
+    CURLHELP_PROXY | CURLHELP_AUTH },
+  { "    --socks5-hostname <host[:port]>",
+    "SOCKS5 proxy, pass hostname to proxy",
+    CURLHELP_PROXY },
+  { "-Y, --speed-limit <speed>",
+    "Stop transfers slower than this",
+    CURLHELP_CONNECTION },
+  { "-y, --speed-time <seconds>",
+    "Trigger 'speed-limit' abort after this time",
+    CURLHELP_CONNECTION | CURLHELP_TIMEOUT },
+  { "    --ssl",
+    "Try enabling TLS",
+    CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+    CURLHELP_LDAP },
+  { "    --ssl-allow-beast",
+    "Allow security flaw to improve interop",
+    CURLHELP_TLS },
+  { "    --ssl-auto-client-cert",
+    "Use auto client certificate (Schannel)",
+    CURLHELP_TLS },
+  { "    --ssl-no-revoke",
+    "Disable cert revocation checks (Schannel)",
+    CURLHELP_TLS },
+  { "    --ssl-reqd",
+    "Require SSL/TLS",
+    CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+    CURLHELP_LDAP },
+  { "    --ssl-revoke-best-effort",
+    "Ignore missing cert CRL dist points",
+    CURLHELP_TLS },
+  { "    --ssl-sessions <filename>",
+    "Load/save SSL session tickets from/to this file",
+    CURLHELP_TLS },
+  { "-2, --sslv2",
+    "SSLv2",
+    CURLHELP_DEPRECATED },
+  { "-3, --sslv3",
+    "SSLv3",
+    CURLHELP_DEPRECATED },
+  { "    --stderr <file>",
+    "Where to redirect stderr",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --styled-output",
+    "Enable styled output for HTTP headers",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --suppress-connect-headers",
+    "Suppress proxy CONNECT response headers",
+    CURLHELP_PROXY },
+  { "    --tcp-fastopen",
+    "Use TCP Fast Open",
+    CURLHELP_CONNECTION },
+  { "    --tcp-nodelay",
+    "Set TCP_NODELAY",
+    CURLHELP_CONNECTION },
+  { "-t, --telnet-option <opt=val>",
+    "Set telnet option",
+    CURLHELP_TELNET },
+  { "    --tftp-blksize <value>",
+    "Set TFTP BLKSIZE option",
+    CURLHELP_TFTP },
+  { "    --tftp-no-options",
+    "Do not send any TFTP options",
+    CURLHELP_TFTP },
+  { "-z, --time-cond <time>",
+    "Transfer based on a time condition",
+    CURLHELP_HTTP | CURLHELP_FTP },
+  { "    --tls-earlydata",
+    "Allow use of TLSv1.3 early data (0RTT)",
+    CURLHELP_TLS },
+  { "    --tls-max <VERSION>",
+    "Maximum allowed TLS version",
+    CURLHELP_TLS },
+  { "    --tls13-ciphers <list>",
+    "TLS 1.3 cipher suites to use",
+    CURLHELP_TLS },
+  { "    --tlsauthtype <type>",
+    "TLS authentication type",
+    CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --tlspassword <string>",
+    "TLS password",
+    CURLHELP_TLS | CURLHELP_AUTH },
+  { "    --tlsuser <name>",
+    "TLS username",
+    CURLHELP_TLS | CURLHELP_AUTH },
+  { "-1, --tlsv1",
+    "TLSv1.0 or greater",
+    CURLHELP_TLS },
+  { "    --tlsv1.0",
+    "TLSv1.0 or greater",
+    CURLHELP_TLS },
+  { "    --tlsv1.1",
+    "TLSv1.1 or greater",
+    CURLHELP_TLS },
+  { "    --tlsv1.2",
+    "TLSv1.2 or greater",
+    CURLHELP_TLS },
+  { "    --tlsv1.3",
+    "TLSv1.3 or greater",
+    CURLHELP_TLS },
+  { "    --tr-encoding",
+    "Request compressed transfer encoding",
+    CURLHELP_HTTP },
+  { "    --trace <file>",
+    "Write a debug trace to FILE",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --trace-ascii <file>",
+    "Like --trace, but without hex output",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --trace-config <string>",
+    "Details to log in trace/verbose output",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --trace-ids",
+    "Transfer + connection ids in verbose output",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --trace-time",
+    "Add time stamps to trace/verbose output",
+    CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "    --unix-socket <path>",
+    "Connect through this Unix domain socket",
+    CURLHELP_CONNECTION },
+  { "-T, --upload-file <file>",
+    "Transfer local FILE to destination",
+    CURLHELP_IMPORTANT | CURLHELP_UPLOAD },
+  { "    --upload-flags <flags>",
+    "IMAP upload behavior",
+    CURLHELP_CURL | CURLHELP_OUTPUT },
+  { "    --url <url/file>",
+    "URL(s) to work with",
+    CURLHELP_CURL },
+  { "    --url-query <data>",
+    "Add a URL query part",
+    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD },
+  { "-B, --use-ascii",
+    "Use ASCII/text transfer",
+    CURLHELP_FTP | CURLHELP_OUTPUT | CURLHELP_LDAP | CURLHELP_TFTP },
+  { "-u, --user <user:password>",
+    "Server user and password",
+    CURLHELP_IMPORTANT | CURLHELP_AUTH },
+  { "-A, --user-agent <name>",
+    "Send User-Agent <name> to server",
+    CURLHELP_IMPORTANT | CURLHELP_HTTP },
+  { "    --variable <[%]name=text/@file>",
+    "Set variable",
+    CURLHELP_CURL },
+  { "-v, --verbose",
+    "Make the operation more talkative",
+    CURLHELP_IMPORTANT | CURLHELP_VERBOSE | CURLHELP_GLOBAL },
+  { "-V, --version",
+    "Show version number and quit",
+    CURLHELP_IMPORTANT | CURLHELP_CURL },
+  { "    --vlan-priority <priority>",
+    "Set VLAN priority",
+    CURLHELP_CONNECTION },
+  { "-w, --write-out <format>",
+    "Output FORMAT after completion",
+    CURLHELP_VERBOSE },
+  { "    --xattr",
+    "Store metadata in extended file attributes",
+    CURLHELP_OUTPUT },
   { NULL, NULL, 0 }
 };
index b4fc1fb6fd5a04e582811c16c0516d12898b4bd4..2f943aecff6355642ace282cc83a67e4464195c8 100644 (file)
 #define NOTE_PREFIX  "Note: "
 #define ERROR_PREFIX "curl: "
 
-static void voutf(const char *prefix,
-                  const char *fmt,
-                  va_list ap) CURL_PRINTF(2, 0);
+static void voutf(const char *prefix, const char *fmt, va_list ap)
+  CURL_PRINTF(2, 0);
 
-static void voutf(const char *prefix,
-                  const char *fmt,
-                  va_list ap)
+static void voutf(const char *prefix, const char *fmt, va_list ap)
 {
   size_t len;
   char *ptr;
index 25c1473b96854734192f937e291221226c9fded1..7af3fc3f156a073f00c4b16e46a701fdc9c5d548 100644 (file)
@@ -377,21 +377,21 @@ static CURLcode retrycheck(struct OperationConfig *config,
     RETRY_FTP,
     RETRY_LAST /* not used */
   } retry = RETRY_NO;
-  if((CURLE_OPERATION_TIMEDOUT == result) ||
-     (CURLE_COULDNT_RESOLVE_HOST == result) ||
-     (CURLE_COULDNT_RESOLVE_PROXY == result) ||
-     (CURLE_FTP_ACCEPT_TIMEOUT == result))
+  if((result == CURLE_OPERATION_TIMEDOUT) ||
+     (result == CURLE_COULDNT_RESOLVE_HOST) ||
+     (result == CURLE_COULDNT_RESOLVE_PROXY) ||
+     (result == CURLE_FTP_ACCEPT_TIMEOUT))
     /* retry timeout always */
     retry = RETRY_TIMEOUT;
   else if(config->retry_connrefused &&
-          (CURLE_COULDNT_CONNECT == result)) {
+          (result == CURLE_COULDNT_CONNECT)) {
     long oserrno = 0;
     curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &oserrno);
     if(SOCKECONNREFUSED == oserrno)
       retry = RETRY_CONNREFUSED;
   }
-  else if((CURLE_OK == result) ||
-          (config->fail && (CURLE_HTTP_RETURNED_ERROR == result))) {
+  else if((result == CURLE_OK) ||
+          (config->fail && (result == CURLE_HTTP_RETURNED_ERROR))) {
     /* If it returned OK. _or_ failonerror was enabled and it
        returned due to such an error, check for HTTP transient
        errors to retry on. */
index 9faf2e4dde2dbdbdce3c95a0950fb690048c4e50..43315d5f732f0bb3a4978f3bd2dcd8887e790157 100644 (file)
@@ -306,10 +306,18 @@ ParameterError secs2ms(long *valp, const char *str)
 {
   curl_off_t secs;
   long ms = 0;
-  const unsigned int digs[] = { 1, 10, 100, 1000, 10000, 100000,
-    1000000, 10000000, 100000000 };
-  if(!str ||
-     curlx_str_number(&str, &secs, LONG_MAX / 1000 - 1))
+  const unsigned int digs[] = {
+    1,
+    10,
+    100,
+    1000,
+    10000,
+    100000,
+    1000000,
+    10000000,
+    100000000
+  };
+  if(!str || curlx_str_number(&str, &secs, LONG_MAX / 1000 - 1))
     return PARAM_BAD_NUMERIC;
   if(!curlx_str_single(&str, '.')) {
     curl_off_t fracs;
index 1524e36103fbf3de157c34b1811bb7659db7e754..f6cdffcac9ffc4d549157fe07fbfb9e4801a6859 100644 (file)
@@ -73,7 +73,7 @@ extern FILE *tool_stderr;
 #endif
 
 #ifndef tool_nop_stmt
-#define tool_nop_stmt do { } while(0)
+#define tool_nop_stmt do {} while(0)
 #endif
 
 #ifdef _WIN32
index ee7dda2e9cc9660ce9c945df883bb1d164e9624d..31f528ac4710e373242e7c9a27bab04875673070 100644 (file)
@@ -34,8 +34,7 @@
 
    Return 0 on success, non-zero on error.
 */
-int jsonquoted(const char *in, size_t len,
-               struct dynbuf *out, bool lowercase)
+int jsonquoted(const char *in, size_t len, struct dynbuf *out, bool lowercase)
 {
   const unsigned char *i = (const unsigned char *)in;
   const unsigned char *in_end = &i[len];
index 6797fb35741e3633dee60a79447e8fecf049470b..48c330dfaa83ff7f014fec9e4c29b77aa1914e40 100644 (file)
@@ -26,8 +26,7 @@
 #include "tool_setup.h"
 #include "tool_writeout.h"
 
-int jsonquoted(const char *in, size_t len,
-               struct dynbuf *out, bool lowercase);
+int jsonquoted(const char *in, size_t len, struct dynbuf *out, bool lowercase);
 
 void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
                      size_t nentries,
index 02b17de7328dc2ee97d1589ce7db7851791bb825..9f520c111bf2f2c749e9c572041207110c5b20b5 100644 (file)
@@ -52,7 +52,7 @@ static CURLcode test_lib505(const char *URL)
 
   hd_src = curlx_fopen(libtest_arg2, "rb");
   if(!hd_src) {
-    curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
+    curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
                   errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
     curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
index 6e6dcf1d40df20ed61d7a82fd39578e748b0736a..1944ec71226603c3f7314f749834d9c75a5d56f2 100644 (file)
@@ -43,7 +43,7 @@ static CURLcode test_lib525(const char *URL)
 
   hd_src = curlx_fopen(libtest_arg2, "rb");
   if(!hd_src) {
-    curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
+    curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
                   errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
     curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     return TEST_ERR_FOPEN;
index 9c79aca4c4eebabfe81eca0676aa8339aa413e6e..48a954990f85de1d8437348371aade646417feb2 100644 (file)
@@ -43,7 +43,7 @@ static CURLcode test_lib541(const char *URL)
 
   hd_src = curlx_fopen(libtest_arg2, "rb");
   if(!hd_src) {
-    curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
+    curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
                   errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
     curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
index 302053febd616c6824d24a538aa8ff521a74729a..6106ed8598b9bd3f3e05aa8014a7bd4ee2bde058 100644 (file)
@@ -32,6 +32,7 @@ static CURLcode test_lib568(const char *URL)
 {
   CURLcode result;
   CURL *curl;
+  char errbuf[STRERROR_LEN];
   int sdp;
   FILE *sdpf = NULL;
   struct_stat file_info;
@@ -67,7 +68,9 @@ static CURLcode test_lib568(const char *URL)
 
   sdp = curlx_open(libtest_arg2, O_RDONLY);
   if(sdp == -1) {
-    curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2);
+    curl_mfprintf(stderr, "open() failed with error (%d) %s\n",
+                  errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
+    curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     result = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
   }
@@ -76,7 +79,9 @@ static CURLcode test_lib568(const char *URL)
 
   sdpf = curlx_fopen(libtest_arg2, "rb");
   if(!sdpf) {
-    curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2);
+    curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
+                  errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
+    curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     result = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
   }
index 657ef56cb072353518b37b2af566be48099c7658..d1cb80479225f162adabc759fa3619b2e0d52aff 100644 (file)
@@ -32,6 +32,7 @@ static CURLcode test_lib572(const char *URL)
 {
   CURLcode result;
   CURL *curl;
+  char errbuf[STRERROR_LEN];
   int params;
   FILE *paramsf = NULL;
   struct_stat file_info;
@@ -85,7 +86,9 @@ static CURLcode test_lib572(const char *URL)
   /* PUT style GET_PARAMETERS */
   params = curlx_open(libtest_arg2, O_RDONLY);
   if(params == -1) {
-    curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2);
+    curl_mfprintf(stderr, "open() failed with error (%d) %s\n",
+                  errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
+    curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     result = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
   }
@@ -94,7 +97,9 @@ static CURLcode test_lib572(const char *URL)
 
   paramsf = curlx_fopen(libtest_arg2, "rb");
   if(!paramsf) {
-    curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2);
+    curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
+                  errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
+    curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
     result = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
   }
index 3ab3464656f682cd151c52ccf57bb239c16fc268..8b0cda8820671f2ecd753b132de0a8a144c6bc2a 100755 (executable)
@@ -264,7 +264,7 @@ my @toolhelp; # store all parsed parameters
 while(<$r>) {
     chomp;
     my $l= $_;
-    if(/^  \{\" *(.*)/) {
+    if(/^  \{ \" *(.*)/) {
         my $str=$1;
         my $combo;
         if($str =~ /^-(.), --([a-z0-9.-]*)/) {
index 25b99502575490b0c8070b6f1cd370e1d0d2e712..e4cec3c0813c499b3aea52e6dcb53ffeb0882d05 100644 (file)
@@ -126,6 +126,7 @@ static CURLcode test_unit1664(const char *arg)
                    i, orgline, rc, (int)(line - orgline));
     }
   }
+
   {
     static const char *single[] = {
       "a",
@@ -169,6 +170,7 @@ static CURLcode test_unit1664(const char *arg)
                    i, orgline, rc, (int)(line - orgline));
     }
   }
+
   {
     static const char *nums[] = {
       "1",