tidy-up: miscellaneous
No binary (build failed)
—
(log yok)
| @@ -136,6 +136,5 @@ foreach my $v (keys %remove) { | |
| } | |
| } | |
| - | |
| # return the exit code from diff | |
| exit system("diff -u /tmp/autotools /tmp/cmake") >> 8; | |
| @@ -116,7 +116,6 @@ my %commonrc = ( | |
| '26' => 1, | |
| ); | |
| - | |
| sub runone { | |
| my $a; | |
| my $nargs = getnum(60) + 1; | |
| @@ -39,6 +39,13 @@ my @need_crlf = ( | |
| "\\.(bat|sln)\$", | |
| ); | |
| + | my @double_empty_lines = ( |
| + | "^lib/.+\\.(c|h)\$", |
| + | "^packages/", |
| + | "^tests/data/test", |
| + | "\\.(m4|py)\$", |
| + | ); |
| + | |
| my @non_ascii_allowed = ( | |
| '\xC3\xB6', # UTF-8 for https://codepoints.net/U+00F6 LATIN SMALL LETTER O WITH DIAERESIS | |
| ); | |
| @@ -100,7 +107,7 @@ while(my $filename = <$git_ls_files>) { | |
| my @err = (); | |
| if(!fn_match($filename, @tabs) && | |
| - | $content =~ /\t/) { |
| + | $content =~ /\t/) { |
| push @err, "content: has tab"; | |
| } | |
| @@ -111,12 +118,12 @@ while(my $filename = <$git_ls_files>) { | |
| } | |
| if($eol ne "crlf" && | |
| - | fn_match($filename, @need_crlf)) { |
| + | fn_match($filename, @need_crlf)) { |
| push @err, "content: must use CRLF EOL for this file type"; | |
| } | |
| if($eol ne "lf" && $content ne "" && | |
| - | !fn_match($filename, @need_crlf)) { |
| + | !fn_match($filename, @need_crlf)) { |
| push @err, "content: must use LF EOL for this file type"; | |
| } | |
| @@ -131,20 +138,27 @@ while(my $filename = <$git_ls_files>) { | |
| } | |
| if($content ne "" && | |
| - | $content !~ /\n\z/) { |
| + | $content !~ /\n\z/) { |
| push @err, "content: has no EOL at EOF"; | |
| } | |
| if($content =~ /\n\n\z/ || | |
| - | $content =~ /\r\n\r\n\z/) { |
| + | $content =~ /\r\n\r\n\z/) { |
| push @err, "content: has multiple EOL at EOF"; | |
| } | |
| if($content =~ /\n\n\n\n/ || | |
| - | $content =~ /\r\n\r\n\r\n\r\n/) { |
| + | $content =~ /\r\n\r\n\r\n\r\n/) { |
| push @err, "content: has 3 or more consecutive empty lines"; | |
| } | |
| + | if(!fn_match($filename, @double_empty_lines)) { |
| + | if($content =~ /\n\n\n/ || |
| + | $content =~ /\r\n\r\n\r\n/) { |
| + | push @err, "content: has 2 consecutive empty lines"; |
| + | } |
| + | } |
| + | |
| if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) { | |
| push @err, "content: has binary contents"; | |
| } | |
| @@ -39,7 +39,6 @@ sub testcompile { | |
| return $rc; | |
| } | |
| - | |
| sub extract { | |
| my($f) = @_; | |
| my $syn = 0; | |
| @@ -618,7 +618,7 @@ jobs: | |
| - name: 'configure / ${{ matrix.build }}' | |
| run: | | |
| - | if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ] ; then |
| + | if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then |
| # Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409 | |
| /opt/homebrew/opt/gcc@13/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders | |
| fi | |
| @@ -29,7 +29,7 @@ | |
| #include <fcntl.h> | |
| /* */ | |
| #if defined(sun) || defined(__sun__) || \ | |
| - | defined(__SUNPRO_C) || defined(__SUNPRO_CC) |
| + | defined(__SUNPRO_C) || defined(__SUNPRO_CC) |
| # if defined(__SVR4) || defined(__srv4__) | |
| # define PLATFORM_SOLARIS | |
| # else | |
| @@ -119,7 +119,10 @@ int main(void) | |
| #include <stdarg.h> | |
| #include <string.h> | |
| #include <float.h> | |
| - | int main(void) { return 0; } |
| + | int main(void) |
| + | { |
| + | return 0; |
| + | } |
| #endif | |
| #ifdef HAVE_FILE_OFFSET_BITS | |
| @@ -128,7 +131,7 @@ int main(void) { return 0; } | |
| We cannot simply define LARGE_OFF_T to be 9223372036854775807, | |
| since some C++ compilers masquerading as C compilers | |
| incorrectly reject 9223372036854775807. */ | |
| - | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| + | #define LARGE_OFF_T (((off_t)1 << 62) - 1 + ((off_t)1 << 62)) |
| static int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && | |
| LARGE_OFF_T % 2147483647 == 1) | |
| ? 1 : -1]; | |
| @@ -272,7 +275,10 @@ int main(void) | |
| #include <string.h> | |
| #include <errno.h> | |
| - | static void check(char c) { (void)c; } |
| + | static void check(char c) |
| + | { |
| + | (void)c; |
| + | } |
| int main(void) | |
| { | |
| @@ -289,7 +295,10 @@ int main(void) | |
| #include <errno.h> | |
| /* Float, because a pointer cannot be implicitly cast to float */ | |
| - | static void check(float f) { (void)f; } |
| + | static void check(float f) |
| + | { |
| + | (void)f; |
| + | } |
| int main(void) | |
| { | |
| @@ -1833,7 +1833,6 @@ if(CURL_LTO) | |
| endif() | |
| endif() | |
| - | |
| # Ugly (but functional) way to include "Makefile.inc" by transforming it | |
| # (= regenerate it). | |
| function(curl_transform_makefile_inc _input_file _output_file) | |
| @@ -769,7 +769,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ | |
| #include <time.h> | |
| ]],[[ | |
| struct timeval ts; | |
| - | ts.tv_sec = 0; |
| + | ts.tv_sec = 0; |
| ts.tv_usec = 0; | |
| (void)ts; | |
| ]]) | |
| @@ -520,7 +520,6 @@ if test "$xc_lt_build_static_only" = "yes"; then | |
| fi | |
| AC_SUBST([LIBCURL_PC_CFLAGS]) | |
| - | |
| dnl ********************************************************************** | |
| dnl platform/compiler/architecture specific checks/flags | |
| dnl ********************************************************************** | |
| @@ -2152,7 +2151,6 @@ if test "x$OPT_LIBPSL" != "xno"; then | |
| fi | |
| AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"]) | |
| - | |
| dnl ********************************************************************** | |
| dnl Check for libgsasl | |
| dnl ********************************************************************** | |
| @@ -2236,7 +2234,6 @@ AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to | |
| AS_HELP_STRING([--with-libssh2], [enable libssh2]), | |
| OPT_LIBSSH2=$withval, OPT_LIBSSH2=no) | |
| - | |
| OPT_LIBSSH=off | |
| AC_ARG_WITH(libssh,dnl | |
| AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) | |
| @@ -2619,7 +2616,6 @@ if test "x$OPT_LIBRTMP" != "xno"; then | |
| dnl a pkgconfig file | |
| AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.]) | |
| fi | |
| - | |
| ;; | |
| off) | |
| dnl no --with-librtmp option given, just check default places | |
| @@ -3685,7 +3681,6 @@ if test "$want_nghttp3" != "no"; then | |
| CPPFLAGS=$CLEANCPPFLAGS | |
| LIBS=$CLEANLIBS | |
| ) | |
| - | |
| else | |
| dnl no nghttp3 pkg-config found, deal with it | |
| if test "$want_nghttp3" != "default"; then | |
| @@ -3898,7 +3893,6 @@ if test "$want_libuv" != "no"; then | |
| CPPFLAGS=$CLEANCPPFLAGS | |
| LIBS=$CLEANLIBS | |
| ) | |
| - | |
| else | |
| dnl no libuv pkg-config found, deal with it | |
| if test "$want_libuv" != "default"; then | |
| @@ -4042,7 +4036,6 @@ dnl default includes | |
| ] | |
| ) | |
| - | |
| dnl Checks for typedefs, structures, and compiler characteristics. | |
| AC_C_CONST | |
| AC_TYPE_SIZE_T | |
| @@ -4977,7 +4970,6 @@ if test "$hsts" != "yes"; then | |
| AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc]) | |
| fi | |
| - | |
| dnl ************************************************************* | |
| dnl check whether ECH support, if desired, is actually available | |
| dnl | |
| @@ -5042,7 +5034,6 @@ else | |
| fi | |
| fi | |
| - | |
| dnl ************************************************************* | |
| dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio | |
| dnl | |
| @@ -827,7 +827,6 @@ chain. | |
| Details are also in [the SSL certificates | |
| document](https://curl.se/docs/sslcerts.html). | |
| - | |
| ## Why is curl -R on Windows one hour off? | |
| Since curl 7.53.0 this issue should be fixed as long as curl was built with | |
| @@ -891,7 +890,7 @@ the second. No more than three packets are sent, no matter how long the | |
| timeout is set. | |
| See option `TcpMaxConnectRetransmissions` on [this | |
| - | page](https://support.microsoft.com/bg-bg/topic/hotfix-enables-the-configuration-of-the-tcp-maximum-syn-retransmission-amount-in-windows-7-or-windows-server-2008-r2-1b6f8352-2c5f-58bb-ead7-2cf021407c8e). |
| + | page](https://support.microsoft.com/topic/hotfix-enables-the-configuration-of-the-tcp-maximum-syn-retransmission-amount-in-windows-7-or-windows-server-2008-r2-1b6f8352-2c5f-58bb-ead7-2cf021407c8e). |
| Also, even on non-Windows systems there may run a firewall or anti-virus | |
| software or similar that accepts the connection but does not actually do | |
| @@ -276,7 +276,6 @@ this: | |
| curl --trace my-trace.txt www.haxx.se | |
| - | |
| ## Detailed Information | |
| Different protocols provide different ways of getting detailed information | |
| @@ -133,7 +133,6 @@ Apple SecTrust and your own file to be considered, use: | |
| curl --ca-native --cacert mycerts.pem https://example.com | |
| - | |
| #### Other Combinations | |
| How well the use of native CA stores work in all other combinations depends | |
| @@ -398,7 +398,6 @@ honest a bit of a hack. | |
| Please see the following thread for more information: | |
| https://curl.se/mail/lib-2012-05/0178.html | |
| - | |
| # POP3 | |
| ## Enhanced capability support | |
| @@ -198,7 +198,6 @@ SPDX-License-Identifier: curl | |
| curl --data name=curl https://url1.example.com https://url2.example.com | |
| - | |
| ## Multiple HTTP methods in a single command line | |
| Sometimes you need to operate on several URLs in a single command line and do | |
| @@ -41,7 +41,6 @@ Whenever there is input into the fifo, the program reads the input as a list | |
| of URL's and creates some new easy handles to fetch each URL via the | |
| curl_multi "hiper" API. | |
| - | |
| Thus, you can try a single URL: | |
| % echo http://www.yahoo.com > hiper.fifo | |
| @@ -44,7 +44,6 @@ Whenever there is input into the fifo, the program reads the input as a list | |
| of URL's and creates some new easy handles to fetch each URL via the | |
| curl_multi "hiper" API. | |
| - | |
| Thus, you can try a single URL: | |
| % echo http://www.yahoo.com > hiper.fifo | |
| @@ -41,7 +41,6 @@ | |
| of URL's and creates some new easy handles to fetch each URL via the | |
| curl_multi "hiper" API. | |
| - | |
| Thus, you can try a single URL: | |
| % echo http://www.yahoo.com > hiper.fifo | |
| @@ -41,7 +41,6 @@ Whenever there is input into the fifo, the program reads the input as a list | |
| of URL's and creates some new easy handles to fetch each URL via the | |
| curl_multi "hiper" API. | |
| - | |
| Thus, you can try a single URL: | |
| % echo http://www.yahoo.com > hiper.fifo | |
| @@ -46,9 +46,9 @@ | |
| // | |
| #ifdef _WIN32 | |
| - | #define COMPARE(a, b) (!_stricmp((a), (b))) |
| + | #define COMPARE(a, b) (!_stricmp(a, b)) |
| #else | |
| - | #define COMPARE(a, b) (!strcasecmp((a), (b))) |
| + | #define COMPARE(a, b) (!strcasecmp(a, b)) |
| #endif | |
| // | |
| @@ -67,7 +67,7 @@ | |
| #endif | |
| #ifdef _MSC_VER | |
| - | #define gettimeofday(a, b) my_gettimeofday((a), (b)) |
| + | #define gettimeofday(a, b) my_gettimeofday(a, b) |
| static int my_gettimeofday(struct timeval *tp, void *tzp) | |
| { | |
| (void)tzp; | |
| @@ -74,7 +74,6 @@ int main(int argc, char *argv[]) | |
| CURLFORM_COPYCONTENTS, "postit2-formadd.c", | |
| CURLFORM_END); | |
| - | |
| /* Fill in the submit field too, even if this is rarely needed */ | |
| curl_formadd(&formpost, | |
| &lastptr, | |
| @@ -398,7 +398,6 @@ An overview of the time values available from curl_easy_getinfo(3) | |
| |--|--|--|--|--|--|--|--TOTAL | |
| |--|--|--|--|--|--|--|--REDIRECT | |
| - | |
| CURLINFO_QUEUE_TIME_T(3), CURLINFO_NAMELOOKUP_TIME_T(3), | |
| CURLINFO_CONNECT_TIME_T(3), CURLINFO_APPCONNECT_TIME_T(3), | |
| CURLINFO_PRETRANSFER_TIME_T(3), CURLINFO_POSTTRANSFER_TIME_T(3), | |
| @@ -229,7 +229,6 @@ struct curl_httppost { | |
| set. Added in 7.46.0 */ | |
| }; | |
| - | |
| /* This is a return code for the progress callback that, when returned, will | |
| signal libcurl to continue executing the default progress function */ | |
| #define CURL_PROGRESSFUNC_CONTINUE 0x10000001 | |
| @@ -844,7 +843,7 @@ typedef enum { | |
| #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7) | |
| #define CURLAUTH_ONLY (((unsigned long)1)<<31) | |
| #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) | |
| - | #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) |
| + | #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)) |
| #define CURLSSH_AUTH_ANY ~0L /* all types supported by the server */ | |
| #define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */ | |
| @@ -916,7 +915,6 @@ typedef int | |
| /* return CURLE_OK to accept */ | |
| /* or something else to refuse */ | |
| - | |
| /* parameter for the CURLOPT_USE_SSL option */ | |
| #define CURLUSESSL_NONE 0L /* do not attempt to use SSL */ | |
| #define CURLUSESSL_TRY 1L /* try using SSL, proceed anyway otherwise */ | |
| @@ -1115,7 +1113,6 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy, | |
| /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the | |
| string options from the header file */ | |
| - | |
| #define CURLOPT(na,t,nu) na = t + nu | |
| #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu | |
| @@ -1874,9 +1871,7 @@ typedef enum { | |
| libcurl will ask for the compressed methods it knows of, and if that | |
| is not any, it will not ask for transfer-encoding at all even if this | |
| - | option is set to 1. |
| - | |
| - | */ |
| + | option is set to 1. */ |
| CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207), | |
| /* Callback function for closing socket (instead of close(2)). The callback | |
| @@ -2294,10 +2289,9 @@ typedef enum { | |
| #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ | |
| #endif | |
| - | |
| - | /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host |
| - | name resolves addresses using more than one IP protocol version, this |
| - | option might be handy to force libcurl to use a specific IP version. */ |
| + | /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host |
| + | name resolves addresses using more than one IP protocol version, this |
| + | option might be handy to force libcurl to use a specific IP version. */ |
| #define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP | |
| versions that your system allows */ | |
| #define CURL_IPRESOLVE_V4 1L /* uses only IPv4 addresses/connections */ | |
| @@ -2381,7 +2375,7 @@ enum CURL_NETRC_OPTION { | |
| #define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16) | |
| #define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16) | |
| - | /* never use, keep last */ |
| + | /* never use, keep last */ |
| #define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16) | |
| #define CURL_TLSAUTH_NONE 0L | |
| @@ -2403,7 +2397,7 @@ enum CURL_TLSAUTH { | |
| #define CURL_REDIR_POST_302 2L | |
| #define CURL_REDIR_POST_303 4L | |
| #define CURL_REDIR_POST_ALL \ | |
| - | (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) |
| + | (CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303) |
| #define CURL_TIMECOND_NONE 0L | |
| #define CURL_TIMECOND_IFMODSINCE 1L | |
| @@ -2418,7 +2412,7 @@ typedef enum { | |
| } curl_TimeCond; | |
| /* Special size_t value signaling a null-terminated string. */ | |
| - | #define CURL_ZERO_TERMINATED ((size_t) -1) |
| + | #define CURL_ZERO_TERMINATED ((size_t)-1) |
| /* curl_strequal() and curl_strnequal() are subject for removal in a future | |
| release */ | |
| @@ -2705,7 +2699,6 @@ CURL_EXTERN char *curl_easy_escape(CURL *handle, | |
| CURL_EXTERN char *curl_escape(const char *string, | |
| int length); | |
| - | |
| /* | |
| * NAME curl_easy_unescape() | |
| * | |
| @@ -2743,10 +2736,9 @@ CURL_EXTERN void curl_free(void *p); | |
| * | |
| * curl_global_init() should be invoked exactly once for each application that | |
| * uses libcurl and before any call of other libcurl functions. | |
| - | |
| + | * |
| * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the | |
| * curl_version_info_data.features flag (fetch by curl_version_info()). | |
| - | |
| */ | |
| CURL_EXTERN CURLcode curl_global_init(long flags); | |
| @@ -2787,10 +2779,9 @@ CURL_EXTERN void curl_global_cleanup(void); | |
| * | |
| * curl_global_trace() can be invoked at application start to | |
| * configure which components in curl should participate in tracing. | |
| - | |
| + | * |
| * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the | |
| * curl_version_info_data.features flag (fetch by curl_version_info()). | |
| - | |
| */ | |
| CURL_EXTERN CURLcode curl_global_trace(const char *config); | |
| @@ -3017,12 +3008,11 @@ typedef enum { | |
| #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */ | |
| #define CURL_GLOBAL_WIN32 (1<<1) | |
| - | #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) |
| + | #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32) |
| #define CURL_GLOBAL_NOTHING 0 | |
| #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL | |
| #define CURL_GLOBAL_ACK_EINTR (1<<2) | |
| - | |
| /***************************************************************************** | |
| * Setup defines, protos etc for the sharing stuff. | |
| */ | |
| @@ -3060,7 +3050,6 @@ typedef void (*curl_unlock_function)(CURL *handle, | |
| curl_lock_data data, | |
| void *userptr); | |
| - | |
| typedef enum { | |
| CURLSHE_OK, /* all is fine */ | |
| CURLSHE_BAD_OPTION, /* 1 */ | |
| @@ -3264,8 +3253,8 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); | |
| #define CURLPAUSE_SEND (1<<2) | |
| #define CURLPAUSE_SEND_CONT (0) | |
| - | #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) |
| - | #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) |
| + | #define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND) |
| + | #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT) |
| /* | |
| * NAME curl_easy_ssls_import() | |
| @@ -3310,7 +3299,6 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle, | |
| curl_ssls_export_cb *export_fn, | |
| void *userptr); | |
| - | |
| #ifdef __cplusplus | |
| } /* end of extern "C" */ | |
| #endif | |
| @@ -58,7 +58,6 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl); | |
| */ | |
| CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); | |
| - | |
| /* | |
| * NAME curl_easy_duphandle() | |
| * | |
| @@ -108,7 +107,6 @@ CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, | |
| CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, | |
| size_t buflen, size_t *n); | |
| - | |
| /* | |
| * NAME curl_easy_upkeep() | |
| * | |
| @@ -136,25 +136,25 @@ CURL_EXTERN CURLM *curl_multi_init(void); | |
| CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, | |
| CURL *curl_handle); | |
| - | /* |
| - | * Name: curl_multi_remove_handle() |
| - | * |
| - | * Desc: removes a curl handle from the multi stack again |
| - | * |
| - | * Returns: CURLMcode type, general multi error code. |
| - | */ |
| + | /* |
| + | * Name: curl_multi_remove_handle() |
| + | * |
| + | * Desc: removes a curl handle from the multi stack again |
| + | * |
| + | * Returns: CURLMcode type, general multi error code. |
| + | */ |
| CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, | |
| CURL *curl_handle); | |
| - | /* |
| - | * Name: curl_multi_fdset() |
| - | * |
| - | * Desc: Ask curl for its fd_set sets. The app can use these to select() or |
| - | * poll() on. We want curl_multi_perform() called as soon as one of |
| - | * them are ready. |
| - | * |
| - | * Returns: CURLMcode type, general multi error code. |
| - | */ |
| + | /* |
| + | * Name: curl_multi_fdset() |
| + | * |
| + | * Desc: Ask curl for its fd_set sets. The app can use these to select() or |
| + | * poll() on. We want curl_multi_perform() called as soon as one of |
| + | * them are ready. |
| + | * |
| + | * Returns: CURLMcode type, general multi error code. |
| + | */ |
| CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, | |
| fd_set *read_fd_set, | |
| fd_set *write_fd_set, | |
| @@ -198,35 +198,35 @@ CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle, | |
| */ | |
| CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle); | |
| - | /* |
| - | * Name: curl_multi_perform() |
| - | * |
| - | * Desc: When the app thinks there is data available for curl it calls this |
| - | * function to read/write whatever there is right now. This returns |
| - | * as soon as the reads and writes are done. This function does not |
| - | * require that there actually is data available for reading or that |
| - | * data can be written, it can be called just in case. It returns |
| - | * the number of handles that still transfer data in the second |
| - | * argument's integer-pointer. |
| - | * |
| - | * Returns: CURLMcode type, general multi error code. *NOTE* that this only |
| - | * returns errors etc regarding the whole multi stack. There might |
| - | * still have occurred problems on individual transfers even when |
| - | * this returns OK. |
| - | */ |
| + | /* |
| + | * Name: curl_multi_perform() |
| + | * |
| + | * Desc: When the app thinks there is data available for curl it calls this |
| + | * function to read/write whatever there is right now. This returns |
| + | * as soon as the reads and writes are done. This function does not |
| + | * require that there actually is data available for reading or that |
| + | * data can be written, it can be called just in case. It returns |
| + | * the number of handles that still transfer data in the second |
| + | * argument's integer-pointer. |
| + | * |
| + | * Returns: CURLMcode type, general multi error code. *NOTE* that this only |
| + | * returns errors etc regarding the whole multi stack. There might |
| + | * still have occurred problems on individual transfers even when |
| + | * this returns OK. |
| + | */ |
| CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, | |
| int *running_handles); | |
| - | /* |
| - | * Name: curl_multi_cleanup() |
| - | * |
| - | * Desc: Cleans up and removes a whole multi stack. It does not free or |
| - | * touch any individual easy handles in any way. We need to define |
| - | * in what state those handles will be if this function is called |
| - | * in the middle of a transfer. |
| - | * |
| - | * Returns: CURLMcode type, general multi error code. |
| - | */ |
| + | /* |
| + | * Name: curl_multi_cleanup() |
| + | * |
| + | * Desc: Cleans up and removes a whole multi stack. It does not free or |
| + | * touch any individual easy handles in any way. We need to define |
| + | * in what state those handles will be if this function is called |
| + | * in the middle of a transfer. |
| + | * |
| + | * Returns: CURLMcode type, general multi error code. |
| + | */ |
| CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); | |
| /* | |
| @@ -327,8 +327,8 @@ curl_multi_socket_all(CURLM *multi_handle, int *running_handles); | |
| #ifndef CURL_ALLOW_OLD_MULTI_SOCKET | |
| /* This macro below was added in 7.16.3 to push users who recompile to use | |
| - | the new curl_multi_socket_action() instead of the old curl_multi_socket() |
| - | */ |
| + | * the new curl_multi_socket_action() instead of the old curl_multi_socket() |
| + | */ |
| #define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) | |
| #endif | |
| @@ -351,10 +351,10 @@ typedef enum { | |
| /* This is the argument passed to the socket callback */ | |
| CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2), | |
| - | /* set to 1 to enable pipelining for this multi handle */ |
| + | /* set to 1 to enable pipelining for this multi handle */ |
| CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3), | |
| - | /* This is the timer callback function pointer */ |
| + | /* This is the timer callback function pointer */ |
| CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4), | |
| /* This is the argument passed to the timer callback */ | |
| @@ -429,7 +429,6 @@ typedef enum { | |
| CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, | |
| CURLMoption option, ...); | |
| - | |
| /* | |
| * Name: curl_multi_assign() | |
| * | |
| @@ -454,7 +453,6 @@ CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, | |
| */ | |
| CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle); | |
| - | |
| typedef enum { | |
| CURLMINFO_NONE, /* first, never use this */ | |
| /* The number of easy handles currently managed by the multi handle, | |
| @@ -264,7 +264,6 @@ | |
| */ | |
| #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) | |
| - | |
| /* the actual warnings, triggered by calling the Wcurl_easy_setopt_err* | |
| * functions */ | |
| @@ -590,8 +589,9 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t, | |
| #define curlcheck_off_t_info(info) \ | |
| (CURLINFO_OFF_T < (info)) | |
| - | |
| - | /* typecheck helpers -- check whether given expression has requested type */ |
| + | /* |
| + | * typecheck helpers -- check whether given expression has requested type |
| + | */ |
| /* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros, | |
| * otherwise define a new macro. Search for __builtin_types_compatible_p | |
| @@ -641,7 +641,6 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t, | |
| (curlcheck_NULL(expr) || \ | |
| __builtin_types_compatible_p(__typeof__(expr), CURL *)) | |
| - | |
| /* evaluates to true if expr is a long (no matter the signedness) | |
| * XXX: for now, int is also accepted (and therefore short and char, which | |
| * are promoted to int when passed to a variadic function) */ | |
| @@ -44,6 +44,5 @@ CURLcode Curl_cf_https_setup(struct Curl_easy *data, | |
| struct connectdata *conn, | |
| int sockindex); | |
| - | |
| #endif /* !CURL_DISABLE_HTTP */ | |
| #endif /* HEADER_CURL_CF_HTTP_H */ | |
| @@ -316,7 +316,6 @@ void Curl_conn_cf_discard_all(struct Curl_easy *data, | |
| struct connectdata *conn, | |
| int sockindex); | |
| - | |
| CURLcode Curl_conn_cf_connect(struct Curl_cfilter *cf, | |
| struct Curl_easy *data, | |
| bool *done); | |
| @@ -132,7 +132,6 @@ | |
| /* Define if you have the `socket' function. */ | |
| #define HAVE_SOCKET | |
| - | |
| /* The following define is needed on OS400 to enable strcmpi(), stricmp() and | |
| strdup(). */ | |
| #define __cplusplus__strings__ | |
| @@ -48,7 +48,6 @@ struct HMAC_params { | |
| unsigned int resultlen; /* Result length (bytes). */ | |
| }; | |
| - | |
| /* HMAC computation context. */ | |
| struct HMAC_context { | |
| const struct HMAC_params *hash; /* Hash function definition. */ | |
| @@ -35,7 +35,7 @@ | |
| #else /* HAVE_MEMRCHR */ | |
| void *Curl_memrchr(const void *s, int c, size_t n); | |
| - | #define memrchr(x, y, z) Curl_memrchr((x), (y), (z)) |
| + | #define memrchr(x, y, z) Curl_memrchr(x, y, z) |
| #endif /* HAVE_MEMRCHR */ | |
| @@ -160,7 +160,6 @@ struct timeval { | |
| #endif | |
| #endif /* HAVE_RECV */ | |
| - | |
| #ifdef __minix | |
| /* Minix does not support send on TCP sockets */ | |
| #define swrite(x, y, z) (ssize_t)write((SEND_TYPE_ARG1)(x), \ | |
| @@ -65,7 +65,6 @@ void Curl_failf(struct Curl_easy *data, | |
| #define CURL_LOG_LVL_NONE 0 | |
| #define CURL_LOG_LVL_INFO 1 | |
| - | |
| #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | |
| #define CURL_HAVE_C99 | |
| #endif | |
| @@ -36,5 +36,4 @@ extern const struct Curl_cwtype Curl_cwt_pause; | |
| CURLcode Curl_cw_pause_flush(struct Curl_easy *data); | |
| - | |
| #endif /* HEADER_CURL_CW_PAUSE_H */ | |
| @@ -126,7 +126,6 @@ size_t Curl_dynhds_remove(struct dynhds *dynhds, | |
| const char *name, size_t namelen); | |
| size_t Curl_dynhds_cremove(struct dynhds *dynhds, const char *name); | |
| - | |
| /** | |
| * Set the give header name and value, replacing any entries with | |
| * the same name. The header is added at the end of all (remaining) | |
| @@ -68,7 +68,6 @@ | |
| #define SEND_TYPE_RETV int | |
| #endif | |
| - | |
| #ifndef RECV_TYPE_ARG1 | |
| #define RECV_TYPE_ARG1 int | |
| #endif | |
| @@ -116,7 +116,6 @@ bool Curl_ipv6works(struct Curl_easy *data); | |
| #define Curl_ipv6works(x) FALSE | |
| #endif | |
| - | |
| /* unlink a dns entry, potentially shared with a cache */ | |
| void Curl_resolv_unlink(struct Curl_easy *data, | |
| struct Curl_dns_entry **pdns); | |
| @@ -213,7 +213,6 @@ Curl_http_output_auth(struct Curl_easy *data, | |
| /* Decode HTTP status code string. */ | |
| CURLcode Curl_http_decode_status(int *pstatus, const char *s, size_t len); | |
| - | |
| /** | |
| * All about a core HTTP request, excluding body and trailers | |
| */ | |
| @@ -95,7 +95,7 @@ | |
| #define curl_ldap_num_t ULONG | |
| #else | |
| #define FREE_ON_WINLDAP(x) | |
| - | #define curl_ldap_num_t int |
| + | #define curl_ldap_num_t int |
| #endif | |
| #ifndef HAVE_LDAP_URL_PARSE | |
| @@ -77,7 +77,6 @@ sub add { | |
| } | |
| } | |
| - | |
| my $fl; | |
| while(<STDIN>) { | |
| my $l = $_; | |
| @@ -122,7 +121,6 @@ while(<STDIN>) { | |
| } | |
| } | |
| - | |
| for my $name (sort @names) { | |
| my $oname = $name; | |
| my $a = $alias{$name}; | |
| @@ -76,7 +76,6 @@ extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status, | |
| gss_name_t * out_name); | |
| #define gss_import_name Curl_gss_import_name_a | |
| - | |
| extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status, | |
| OM_uint32 status_value, | |
| int status_type, gss_OID mech_type, | |
| @@ -84,7 +83,6 @@ extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status, | |
| gss_buffer_t status_string); | |
| #define gss_display_status Curl_gss_display_status_a | |
| - | |
| extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status, | |
| gss_cred_id_t cred_handle, | |
| gss_ctx_id_t * context_handle, | |
| @@ -101,13 +99,11 @@ extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status, | |
| OM_uint32 * time_rec); | |
| #define gss_init_sec_context Curl_gss_init_sec_context_a | |
| - | |
| extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 *minor_status, | |
| gss_ctx_id_t *context_handle, | |
| gss_buffer_t output_token); | |
| #define gss_delete_sec_context Curl_gss_delete_sec_context_a | |
| - | |
| /* LDAP wrappers. */ | |
| #define BerValue struct berval | |
| @@ -133,7 +133,6 @@ typedef unsigned int curl_prot_t; | |
| input easier and better. */ | |
| #define CURL_MAX_INPUT_LENGTH 8000000 | |
| - | |
| #include "cookie.h" | |
| #include "psl.h" | |
| #include "formdata.h" | |
| @@ -40,7 +40,6 @@ CURLcode Curl_qlogdir(struct Curl_easy *data, | |
| size_t scidlen, | |
| int *qlogfdp); | |
| - | |
| CURLcode Curl_cf_quic_create(struct Curl_cfilter **pcf, | |
| struct Curl_easy *data, | |
| struct connectdata *conn, | |
| @@ -306,7 +306,7 @@ static gnutls_x509_crt_fmt_t gnutls_do_file_type(const char *type) | |
| return GNUTLS_X509_FMT_PEM; /* default to PEM */ | |
| } | |
| - | #define GNUTLS_CIPHERS "NORMAL:%PROFILE_MEDIUM:-ARCFOUR-128:"\ |
| + | #define GNUTLS_CIPHERS "NORMAL:%PROFILE_MEDIUM:-ARCFOUR-128:" \ |
| "-CTYPE-ALL:+CTYPE-X509" | |
| /* If GnuTLS was compiled without support for SRP it will error out if SRP is | |
| requested in the priority string, so treat it specially | |
| @@ -54,7 +54,7 @@ | |
| */ | |
| /* Largest supported ASN.1 structure. */ | |
| - | #define CURL_ASN1_MAX ((size_t) 0x40000) /* 256K */ |
| + | #define CURL_ASN1_MAX ((size_t)0x40000) /* 256K */ |
| /* ASN.1 classes. */ | |
| /* #define CURL_ASN1_UNIVERSAL 0 */ | |
| @@ -33,8 +33,7 @@ if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then | |
| #include <openssl/opensslv.h> | |
| ]],[[ | |
| #if defined(AMISSL_CURRENT_VERSION) && defined(AMISSL_V3xx) && \ | |
| - | (OPENSSL_VERSION_NUMBER >= 0x30000000L) && \ |
| - | defined(PROTO_AMISSL_H) |
| + | (OPENSSL_VERSION_NUMBER >= 0x30000000L) && defined(PROTO_AMISSL_H) |
| return 0; | |
| #else | |
| #error not AmiSSL v5 / OpenSSL 3 | |
| @@ -508,7 +508,7 @@ AC_DEFUN([CURL_CHECK_FUNC_ALARM], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_unistd | |
| ]],[[ | |
| - | if(0 != alarm(0)) |
| + | if(alarm(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -599,7 +599,7 @@ AC_DEFUN([CURL_CHECK_FUNC_BASENAME], [ | |
| $curl_includes_libgen | |
| $curl_includes_unistd | |
| ]],[[ | |
| - | if(0 != basename(0)) |
| + | if(basename(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -659,7 +659,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_winsock2 | |
| ]],[[ | |
| - | if(0 != closesocket(0)) |
| + | if(closesocket(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -689,7 +689,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_winsock2 | |
| ]],[[ | |
| - | if(0 != closesocket(0)) |
| + | if(closesocket(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -750,7 +750,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != CloseSocket(0)) |
| + | if(CloseSocket(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -768,7 +768,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != CloseSocket(0)) |
| + | if(CloseSocket(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -851,7 +851,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FCNTL], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_fcntl | |
| ]],[[ | |
| - | if(0 != fcntl(0, 0, 0)) |
| + | if(fcntl(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -917,7 +917,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FCNTL_O_NONBLOCK], [ | |
| $curl_includes_fcntl | |
| ]],[[ | |
| int flags = 0; | |
| - | if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK)) |
| + | if(fcntl(0, F_SETFL, flags | O_NONBLOCK) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1098,7 +1098,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_sys_xattr | |
| ]],[[ | |
| - | if(0 != fsetxattr(0, "", 0, 0, 0)) |
| + | if(fsetxattr(0, "", 0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1116,7 +1116,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_sys_xattr | |
| ]],[[ | |
| - | if(0 != fsetxattr(0, 0, 0, 0, 0, 0)) |
| + | if(fsetxattr(0, 0, 0, 0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1218,7 +1218,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FTRUNCATE], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_unistd | |
| ]],[[ | |
| - | if(0 != ftruncate(0, 0)) |
| + | if(ftruncate(0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1291,7 +1291,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ | |
| $curl_includes_netdb | |
| ]],[[ | |
| struct addrinfo *ai = 0; | |
| - | if(0 != getaddrinfo(0, 0, 0, &ai)) |
| + | if(getaddrinfo(0, 0, 0, &ai) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1326,7 +1326,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ | |
| $curl_includes_netdb | |
| ]],[[ | |
| struct addrinfo *ai = 0; | |
| - | if(0 != getaddrinfo(0, 0, 0, &ai)) |
| + | if(getaddrinfo(0, 0, 0, &ai) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1537,7 +1537,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [ | |
| $curl_includes_netdb | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| - | if(0 != gethostbyname_r(0, 0, 0)) |
| + | if(gethostbyname_r(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1556,7 +1556,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [ | |
| $curl_includes_netdb | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| - | if(0 != gethostbyname_r(0, 0, 0, 0, 0)) |
| + | if(gethostbyname_r(0, 0, 0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1575,7 +1575,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [ | |
| $curl_includes_netdb | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| - | if(0 != gethostbyname_r(0, 0, 0, 0, 0, 0)) |
| + | if(gethostbyname_r(0, 0, 0, 0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1660,7 +1660,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [ | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != gethostname((void *)s, 0)) |
| + | if(gethostname((void *)s, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1695,7 +1695,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [ | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != gethostname((void *)s, 0)) |
| + | if(gethostname((void *)s, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1727,7 +1727,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [ | |
| int FUNCALLCONV gethostname($tst_arg1, $tst_arg2); | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != gethostname(($tst_arg1)s, 0)) |
| + | if(gethostname(($tst_arg1)s, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1795,7 +1795,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != getpeername(0, (void *)0, (void *)0)) |
| + | if(getpeername(0, (void *)0, (void *)0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1829,7 +1829,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != getpeername(0, (void *)0, (void *)0)) |
| + | if(getpeername(0, (void *)0, (void *)0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1893,7 +1893,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != getsockname(0, (void *)0, (void *)0)) |
| + | if(getsockname(0, (void *)0, (void *)0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -1927,7 +1927,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != getsockname(0, (void *)0, (void *)0)) |
| + | if(getsockname(0, (void *)0, (void *)0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2014,7 +2014,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_ifaddrs | |
| ]],[[ | |
| - | if(0 != getifaddrs(0)) |
| + | if(getifaddrs(0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2134,7 +2134,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [ | |
| ]],[[ | |
| time_t tm = 1170352587; | |
| struct tm result; | |
| - | if(0 != gmtime_r(&tm, &result)) |
| + | if(gmtime_r(&tm, &result) != 0) |
| return 1; | |
| (void)result; | |
| ]]) | |
| @@ -2255,7 +2255,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [ | |
| ]],[[ | |
| char ipv4res[sizeof("255.255.255.255")]; | |
| unsigned char ipv4a[5] = ""; | |
| - | if(0 != inet_ntop(0, ipv4a, ipv4res, 0)) |
| + | if(inet_ntop(0, ipv4a, ipv4res, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2414,9 +2414,9 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_arpa_inet | |
| ]],[[ | |
| - | unsigned char ipv4a[4+1] = ""; |
| + | unsigned char ipv4a[4 + 1] = ""; |
| const char *ipv4src = "192.168.100.1"; | |
| - | if(0 != inet_pton(0, ipv4src, ipv4a)) |
| + | if(inet_pton(0, ipv4src, ipv4a) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2438,45 +2438,45 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [ | |
| $curl_includes_arpa_inet | |
| $curl_includes_string | |
| ]],[[ | |
| - | unsigned char ipv6a[16+1]; |
| - | unsigned char ipv4a[4+1]; |
| + | unsigned char ipv6a[16 + 1]; |
| + | unsigned char ipv4a[4 + 1]; |
| const char *ipv6src = "fe80::214:4fff:fe0b:76c8"; | |
| const char *ipv4src = "192.168.100.1"; | |
| /* - */ | |
| memset(ipv4a, 1, sizeof(ipv4a)); | |
| - | if(1 != inet_pton(AF_INET, ipv4src, ipv4a)) |
| + | if(inet_pton(AF_INET, ipv4src, ipv4a) != 1) |
| return 1; /* fail */ | |
| /* - */ | |
| - | if( (ipv4a[0] != 0xc0) || |
| - | (ipv4a[1] != 0xa8) || |
| - | (ipv4a[2] != 0x64) || |
| - | (ipv4a[3] != 0x01) || |
| - | (ipv4a[4] != 0x01) ) |
| + | if((ipv4a[0] != 0xc0) || |
| + | (ipv4a[1] != 0xa8) || |
| + | (ipv4a[2] != 0x64) || |
| + | (ipv4a[3] != 0x01) || |
| + | (ipv4a[4] != 0x01)) |
| return 1; /* fail */ | |
| /* - */ | |
| memset(ipv6a, 1, sizeof(ipv6a)); | |
| - | if(1 != inet_pton(AF_INET6, ipv6src, ipv6a)) |
| + | if(inet_pton(AF_INET6, ipv6src, ipv6a) != 1) |
| return 1; /* fail */ | |
| /* - */ | |
| - | if( (ipv6a[0] != 0xfe) || |
| - | (ipv6a[1] != 0x80) || |
| - | (ipv6a[8] != 0x02) || |
| - | (ipv6a[9] != 0x14) || |
| - | (ipv6a[10] != 0x4f) || |
| - | (ipv6a[11] != 0xff) || |
| - | (ipv6a[12] != 0xfe) || |
| - | (ipv6a[13] != 0x0b) || |
| - | (ipv6a[14] != 0x76) || |
| - | (ipv6a[15] != 0xc8) || |
| - | (ipv6a[16] != 0x01) ) |
| + | if((ipv6a[0] != 0xfe) || |
| + | (ipv6a[1] != 0x80) || |
| + | (ipv6a[8] != 0x02) || |
| + | (ipv6a[9] != 0x14) || |
| + | (ipv6a[10] != 0x4f) || |
| + | (ipv6a[11] != 0xff) || |
| + | (ipv6a[12] != 0xfe) || |
| + | (ipv6a[13] != 0x0b) || |
| + | (ipv6a[14] != 0x76) || |
| + | (ipv6a[15] != 0xc8) || |
| + | (ipv6a[16] != 0x01)) |
| return 1; /* fail */ | |
| /* - */ | |
| - | if( (ipv6a[2] != 0x0) || |
| - | (ipv6a[3] != 0x0) || |
| - | (ipv6a[4] != 0x0) || |
| - | (ipv6a[5] != 0x0) || |
| - | (ipv6a[6] != 0x0) || |
| - | (ipv6a[7] != 0x0) ) |
| + | if((ipv6a[2] != 0x0) || |
| + | (ipv6a[3] != 0x0) || |
| + | (ipv6a[4] != 0x0) || |
| + | (ipv6a[5] != 0x0) || |
| + | (ipv6a[6] != 0x0) || |
| + | (ipv6a[7] != 0x0)) |
| return 1; /* fail */ | |
| /* - */ | |
| return 0; | |
| @@ -2565,7 +2565,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_stropts | |
| ]],[[ | |
| - | if(0 != ioctl(0, 0, 0)) |
| + | if(ioctl(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2623,7 +2623,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [ | |
| $curl_includes_stropts | |
| ]],[[ | |
| int flags = 0; | |
| - | if(0 != ioctl(0, FIONBIO, &flags)) |
| + | if(ioctl(0, FIONBIO, &flags) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2680,7 +2680,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [ | |
| #include <net/if.h> | |
| ]],[[ | |
| struct ifreq ifr; | |
| - | if(0 != ioctl(0, SIOCGIFADDR, &ifr)) |
| + | if(ioctl(0, SIOCGIFADDR, &ifr) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2738,7 +2738,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_winsock2 | |
| ]],[[ | |
| - | if(0 != ioctlsocket(0, 0, 0)) |
| + | if(ioctlsocket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2768,7 +2768,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_winsock2 | |
| ]],[[ | |
| - | if(0 != ioctlsocket(0, 0, 0)) |
| + | if(ioctlsocket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2827,7 +2827,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_FIONBIO], [ | |
| $curl_includes_winsock2 | |
| ]],[[ | |
| unsigned long flags = 0; | |
| - | if(0 != ioctlsocket(0, FIONBIO, &flags)) |
| + | if(ioctlsocket(0, FIONBIO, &flags) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2884,7 +2884,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| - | if(0 != IoctlSocket(0, 0, 0)) |
| + | if(IoctlSocket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2901,7 +2901,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| - | if(0 != IoctlSocket(0, 0, 0)) |
| + | if(IoctlSocket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -2959,7 +2959,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO], [ | |
| $curl_includes_bsdsocket | |
| ]],[[ | |
| long flags = 0; | |
| - | if(0 != IoctlSocket(0, FIONBIO, &flags)) |
| + | if(IoctlSocket(0, FIONBIO, &flags) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3030,7 +3030,7 @@ AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_string | |
| ]],[[ | |
| - | if(0 != memrchr("", 0, 0)) |
| + | if(memrchr("", 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3062,7 +3062,7 @@ AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_string | |
| ]],[[ | |
| - | if(0 != memrchr("", 0, 0)) |
| + | if(memrchr("", 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3147,7 +3147,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGACTION], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_signal | |
| ]],[[ | |
| - | if(0 != sigaction(0, 0, 0)) |
| + | if(sigaction(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3232,7 +3232,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGINTERRUPT], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_signal | |
| ]],[[ | |
| - | if(0 != siginterrupt(0, 0)) |
| + | if(siginterrupt(0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3317,7 +3317,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGNAL], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_signal | |
| ]],[[ | |
| - | if(0 != signal(0, 0)) |
| + | if(signal(0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3391,7 +3391,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [ | |
| $curl_includes_setjmp | |
| ]],[[ | |
| sigjmp_buf env; | |
| - | if(0 != sigsetjmp(env, 0)) |
| + | if(sigsetjmp(env, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3424,7 +3424,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [ | |
| $curl_includes_setjmp | |
| ]],[[ | |
| sigjmp_buf env; | |
| - | if(0 != sigsetjmp(env, 0)) |
| + | if(sigsetjmp(env, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3487,7 +3487,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != socket(0, 0, 0)) |
| + | if(socket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3521,7 +3521,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [ | |
| $curl_includes_bsdsocket | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| - | if(0 != socket(0, 0, 0)) |
| + | if(socket(0, 0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3607,7 +3607,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [ | |
| $curl_includes_sys_socket | |
| ]],[[ | |
| int sv[2]; | |
| - | if(0 != socketpair(0, 0, 0, sv)) |
| + | if(socketpair(0, 0, 0, sv) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3692,7 +3692,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_string | |
| ]],[[ | |
| - | if(0 != strcasecmp("", "")) |
| + | if(strcasecmp("", "") != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3776,7 +3776,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRCMPI], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_string | |
| ]],[[ | |
| - | if(0 != strcmpi(0, 0)) |
| + | if(strcmpi(0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3971,7 +3971,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ | |
| $curl_includes_string | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != strerror_r(0, s, 0)) |
| + | if(strerror_r(0, s, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -3994,7 +3994,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ | |
| char *strerror_r(int errnum, char *workbuf, $arg3 bufsize); | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != strerror_r(0, s, 0)) |
| + | if(strerror_r(0, s, 0) != 0) |
| return 1; | |
| (void)s; | |
| ]]) | |
| @@ -4057,7 +4057,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ | |
| int strerror_r(int errnum, char *resultbuf, $arg3 bufsize); | |
| ]],[[ | |
| char s[1]; | |
| - | if(0 != strerror_r(0, s, 0)) |
| + | if(strerror_r(0, s, 0) != 0) |
| return 1; | |
| (void)s; | |
| ]]) | |
| @@ -4213,7 +4213,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [ | |
| AC_LANG_PROGRAM([[ | |
| $curl_includes_string | |
| ]],[[ | |
| - | if(0 != stricmp(0, 0)) |
| + | if(stricmp(0, 0) != 0) |
| return 1; | |
| ]]) | |
| ],[ | |
| @@ -4380,8 +4380,8 @@ AC_DEFUN([CURL_SIZEOF], [ | |
| $2 | |
| ]],[ | |
| switch(0) { | |
| - | case 0: |
| - | case (sizeof($1) == $typesize):; |
| + | case 0: |
| + | case (sizeof($1) == $typesize):; |
| } | |
| ]) | |
| ],[ | |
| @@ -46,20 +46,17 @@ | |
| #include "os400sys.h" | |
| #ifndef SIZE_MAX | |
| - | #define SIZE_MAX ((size_t) ~0) /* Is unsigned on OS/400. */ |
| + | #define SIZE_MAX ((size_t)~0) /* Is unsigned on OS/400. */ |
| #endif | |
| + | #define ASCII_CCSID 819 /* Use ISO-8859-1 as ASCII. */ |
| + | #define NOCONV_CCSID 65535 /* No conversion. */ |
| + | #define ICONV_ID_SIZE 32 /* Size of iconv_open() code identifier. */ |
| + | #define ICONV_OPEN_ERROR(t) ((t).return_value == -1) |
| - | #define ASCII_CCSID 819 /* Use ISO-8859-1 as ASCII. */ |
| - | #define NOCONV_CCSID 65535 /* No conversion. */ |
| - | #define ICONV_ID_SIZE 32 /* Size of iconv_open() code identifier. */ |
| - | #define ICONV_OPEN_ERROR(t) ((t).return_value == -1) |
| + | #define ALLOC_GRANULE 8 /* Alloc. granule for curl_formadd_ccsid(). */ |
| - | #define ALLOC_GRANULE 8 /* Alloc. granule for curl_formadd_ccsid(). */ |
| - | |
| - | |
| - | static void |
| - | makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid) |
| + | static void makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid) |
| { | |
| /** | |
| *** Convert a CCSID to the corresponding IBM iconv_open() character | |
| @@ -78,10 +75,8 @@ makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid) | |
| curl_msprintf(buf, "IBMCCSID%05u0000000", ccsid); | |
| } | |
| - | |
| - | static iconv_t |
| - | iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, |
| - | unsigned int cstr) |
| + | static iconv_t iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, |
| + | unsigned int cstr) |
| { | |
| char fromcode[ICONV_ID_SIZE]; | |
| char tocode[ICONV_ID_SIZE]; | |
| @@ -95,18 +90,16 @@ iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, | |
| makeOS400IconvCode(fromcode, ccsidin); | |
| makeOS400IconvCode(tocode, ccsidout); | |
| - | memset(tocode + 13, 0, sizeof(tocode) - 13); /* Dest. code id format. */ |
| + | memset(tocode + 13, 0, sizeof(tocode) - 13); /* Dest. code id format. */ |
| if(cstr) | |
| - | fromcode[18] = '1'; /* Set null-terminator flag. */ |
| + | fromcode[18] = '1'; /* Set null-terminator flag. */ |
| return iconv_open(tocode, fromcode); | |
| } | |
| - | |
| - | static int |
| - | convert(char *d, size_t dlen, int dccsid, |
| - | const char *s, int slen, int sccsid) |
| + | static int convert(char *d, size_t dlen, int dccsid, const char *s, int slen, |
| + | int sccsid) |
| { | |
| int i; | |
| iconv_t cd; | |
| @@ -141,7 +134,7 @@ convert(char *d, size_t dlen, int dccsid, | |
| cd = iconv_open_CCSID(dccsid, sccsid, 1); | |
| } | |
| else { | |
| - | lslen = (size_t) slen; |
| + | lslen = (size_t)slen; |
| cd = iconv_open_CCSID(dccsid, sccsid, 0); | |
| } | |
| @@ -150,7 +143,7 @@ convert(char *d, size_t dlen, int dccsid, | |
| i = dlen; | |
| - | if((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0) |
| + | if((int)iconv(cd, (char **)&s, &lslen, &d, &dlen) < 0) |
| i = -1; | |
| else | |
| i -= dlen; | |
| @@ -159,7 +152,6 @@ convert(char *d, size_t dlen, int dccsid, | |
| return i; | |
| } | |
| - | |
| static char *dynconvert(int dccsid, const char *s, int slen, int sccsid, | |
| int *olen) | |
| { | |
| @@ -171,18 +163,18 @@ static char *dynconvert(int dccsid, const char *s, int slen, int sccsid, | |
| /* Like convert, but the destination is allocated and returned. */ | |
| - | dlen = (size_t) (slen < 0 ? strlen(s) : slen) + 1; |
| - | dlen *= MAX_CONV_EXPANSION; /* Allow some expansion. */ |
| + | dlen = (size_t)(slen < 0 ? strlen(s) : slen) + 1; |
| + | dlen *= MAX_CONV_EXPANSION; /* Allow some expansion. */ |
| d = malloc(dlen); | |
| if(!d) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| l = convert(d, dlen, dccsid, s, slen, sccsid); | |
| if(l < 0) { | |
| free(d); | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| } | |
| if(slen < 0) { | |
| @@ -194,14 +186,14 @@ static char *dynconvert(int dccsid, const char *s, int slen, int sccsid, | |
| if(l2 < 0) { | |
| free(d); | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| } | |
| l += l2; | |
| } | |
| - | if((size_t) l < dlen) { |
| - | cp = realloc(d, l); /* Shorten to minimum needed. */ |
| + | if((size_t)l < dlen) { |
| + | cp = realloc(d, l); /* Shorten to minimum needed. */ |
| if(cp) | |
| d = cp; | |
| @@ -212,11 +204,10 @@ static char *dynconvert(int dccsid, const char *s, int slen, int sccsid, | |
| return d; | |
| } | |
| - | |
| - | static struct curl_slist * |
| - | slist_convert(int dccsid, struct curl_slist *from, int sccsid) |
| + | static struct curl_slist *slist_convert(int dccsid, struct curl_slist *from, |
| + | int sccsid) |
| { | |
| - | struct curl_slist *to = (struct curl_slist *) NULL; |
| + | struct curl_slist *to = (struct curl_slist *)NULL; |
| for(; from; from = from->next) { | |
| struct curl_slist *nl; | |
| @@ -224,7 +215,7 @@ slist_convert(int dccsid, struct curl_slist *from, int sccsid) | |
| if(!cp) { | |
| curl_slist_free_all(to); | |
| - | return (struct curl_slist *) NULL; |
| + | return (struct curl_slist *)NULL; |
| } | |
| nl = Curl_slist_append_nodup(to, cp); | |
| if(!nl) { | |
| @@ -237,15 +228,14 @@ slist_convert(int dccsid, struct curl_slist *from, int sccsid) | |
| return to; | |
| } | |
| - | |
| - | static char * |
| - | keyed_string(localkey_t key, const char *ascii, unsigned int ccsid) |
| + | static char *keyed_string(localkey_t key, const char *ascii, |
| + | unsigned int ccsid) |
| { | |
| int i; | |
| char *ebcdic; | |
| if(!ascii) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| i = MAX_CONV_EXPANSION * (strlen(ascii) + 1); | |
| @@ -254,40 +244,32 @@ keyed_string(localkey_t key, const char *ascii, unsigned int ccsid) | |
| return ebcdic; | |
| if(convert(ebcdic, i, ccsid, ascii, -1, ASCII_CCSID) < 0) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| return ebcdic; | |
| } | |
| - | |
| - | const char * |
| - | curl_to_ccsid(const char *s, unsigned int ccsid) |
| + | const char *curl_to_ccsid(const char *s, unsigned int ccsid) |
| { | |
| if(s) | |
| s = dynconvert(ccsid, s, -1, ASCII_CCSID, NULL); | |
| return s; | |
| } | |
| - | |
| - | const char * |
| - | curl_from_ccsid(const char *s, unsigned int ccsid) |
| + | const char *curl_from_ccsid(const char *s, unsigned int ccsid) |
| { | |
| if(s) | |
| s = dynconvert(ASCII_CCSID, s, -1, ccsid, NULL); | |
| return s; | |
| } | |
| - | |
| - | char * |
| - | curl_version_ccsid(unsigned int ccsid) |
| + | char *curl_version_ccsid(unsigned int ccsid) |
| { | |
| return keyed_string(LK_CURL_VERSION, curl_version(), ccsid); | |
| } | |
| - | |
| - | char * |
| - | curl_easy_escape_ccsid(CURL *handle, const char *string, int length, |
| - | unsigned int sccsid, unsigned int dccsid) |
| + | char *curl_easy_escape_ccsid(CURL *handle, const char *string, int length, |
| + | unsigned int sccsid, unsigned int dccsid) |
| { | |
| char *s; | |
| char *d; | |
| @@ -295,30 +277,28 @@ curl_easy_escape_ccsid(CURL *handle, const char *string, int length, | |
| if(!string) { | |
| /* !checksrc! disable ERRNOVAR 1 */ | |
| errno = EINVAL; | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| } | |
| s = dynconvert(ASCII_CCSID, string, length ? length : -1, sccsid, NULL); | |
| if(!s) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| d = curl_easy_escape(handle, s, 0); | |
| free(s); | |
| if(!d) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| s = dynconvert(dccsid, d, -1, ASCII_CCSID, NULL); | |
| free(d); | |
| return s; | |
| } | |
| - | |
| - | char * |
| - | curl_easy_unescape_ccsid(CURL *handle, const char *string, int length, |
| - | int *outlength, |
| - | unsigned int sccsid, unsigned int dccsid) |
| + | char *curl_easy_unescape_ccsid(CURL *handle, const char *string, int length, |
| + | int *outlength, unsigned int sccsid, |
| + | unsigned int dccsid) |
| { | |
| char *s; | |
| char *d; | |
| @@ -326,19 +306,19 @@ curl_easy_unescape_ccsid(CURL *handle, const char *string, int length, | |
| if(!string) { | |
| /* !checksrc! disable ERRNOVAR 1 */ | |
| errno = EINVAL; | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| } | |
| s = dynconvert(ASCII_CCSID, string, length ? length : -1, sccsid, NULL); | |
| if(!s) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| d = curl_easy_unescape(handle, s, 0, outlength); | |
| free(s); | |
| if(!d) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| s = dynconvert(dccsid, d, -1, ASCII_CCSID, NULL); | |
| free(d); | |
| @@ -349,14 +329,13 @@ curl_easy_unescape_ccsid(CURL *handle, const char *string, int length, | |
| return s; | |
| } | |
| - | |
| - | struct curl_slist * |
| - | curl_slist_append_ccsid(struct curl_slist *list, |
| - | const char *data, unsigned int ccsid) |
| + | struct curl_slist *curl_slist_append_ccsid(struct curl_slist *list, |
| + | const char *data, |
| + | unsigned int ccsid) |
| { | |
| char *s; | |
| - | s = (char *) NULL; |
| + | s = (char *)NULL; |
| if(!data) | |
| return curl_slist_append(list, data); | |
| @@ -364,16 +343,15 @@ curl_slist_append_ccsid(struct curl_slist *list, | |
| s = dynconvert(ASCII_CCSID, data, -1, ccsid, NULL); | |
| if(!s) | |
| - | return (struct curl_slist *) NULL; |
| + | return (struct curl_slist *)NULL; |
| list = curl_slist_append(list, s); | |
| free(s); | |
| return list; | |
| } | |
| - | |
| - | time_t |
| - | curl_getdate_ccsid(const char *p, const time_t *unused, unsigned int ccsid) |
| + | time_t curl_getdate_ccsid(const char *p, const time_t *unused, |
| + | unsigned int ccsid) |
| { | |
| char *s; | |
| time_t t; | |
| @@ -384,17 +362,15 @@ curl_getdate_ccsid(const char *p, const time_t *unused, unsigned int ccsid) | |
| s = dynconvert(ASCII_CCSID, p, -1, ccsid, NULL); | |
| if(!s) | |
| - | return (time_t) -1; |
| + | return (time_t)-1; |
| t = curl_getdate(s, unused); | |
| free(s); | |
| return t; | |
| } | |
| - | |
| - | static int |
| - | convert_version_info_string(const char **stringp, |
| - | char **bufp, int *left, unsigned int ccsid) |
| + | static int convert_version_info_string(const char **stringp, char **bufp, |
| + | int *left, unsigned int ccsid) |
| { | |
| /* Helper for curl_version_info_ccsid(): convert a string if defined. | |
| Result is stored in the `*left'-byte buffer at `*bufp'. | |
| @@ -415,9 +391,8 @@ convert_version_info_string(const char **stringp, | |
| return 0; | |
| } | |
| - | |
| - | curl_version_info_data * |
| - | curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) |
| + | curl_version_info_data *curl_version_info_ccsid(CURLversion stamp, |
| + | unsigned int ccsid) |
| { | |
| curl_version_info_data *p; | |
| char *cp; | |
| @@ -457,7 +432,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) | |
| /* If caller has been compiled with a newer version, error. */ | |
| if(stamp > CURLVERSION_NOW) | |
| - | return (curl_version_info_data *) NULL; |
| + | return (curl_version_info_data *)NULL; |
| p = curl_version_info(stamp); | |
| @@ -477,7 +452,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) | |
| } | |
| for(i = 0; i < sizeof(charfields) / sizeof(charfields[0]); i++) { | |
| - | cpp = (const char **) ((char *) p + charfields[i]); |
| + | cpp = (const char **)((char *)p + charfields[i]); |
| if(*cpp) | |
| n += strlen(*cpp) + 1; | |
| } | |
| @@ -490,70 +465,60 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) | |
| n += nproto * sizeof(const char *); | |
| cp = Curl_thread_buffer(LK_VERSION_INFO_DATA, n); | |
| - | id = (curl_version_info_data *) Curl_thread_buffer(LK_VERSION_INFO, |
| - | sizeof(*id)); |
| + | id = (curl_version_info_data *)Curl_thread_buffer(LK_VERSION_INFO, |
| + | sizeof(*id)); |
| if(!id || !cp) | |
| - | return (curl_version_info_data *) NULL; |
| + | return (curl_version_info_data *)NULL; |
| /* Copy data and convert strings. */ | |
| - | memcpy((char *) id, (char *) p, sizeof(*p)); |
| + | memcpy((char *)id, (char *)p, sizeof(*p)); |
| if(id->protocols) { | |
| i = nproto * sizeof(id->protocols[0]); | |
| - | id->protocols = (const char * const *) cp; |
| - | memcpy(cp, (char *) p->protocols, i); |
| + | id->protocols = (const char * const *)cp; |
| + | memcpy(cp, (char *)p->protocols, i); |
| cp += i; | |
| n -= i; | |
| for(i = 0; id->protocols[i]; i++) | |
| - | if(convert_version_info_string(((const char * *) id->protocols) + i, |
| - | &cp, &n, ccsid)) |
| - | return (curl_version_info_data *) NULL; |
| + | if(convert_version_info_string(((const char **)id->protocols) + i, |
| + | &cp, &n, ccsid)) |
| + | return (curl_version_info_data *)NULL; |
| } | |
| for(i = 0; i < sizeof(charfields) / sizeof(charfields[0]); i++) { | |
| - | cpp = (const char **) ((char *) p + charfields[i]); |
| + | cpp = (const char **)((char *)p + charfields[i]); |
| if(*cpp && convert_version_info_string(cpp, &cp, &n, ccsid)) | |
| - | return (curl_version_info_data *) NULL; |
| + | return (curl_version_info_data *)NULL; |
| } | |
| return id; | |
| } | |
| - | |
| - | const char * |
| - | curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid) |
| + | const char *curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid) |
| { | |
| return keyed_string(LK_EASY_STRERROR, curl_easy_strerror(error), ccsid); | |
| } | |
| - | |
| - | const char * |
| - | curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid) |
| + | const char *curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid) |
| { | |
| return keyed_string(LK_SHARE_STRERROR, curl_share_strerror(error), ccsid); | |
| } | |
| - | |
| - | const char * |
| - | curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid) |
| + | const char *curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid) |
| { | |
| return keyed_string(LK_MULTI_STRERROR, curl_multi_strerror(error), ccsid); | |
| } | |
| - | |
| - | const char * |
| - | curl_url_strerror_ccsid(CURLUcode error, unsigned int ccsid) |
| + | const char *curl_url_strerror_ccsid(CURLUcode error, unsigned int ccsid) |
| { | |
| return keyed_string(LK_URL_STRERROR, curl_url_strerror(error), ccsid); | |
| } | |
| - | |
| - | void |
| - | curl_certinfo_free_all(struct curl_certinfo *info) |
| + | void curl_certinfo_free_all(struct curl_certinfo *info) |
| { | |
| /* Free all memory used by certificate info. */ | |
| if(info) { | |
| @@ -562,15 +527,13 @@ curl_certinfo_free_all(struct curl_certinfo *info) | |
| for(i = 0; i < info->num_of_certs; i++) | |
| curl_slist_free_all(info->certinfo[i]); | |
| - | free((char *) info->certinfo); |
| + | free((char *)info->certinfo); |
| } | |
| - | free((char *) info); |
| + | free((char *)info); |
| } | |
| } | |
| - | |
| - | CURLcode |
| - | curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) |
| + | CURLcode curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) |
| { | |
| va_list arg; | |
| void *paramp; | |
| @@ -580,7 +543,7 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| /* WARNING: unlike curl_easy_getinfo(), the strings returned by this | |
| procedure have to be free'ed. */ | |
| - | data = (struct Curl_easy *) curl; |
| + | data = (struct Curl_easy *)curl; |
| va_start(arg, info); | |
| paramp = va_arg(arg, void *); | |
| ret = Curl_getinfo(data, info, paramp); | |
| @@ -592,11 +555,11 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| struct curl_certinfo *cipf; | |
| struct curl_certinfo *cipt; | |
| - | switch((int) info & CURLINFO_TYPEMASK) { |
| + | switch((int)info & CURLINFO_TYPEMASK) { |
| case CURLINFO_STRING: | |
| ccsid = va_arg(arg, unsigned int); | |
| - | cpp = (char * *) paramp; |
| + | cpp = (char **)paramp; |
| if(*cpp) { | |
| *cpp = dynconvert(ccsid, *cpp, -1, ASCII_CCSID, NULL); | |
| @@ -611,15 +574,15 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| ccsid = va_arg(arg, unsigned int); | |
| switch(info) { | |
| case CURLINFO_CERTINFO: | |
| - | cipf = *(struct curl_certinfo * *) paramp; |
| + | cipf = *(struct curl_certinfo **)paramp; |
| if(cipf) { | |
| - | cipt = (struct curl_certinfo *) malloc(sizeof(*cipt)); |
| + | cipt = (struct curl_certinfo *)malloc(sizeof(*cipt)); |
| if(!cipt) | |
| ret = CURLE_OUT_OF_MEMORY; | |
| else { | |
| - | cipt->certinfo = (struct curl_slist **) |
| - | calloc(cipf->num_of_certs + |
| - | 1, sizeof(struct curl_slist *)); |
| + | cipt->certinfo = |
| + | (struct curl_slist **)calloc(cipf->num_of_certs + 1, |
| + | sizeof(struct curl_slist *)); |
| if(!cipt->certinfo) | |
| ret = CURLE_OUT_OF_MEMORY; | |
| else { | |
| @@ -629,20 +592,20 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| for(i = 0; i < cipf->num_of_certs; i++) | |
| if(cipf->certinfo[i]) | |
| if(!(cipt->certinfo[i] = slist_convert(ccsid, | |
| - | cipf->certinfo[i], |
| - | ASCII_CCSID))) { |
| + | cipf->certinfo[i], |
| + | ASCII_CCSID))) { |
| ret = CURLE_OUT_OF_MEMORY; | |
| break; | |
| } | |
| - | } |
| } | |
| + | } |
| if(ret != CURLE_OK) { | |
| curl_certinfo_free_all(cipt); | |
| - | cipt = (struct curl_certinfo *) NULL; |
| + | cipt = (struct curl_certinfo *)NULL; |
| } | |
| - | *(struct curl_certinfo * *) paramp = cipt; |
| + | *(struct curl_certinfo **)paramp = cipt; |
| } | |
| break; | |
| @@ -653,7 +616,7 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| break; | |
| default: | |
| - | slp = (struct curl_slist **) paramp; |
| + | slp = (struct curl_slist **)paramp; |
| if(*slp) { | |
| *slp = slist_convert(ccsid, *slp, ASCII_CCSID); | |
| if(!*slp) | |
| @@ -668,9 +631,7 @@ curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) | |
| return ret; | |
| } | |
| - | |
| - | static int |
| - | Curl_is_formadd_string(CURLformoption option) |
| + | static int Curl_is_formadd_string(CURLformoption option) |
| { | |
| switch(option) { | |
| @@ -687,23 +648,20 @@ Curl_is_formadd_string(CURLformoption option) | |
| return 0; | |
| } | |
| - | |
| - | static void |
| - | Curl_formadd_release_local(struct curl_forms *forms, int nargs, int skip) |
| + | static void Curl_formadd_release_local(struct curl_forms *forms, int nargs, |
| + | int skip) |
| { | |
| while(nargs--) | |
| if(nargs != skip) | |
| if(Curl_is_formadd_string(forms[nargs].option)) | |
| if(forms[nargs].value) | |
| - | free((char *) forms[nargs].value); |
| + | free((char *)forms[nargs].value); |
| - | free((char *) forms); |
| + | free((char *)forms); |
| } | |
| - | |
| - | static int |
| - | Curl_formadd_convert(struct curl_forms *forms, |
| - | int formx, int lengthx, unsigned int ccsid) |
| + | static int Curl_formadd_convert(struct curl_forms *forms, int formx, |
| + | int lengthx, unsigned int ccsid) |
| { | |
| int l; | |
| char *cp; | |
| @@ -713,7 +671,7 @@ Curl_formadd_convert(struct curl_forms *forms, | |
| return 0; | |
| if(lengthx >= 0) | |
| - | l = (int) forms[lengthx].value; |
| + | l = (int)forms[lengthx].value; |
| else | |
| l = strlen(forms[formx].value) + 1; | |
| @@ -722,15 +680,15 @@ Curl_formadd_convert(struct curl_forms *forms, | |
| if(!cp) | |
| return -1; | |
| - | l = convert(cp, MAX_CONV_EXPANSION * l, ASCII_CCSID, |
| - | forms[formx].value, l, ccsid); |
| + | l = convert(cp, MAX_CONV_EXPANSION * l, ASCII_CCSID, forms[formx].value, l, |
| + | ccsid); |
| if(l < 0) { | |
| free(cp); | |
| return -1; | |
| } | |
| - | cp2 = realloc(cp, l); /* Shorten buffer to the string size. */ |
| + | cp2 = realloc(cp, l); /* Shorten buffer to the string size. */ |
| if(cp2) | |
| cp = cp2; | |
| @@ -738,15 +696,13 @@ Curl_formadd_convert(struct curl_forms *forms, | |
| forms[formx].value = cp; | |
| if(lengthx >= 0) | |
| - | forms[lengthx].value = (char *) l; /* Update length after conversion. */ |
| + | forms[lengthx].value = (char *)l; /* Update length after conversion. */ |
| return l; | |
| } | |
| - | |
| - | CURLFORMcode |
| - | curl_formadd_ccsid(struct curl_httppost **httppost, |
| - | struct curl_httppost **last_post, ...) |
| + | CURLFORMcode curl_formadd_ccsid(struct curl_httppost **httppost, |
| + | struct curl_httppost **last_post, ...) |
| { | |
| va_list arg; | |
| CURLformoption option; | |
| @@ -797,7 +753,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| lengthx = -1; | |
| namex = -1; | |
| namelengthx = -1; | |
| - | forms = (struct curl_forms *) NULL; |
| + | forms = (struct curl_forms *)NULL; |
| va_start(arg, last_post); | |
| for(;;) { | |
| @@ -831,14 +787,14 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| if(option == CURLFORM_END) | |
| break; | |
| - | } |
| + | } |
| /* Dispatch by option. */ | |
| switch(option) { | |
| case CURLFORM_END: | |
| - | forms = (struct curl_forms *) NULL; /* Leave array mode. */ |
| + | forms = (struct curl_forms *)NULL; /* Leave array mode. */ |
| continue; | |
| case CURLFORM_ARRAY: | |
| @@ -851,7 +807,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| break; | |
| case CURLFORM_COPYNAME: | |
| - | option = CURLFORM_PTRNAME; /* Static for now. */ |
| + | option = CURLFORM_PTRNAME; /* Static for now. */ |
| case CURLFORM_PTRNAME: | |
| if(namex >= 0) | |
| @@ -861,10 +817,10 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| if(!forms) { | |
| value = va_arg(arg, char *); | |
| - | nameccsid = (unsigned int) va_arg(arg, long); |
| + | nameccsid = (unsigned int)va_arg(arg, long); |
| } | |
| else { | |
| - | nameccsid = (unsigned int) forms->value; |
| + | nameccsid = (unsigned int)forms->value; |
| forms++; | |
| } | |
| @@ -878,10 +834,10 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| if(!forms) { | |
| value = va_arg(arg, char *); | |
| - | contentccsid = (unsigned int) va_arg(arg, long); |
| + | contentccsid = (unsigned int)va_arg(arg, long); |
| } | |
| else { | |
| - | contentccsid = (unsigned int) forms->value; |
| + | contentccsid = (unsigned int)forms->value; |
| forms++; | |
| } | |
| @@ -890,7 +846,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| case CURLFORM_PTRCONTENTS: | |
| case CURLFORM_BUFFERPTR: | |
| if(!forms) | |
| - | value = va_arg(arg, char *); /* No conversion. */ |
| + | value = va_arg(arg, char *); /* No conversion. */ |
| break; | |
| @@ -898,7 +854,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| lengthx = nargs; | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, long); |
| + | value = (char *)va_arg(arg, long); |
| break; | |
| @@ -906,7 +862,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| lengthx = nargs; | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, curl_off_t); |
| + | value = (char *)va_arg(arg, curl_off_t); |
| break; | |
| @@ -914,25 +870,25 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| namelengthx = nargs; | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, long); |
| + | value = (char *)va_arg(arg, long); |
| break; | |
| case CURLFORM_BUFFERLENGTH: | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, long); |
| + | value = (char *)va_arg(arg, long); |
| break; | |
| case CURLFORM_CONTENTHEADER: | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, struct curl_slist *); |
| + | value = (char *)va_arg(arg, struct curl_slist *); |
| break; | |
| case CURLFORM_STREAM: | |
| if(!forms) | |
| - | value = (char *) va_arg(arg, void *); |
| + | value = (char *)va_arg(arg, void *); |
| break; | |
| @@ -958,10 +914,10 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| if(!forms) { | |
| value = va_arg(arg, char *); | |
| - | ccsid = (unsigned int) va_arg(arg, long); |
| + | ccsid = (unsigned int)va_arg(arg, long); |
| } | |
| else { | |
| - | ccsid = (unsigned int) forms->value; |
| + | ccsid = (unsigned int)forms->value; |
| forms++; | |
| } | |
| @@ -992,15 +948,15 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| if(Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0) | |
| result = CURL_FORMADD_MEMORY; | |
| else | |
| - | lforms[namex].option = CURLFORM_COPYNAME; /* Force copy. */ |
| - | } |
| + | lforms[namex].option = CURLFORM_COPYNAME; /* Force copy. */ |
| + | } |
| if(result == CURL_FORMADD_OK) { | |
| if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) | |
| result = CURL_FORMADD_MEMORY; | |
| else | |
| contentx = -1; | |
| - | } |
| + | } |
| /* Do the formadd with our converted parameters. */ | |
| @@ -1008,7 +964,7 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| lforms[nargs].option = CURLFORM_END; | |
| result = curl_formadd(httppost, last_post, | |
| CURLFORM_ARRAY, lforms, CURLFORM_END); | |
| - | } |
| + | } |
| /* Terminate. */ | |
| @@ -1016,37 +972,35 @@ curl_formadd_ccsid(struct curl_httppost **httppost, | |
| return result; | |
| } | |
| - | |
| struct cfcdata { | |
| curl_formget_callback append; | |
| void * arg; | |
| unsigned int ccsid; | |
| }; | |
| - | |
| - | static size_t |
| - | Curl_formget_callback_ccsid(void *arg, const char *buf, size_t len) |
| + | static size_t Curl_formget_callback_ccsid(void *arg, const char *buf, |
| + | size_t len) |
| { | |
| struct cfcdata *p; | |
| char *b; | |
| int l; | |
| size_t ret; | |
| - | p = (struct cfcdata *) arg; |
| + | p = (struct cfcdata *)arg; |
| - | if((long) len <= 0) |
| + | if((long)len <= 0) |
| return (*p->append)(p->arg, buf, len); | |
| b = malloc(MAX_CONV_EXPANSION * len); | |
| if(!b) | |
| - | return (size_t) -1; |
| + | return (size_t)-1; |
| l = convert(b, MAX_CONV_EXPANSION * len, p->ccsid, buf, len, ASCII_CCSID); | |
| if(l < 0) { | |
| free(b); | |
| - | return (size_t) -1; |
| + | return (size_t)-1; |
| } | |
| ret = (*p->append)(p->arg, b, l); | |
| @@ -1054,22 +1008,18 @@ Curl_formget_callback_ccsid(void *arg, const char *buf, size_t len) | |
| return ret == l ? len : -1; | |
| } | |
| - | |
| - | int |
| - | curl_formget_ccsid(struct curl_httppost *form, void *arg, |
| - | curl_formget_callback append, unsigned int ccsid) |
| + | int curl_formget_ccsid(struct curl_httppost *form, void *arg, |
| + | curl_formget_callback append, unsigned int ccsid) |
| { | |
| struct cfcdata lcfc; | |
| lcfc.append = append; | |
| lcfc.arg = arg; | |
| lcfc.ccsid = ccsid; | |
| - | return curl_formget(form, (void *) &lcfc, Curl_formget_callback_ccsid); |
| + | return curl_formget(form, (void *)&lcfc, Curl_formget_callback_ccsid); |
| } | |
| - | |
| - | CURLcode |
| - | curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) |
| + | CURLcode curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) |
| { | |
| CURLcode result; | |
| va_list arg; | |
| @@ -1247,13 +1197,13 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) | |
| break; | |
| } | |
| - | data->set.postfieldsize = pfsize; /* Replace data size. */ |
| + | data->set.postfieldsize = pfsize; /* Replace data size. */ |
| s = cp; | |
| cp = NULL; | |
| } | |
| result = curl_easy_setopt(easy, CURLOPT_POSTFIELDS, s); | |
| - | data->set.str[STRING_COPYPOSTFIELDS] = s; /* Give to library. */ |
| + | data->set.str[STRING_COPYPOSTFIELDS] = s; /* Give to library. */ |
| break; | |
| default: | |
| @@ -1265,7 +1215,7 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) | |
| if(bp && bp->data && bp->len && | |
| ccsid != NOCONV_CCSID && ccsid != ASCII_CCSID) { | |
| - | pfsize = (curl_off_t) bp->len * MAX_CONV_EXPANSION; |
| + | pfsize = (curl_off_t)bp->len * MAX_CONV_EXPANSION; |
| if(pfsize > SIZE_MAX) | |
| pfsize = SIZE_MAX; | |
| @@ -1293,7 +1243,7 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) | |
| break; | |
| } | |
| FALLTHROUGH(); | |
| - | case CURLOPT_ERRORBUFFER: /* This is an output buffer. */ |
| + | case CURLOPT_ERRORBUFFER: /* This is an output buffer. */ |
| result = Curl_vsetopt(easy, tag, arg); | |
| break; | |
| } | |
| @@ -1303,46 +1253,39 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...) | |
| return result; | |
| } | |
| - | |
| /* ILE/RPG helper functions. */ | |
| - | char * |
| - | curl_form_long_value(long value) |
| + | char *curl_form_long_value(long value) |
| { | |
| /* ILE/RPG cannot cast an integer to a pointer. This procedure does it. */ | |
| - | return (char *) value; |
| + | return (char *)value; |
| } | |
| - | |
| - | CURLcode |
| - | curl_easy_setopt_RPGnum_(CURL *easy, CURLoption tag, curl_off_t arg) |
| + | CURLcode curl_easy_setopt_RPGnum_(CURL *easy, CURLoption tag, curl_off_t arg) |
| { | |
| /* ILE/RPG procedure overloading cannot discriminate between different | |
| size and/or signedness of format arguments. This provides a generic | |
| wrapper that adapts size to the given tag expectation. | |
| This procedure is not intended to be explicitly called from user code. */ | |
| if(tag / 10000 != CURLOPTTYPE_OFF_T) | |
| - | return curl_easy_setopt(easy, tag, (long) arg); |
| + | return curl_easy_setopt(easy, tag, (long)arg); |
| return curl_easy_setopt(easy, tag, arg); | |
| } | |
| - | |
| - | CURLcode |
| - | curl_multi_setopt_RPGnum_(CURLM *multi, CURLMoption tag, curl_off_t arg) |
| + | CURLcode curl_multi_setopt_RPGnum_(CURLM *multi, CURLMoption tag, |
| + | curl_off_t arg) |
| { | |
| /* Likewise, for multi handle. */ | |
| if(tag / 10000 != CURLOPTTYPE_OFF_T) | |
| - | return curl_multi_setopt(multi, tag, (long) arg); |
| + | return curl_multi_setopt(multi, tag, (long)arg); |
| return curl_multi_setopt(multi, tag, arg); | |
| } | |
| - | |
| - | char * |
| - | curl_pushheader_bynum_cssid(struct curl_pushheaders *h, |
| - | size_t num, unsigned int ccsid) |
| + | char *curl_pushheader_bynum_cssid(struct curl_pushheaders *h, size_t num, |
| + | unsigned int ccsid) |
| { | |
| - | char *d = (char *) NULL; |
| + | char *d = (char *)NULL; |
| char *s = curl_pushheader_bynum(h, num); | |
| if(s) | |
| @@ -1351,19 +1294,18 @@ curl_pushheader_bynum_cssid(struct curl_pushheaders *h, | |
| return d; | |
| } | |
| - | |
| - | char * |
| - | curl_pushheader_byname_ccsid(struct curl_pushheaders *h, const char *header, |
| - | unsigned int ccsidin, unsigned int ccsidout) |
| + | char *curl_pushheader_byname_ccsid(struct curl_pushheaders *h, |
| + | const char *header, unsigned int ccsidin, |
| + | unsigned int ccsidout) |
| { | |
| - | char *d = (char *) NULL; |
| + | char *d = (char *)NULL; |
| if(header) { | |
| header = dynconvert(ASCII_CCSID, header, -1, ccsidin, NULL); | |
| if(header) { | |
| char *s = curl_pushheader_byname(h, header); | |
| - | free((char *) header); |
| + | free((char *)header); |
| if(s) | |
| d = dynconvert(ccsidout, s, -1, ASCII_CCSID, NULL); | |
| @@ -1377,7 +1319,7 @@ static CURLcode | |
| mime_string_call(curl_mimepart *part, const char *string, unsigned int ccsid, | |
| CURLcode (*mimefunc)(curl_mimepart *part, const char *string)) | |
| { | |
| - | char *s = (char *) NULL; |
| + | char *s = (char *)NULL; |
| CURLcode result; | |
| if(!string) | |
| @@ -1391,45 +1333,40 @@ mime_string_call(curl_mimepart *part, const char *string, unsigned int ccsid, | |
| return result; | |
| } | |
| - | CURLcode |
| - | curl_mime_name_ccsid(curl_mimepart *part, const char *name, unsigned int ccsid) |
| + | CURLcode curl_mime_name_ccsid(curl_mimepart *part, const char *name, |
| + | unsigned int ccsid) |
| { | |
| return mime_string_call(part, name, ccsid, curl_mime_name); | |
| } | |
| - | CURLcode |
| - | curl_mime_filename_ccsid(curl_mimepart *part, |
| - | const char *filename, unsigned int ccsid) |
| + | CURLcode curl_mime_filename_ccsid(curl_mimepart *part, const char *filename, |
| + | unsigned int ccsid) |
| { | |
| return mime_string_call(part, filename, ccsid, curl_mime_filename); | |
| } | |
| - | CURLcode |
| - | curl_mime_type_ccsid(curl_mimepart *part, |
| - | const char *mimetype, unsigned int ccsid) |
| + | CURLcode curl_mime_type_ccsid(curl_mimepart *part, const char *mimetype, |
| + | unsigned int ccsid) |
| { | |
| return mime_string_call(part, mimetype, ccsid, curl_mime_type); | |
| } | |
| - | CURLcode |
| - | curl_mime_encoder_ccsid(curl_mimepart *part, |
| - | const char *encoding, unsigned int ccsid) |
| + | CURLcode curl_mime_encoder_ccsid(curl_mimepart *part, const char *encoding, |
| + | unsigned int ccsid) |
| { | |
| return mime_string_call(part, encoding, ccsid, curl_mime_encoder); | |
| } | |
| - | CURLcode |
| - | curl_mime_filedata_ccsid(curl_mimepart *part, |
| - | const char *filename, unsigned int ccsid) |
| + | CURLcode curl_mime_filedata_ccsid(curl_mimepart *part, const char *filename, |
| + | unsigned int ccsid) |
| { | |
| return mime_string_call(part, filename, ccsid, curl_mime_filedata); | |
| } | |
| - | CURLcode |
| - | curl_mime_data_ccsid(curl_mimepart *part, |
| - | const char *data, size_t datasize, unsigned int ccsid) |
| + | CURLcode curl_mime_data_ccsid(curl_mimepart *part, const char *data, |
| + | size_t datasize, unsigned int ccsid) |
| { | |
| - | char *s = (char *) NULL; |
| + | char *s = (char *)NULL; |
| CURLcode result; | |
| int osize; | |
| @@ -1444,9 +1381,8 @@ curl_mime_data_ccsid(curl_mimepart *part, | |
| return result; | |
| } | |
| - | CURLUcode |
| - | curl_url_get_ccsid(CURLU *handle, CURLUPart what, char **part, |
| - | unsigned int flags, unsigned int ccsid) |
| + | CURLUcode curl_url_get_ccsid(CURLU *handle, CURLUPart what, char **part, |
| + | unsigned int flags, unsigned int ccsid) |
| { | |
| char *s = (char *)NULL; | |
| CURLUcode result; | |
| @@ -1468,9 +1404,8 @@ curl_url_get_ccsid(CURLU *handle, CURLUPart what, char **part, | |
| return result; | |
| } | |
| - | CURLUcode |
| - | curl_url_set_ccsid(CURLU *handle, CURLUPart what, const char *part, |
| - | unsigned int flags, unsigned int ccsid) |
| + | CURLUcode curl_url_set_ccsid(CURLU *handle, CURLUPart what, const char *part, |
| + | unsigned int flags, unsigned int ccsid) |
| { | |
| char *s = (char *)NULL; | |
| CURLUcode result; | |
| @@ -1513,14 +1448,13 @@ curl_easy_option_get_name_ccsid(const struct curl_easyoption *option, | |
| if(option && option->name) | |
| name = dynconvert(ccsid, option->name, -1, ASCII_CCSID, NULL); | |
| - | return (const char *) name; |
| + | return (const char *)name; |
| } | |
| /* Header API CCSID support. */ | |
| - | CURLHcode |
| - | curl_easy_header_ccsid(CURL *easy, const char *name, size_t index, |
| - | unsigned int origin, int request, |
| - | struct curl_header **hout, unsigned int ccsid) |
| + | CURLHcode curl_easy_header_ccsid(CURL *easy, const char *name, size_t index, |
| + | unsigned int origin, int request, |
| + | struct curl_header **hout, unsigned int ccsid) |
| { | |
| CURLHcode result = CURLHE_BAD_ARGUMENT; | |
| @@ -28,7 +28,6 @@ | |
| #include "easy.h" | |
| #include "multi.h" | |
| - | |
| CURL_EXTERN char *curl_version_ccsid(unsigned int ccsid); | |
| CURL_EXTERN char *curl_easy_escape_ccsid(CURL *handle, | |
| const char *string, int length, | |
| @@ -48,16 +48,13 @@ struct arguments { | |
| struct vary2 *cmdargs; /* Command line arguments. */ | |
| }; | |
| - | static int |
| - | is_ifs(char c) |
| + | static int is_ifs(char c) |
| { | |
| return c == ' ' || c == '\t' || c == '\r' || c == '\n'; | |
| } | |
| - | static int |
| - | parse_command_line(const char *cmdargs, size_t len, |
| - | size_t *argc, char **argv, |
| - | size_t *argsize, char *argbuf) |
| + | static int parse_command_line(const char *cmdargs, size_t len, size_t *argc, |
| + | char **argv, size_t *argsize, char *argbuf) |
| { | |
| const char *endline = cmdargs + len; | |
| char quote = '\0'; | |
| @@ -126,9 +123,7 @@ parse_command_line(const char *cmdargs, size_t len, | |
| return 0; | |
| } | |
| - | |
| - | int |
| - | main(int argsc, struct arguments *args) |
| + | int main(int argsc, struct arguments *args) |
| { | |
| size_t argc; | |
| char **argv; | |
| @@ -154,20 +149,20 @@ main(int argsc, struct arguments *args) | |
| if(!exitcode) { | |
| /* Allocate space for parsed arguments. */ | |
| - | argv = (char **) malloc((argc + 1) * sizeof(*argv) + argsize); |
| + | argv = (char **)malloc((argc + 1) * sizeof(*argv) + argsize); |
| if(!argv) { | |
| fputs("Memory allocation error\n", stderr); | |
| exitcode = -2; | |
| } | |
| else { | |
| - | _SYSPTR pgmptr = rslvsp(WLI_PGM, (char *) CURLPGM, library, _AUTH_NONE); |
| - | _LU_Work_Area_T *luwrka = (_LU_Work_Area_T *) _LUWRKA(); |
| + | _SYSPTR pgmptr = rslvsp(WLI_PGM, (char *)CURLPGM, library, _AUTH_NONE); |
| + | _LU_Work_Area_T *luwrka = (_LU_Work_Area_T *)_LUWRKA(); |
| - | parse_command_line(args->cmdargs->string, args->cmdargs->len, |
| - | &argc, argv, &argsize, (char *) (argv + argc + 1)); |
| + | parse_command_line(args->cmdargs->string, args->cmdargs->len, &argc, |
| + | argv, &argsize, (char *)(argv + argc + 1)); |
| /* Call program. */ | |
| - | _CALLPGMV((void *) &pgmptr, argv, argc); |
| + | _CALLPGMV((void *)&pgmptr, argv, argc); |
| exitcode = luwrka->LU_RC; | |
| free(argv); | |
| @@ -41,15 +41,13 @@ extern int QadrtFreeConversionTable(void); | |
| extern int QadrtFreeEnviron(void); | |
| extern char * setlocale_a(int, const char *); | |
| - | |
| /* The ASCII main program. */ | |
| - | extern int main_a(int argc, char * * argv); |
| + | extern int main_a(int argc, char **argv); |
| /* Global values of original EBCDIC arguments. */ | |
| int ebcdic_argc; | |
| char ** ebcdic_argv; | |
| - | |
| int main(int argc, char **argv) | |
| { | |
| int i; | |
| @@ -63,8 +61,8 @@ int main(int argc, char **argv) | |
| char dummybuf[128]; | |
| /* To/From codes are 32 byte long strings with | |
| reserved fields initialized to ZEROs */ | |
| - | const char tocode[32] = {"IBMCCSID01208"}; /* Use UTF-8. */ |
| - | const char fromcode[32] = {"IBMCCSID000000000010"}; |
| + | const char tocode[32] = { "IBMCCSID01208" }; /* Use UTF-8. */ |
| + | const char fromcode[32] = { "IBMCCSID000000000010" }; |
| ebcdic_argc = argc; | |
| ebcdic_argv = argv; | |
| @@ -88,10 +86,10 @@ int main(int argc, char **argv) | |
| } | |
| /* Allocate memory for the ASCII arguments and vector. */ | |
| - | argv = (char **) malloc((argc + 1) * sizeof(*argv) + bytecount); |
| + | argv = (char **)malloc((argc + 1) * sizeof(*argv) + bytecount); |
| /* Build the vector and convert argument encoding. */ | |
| - | outbuf = (char *) (argv + argc + 1); |
| + | outbuf = (char *)(argv + argc + 1); |
| outbytesleft = bytecount; | |
| for(i = 0; i < argc; i++) { | |
| @@ -112,7 +110,7 @@ int main(int argc, char **argv) | |
| i = main_a(argc, argv); | |
| /* Clean-up allocated items. */ | |
| - | free((char *) argv); |
| + | free((char *)argv); |
| QadrtFreeConversionTable(); | |
| QadrtFreeEnviron(); | |
| @@ -65,14 +65,13 @@ | |
| #pragma convert(0) /* Restore EBCDIC. */ | |
| - | #define MIN_BYTE_GAIN 1024 /* Minimum gain when shortening a buffer. */ |
| + | #define MIN_BYTE_GAIN 1024 /* Minimum gain when shortening a buffer. */ |
| struct buffer_t { | |
| unsigned long size; /* Buffer size. */ | |
| char *buf; /* Buffer address. */ | |
| }; | |
| - | |
| static char *buffer_undef(localkey_t key, long size); | |
| static char *buffer_threaded(localkey_t key, long size); | |
| static char *buffer_unthreaded(localkey_t key, long size); | |
| @@ -86,10 +85,10 @@ char *(*Curl_thread_buffer)(localkey_t key, long size) = buffer_undef; | |
| static void thdbufdestroy(void *private) | |
| { | |
| if(private) { | |
| - | struct buffer_t *p = (struct buffer_t *) private; |
| + | struct buffer_t *p = (struct buffer_t *)private; |
| localkey_t i; | |
| - | for(i = (localkey_t) 0; i < LK_LAST; i++) { |
| + | for(i = (localkey_t)0; i < LK_LAST; i++) { |
| free(p->buf); | |
| p++; | |
| } | |
| @@ -98,27 +97,23 @@ static void thdbufdestroy(void *private) | |
| } | |
| } | |
| - | |
| - | static void |
| - | terminate(void) |
| + | static void terminate(void) |
| { | |
| if(Curl_thread_buffer == buffer_threaded) { | |
| locbufs = pthread_getspecific(thdkey); | |
| - | pthread_setspecific(thdkey, (void *) NULL); |
| + | pthread_setspecific(thdkey, (void *)NULL); |
| pthread_key_delete(thdkey); | |
| } | |
| if(Curl_thread_buffer != buffer_undef) { | |
| - | thdbufdestroy((void *) locbufs); |
| - | locbufs = (struct buffer_t *) NULL; |
| + | thdbufdestroy((void *)locbufs); |
| + | locbufs = (struct buffer_t *)NULL; |
| } | |
| Curl_thread_buffer = buffer_undef; | |
| } | |
| - | |
| - | static char * |
| - | get_buffer(struct buffer_t *buf, long size) |
| + | static char *get_buffer(struct buffer_t *buf, long size) |
| { | |
| char *cp; | |
| @@ -136,7 +131,7 @@ get_buffer(struct buffer_t *buf, long size) | |
| return buf->buf; | |
| } | |
| - | if((unsigned long) size <= buf->size) { |
| + | if((unsigned long)size <= buf->size) { |
| /* Shorten the buffer only if it frees a significant byte count. This | |
| avoids some realloc() overhead. */ | |
| @@ -157,27 +152,23 @@ get_buffer(struct buffer_t *buf, long size) | |
| return cp; | |
| } | |
| - | |
| /* | |
| * Get buffer address for the given local key. | |
| * This is always called though `Curl_thread_buffer' and when threads are | |
| * NOT made available by the os, so no mutex lock/unlock occurs. | |
| */ | |
| - | static char * |
| - | buffer_unthreaded(localkey_t key, long size) |
| + | static char *buffer_unthreaded(localkey_t key, long size) |
| { | |
| return get_buffer(locbufs + key, size); | |
| } | |
| - | |
| /* | |
| * Get buffer address for the given local key, taking care of | |
| * concurrent threads. | |
| * This is always called though `Curl_thread_buffer' and when threads are | |
| * made available by the os. | |
| */ | |
| - | static char * |
| - | buffer_threaded(localkey_t key, long size) |
| + | static char *buffer_threaded(localkey_t key, long size) |
| { | |
| struct buffer_t *bufs; | |
| @@ -185,30 +176,28 @@ buffer_threaded(localkey_t key, long size) | |
| make sure it is at least `size'-byte long. Set `size' to < 0 to get | |
| its address only. */ | |
| - | bufs = (struct buffer_t *) pthread_getspecific(thdkey); |
| + | bufs = (struct buffer_t *)pthread_getspecific(thdkey); |
| if(!bufs) { | |
| if(size < 0) | |
| - | return (char *) NULL; /* No buffer yet. */ |
| + | return (char *)NULL; /* No buffer yet. */ |
| /* Allocate buffer descriptors for the current thread. */ | |
| - | bufs = calloc((size_t) LK_LAST, sizeof(*bufs)); |
| + | bufs = calloc((size_t)LK_LAST, sizeof(*bufs)); |
| if(!bufs) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| - | if(pthread_setspecific(thdkey, (void *) bufs)) { |
| + | if(pthread_setspecific(thdkey, (void *)bufs)) { |
| free(bufs); | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| } | |
| } | |
| return get_buffer(bufs + key, size); | |
| } | |
| - | |
| - | static char * |
| - | buffer_undef(localkey_t key, long size) |
| + | static char *buffer_undef(localkey_t key, long size) |
| { | |
| /* Define the buffer system, get the buffer for the given local key in | |
| the current thread, and make sure it is at least `size'-byte long. | |
| @@ -218,7 +207,7 @@ buffer_undef(localkey_t key, long size) | |
| /* Determine if we can use pthread-specific data. */ | |
| - | if(Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */ |
| + | if(Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */ |
| /* OS400 interactive jobs do not support threads: check here. */ | |
| if(!pthread_key_create(&thdkey, thdbufdestroy)) { | |
| /* Threads are supported: use the thread-aware buffer procedure. */ | |
| @@ -227,10 +216,10 @@ buffer_undef(localkey_t key, long size) | |
| else { | |
| /* No multi-threading available: allocate storage for single-thread | |
| * buffer headers. */ | |
| - | locbufs = calloc((size_t) LK_LAST, sizeof(*locbufs)); |
| + | locbufs = calloc((size_t)LK_LAST, sizeof(*locbufs)); |
| if(!locbufs) { | |
| - | pthread_mutex_unlock(&mutex); /* For symetry: will probably fail. */ |
| - | return (char *) NULL; |
| + | pthread_mutex_unlock(&mutex); /* For symetry: will probably fail. */ |
| + | return (char *)NULL; |
| } | |
| else | |
| Curl_thread_buffer = buffer_unthreaded; /* Use unthreaded version. */ | |
| @@ -243,15 +232,13 @@ buffer_undef(localkey_t key, long size) | |
| return Curl_thread_buffer(key, size); | |
| } | |
| - | |
| - | static char * |
| - | set_thread_string(localkey_t key, const char *s) |
| + | static char *set_thread_string(localkey_t key, const char *s) |
| { | |
| int i; | |
| char *cp; | |
| if(!s) | |
| - | return (char *) NULL; |
| + | return (char *)NULL; |
| i = strlen(s) + 1; | |
| cp = Curl_thread_buffer(key, MAX_CONV_EXPANSION * i + 1); | |
| @@ -264,12 +251,10 @@ set_thread_string(localkey_t key, const char *s) | |
| return cp; | |
| } | |
| - | |
| - | int |
| - | Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen, |
| - | char *nodename, socklen_t nodenamelen, |
| - | char *servname, socklen_t servnamelen, |
| - | int flags) |
| + | int Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen, |
| + | char *nodename, socklen_t nodenamelen, |
| + | char *servname, socklen_t servnamelen, |
| + | int flags) |
| { | |
| char *enodename = NULL; | |
| char *eservname = NULL; | |
| @@ -289,20 +274,20 @@ Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen, | |
| } | |
| } | |
| - | status = getnameinfo(sa, salen, enodename, nodenamelen, |
| - | eservname, servnamelen, flags); |
| + | status = getnameinfo(sa, salen, enodename, nodenamelen, eservname, |
| + | servnamelen, flags); |
| if(!status) { | |
| int i; | |
| if(enodename) { | |
| - | i = QadrtConvertE2A(nodename, enodename, |
| - | nodenamelen - 1, strlen(enodename)); |
| + | i = QadrtConvertE2A(nodename, enodename, nodenamelen - 1, |
| + | strlen(enodename)); |
| nodename[i] = '\0'; | |
| } | |
| if(eservname) { | |
| - | i = QadrtConvertE2A(servname, eservname, |
| - | servnamelen - 1, strlen(eservname)); |
| + | i = QadrtConvertE2A(servname, eservname, servnamelen - 1, |
| + | strlen(eservname)); |
| servname[i] = '\0'; | |
| } | |
| } | |
| @@ -312,18 +297,16 @@ Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen, | |
| return status; | |
| } | |
| - | int |
| - | Curl_getaddrinfo_a(const char *nodename, const char *servname, |
| - | const struct addrinfo *hints, |
| - | struct addrinfo **res) |
| + | int Curl_getaddrinfo_a(const char *nodename, const char *servname, |
| + | const struct addrinfo *hints, struct addrinfo **res) |
| { | |
| char *enodename; | |
| char *eservname; | |
| int status; | |
| int i; | |
| - | enodename = (char *) NULL; |
| - | eservname = (char *) NULL; |
| + | enodename = (char *)NULL; |
| + | eservname = (char *)NULL; |
| if(nodename) { | |
| i = strlen(nodename); | |
| @@ -360,8 +343,7 @@ Curl_getaddrinfo_a(const char *nodename, const char *servname, | |
| /* ASCII wrappers for the GSSAPI procedures. */ | |
| - | static int |
| - | Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf) |
| + | static int Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf) |
| { | |
| unsigned int i = buf->length; | |
| @@ -388,10 +370,8 @@ Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf) | |
| return 0; | |
| } | |
| - | |
| - | OM_uint32 |
| - | Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name, |
| - | gss_OID in_name_type, gss_name_t *out_name) |
| + | OM_uint32 Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name, |
| + | gss_OID in_name_type, gss_name_t *out_name) |
| { | |
| OM_uint32 rc; | |
| unsigned int i; | |
| @@ -400,7 +380,7 @@ Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name, | |
| if(!in_name || !in_name->value || !in_name->length) | |
| return gss_import_name(minor_status, in_name, in_name_type, out_name); | |
| - | memcpy((char *) &in, (char *) in_name, sizeof(in)); |
| + | memcpy((char *)&in, (char *)in_name, sizeof(in)); |
| i = in.length; | |
| in.value = malloc(i + 1); | |
| @@ -413,17 +393,17 @@ Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name, | |
| } | |
| QadrtConvertA2E(in.value, in_name->value, i, i); | |
| - | ((char *) in.value)[i] = '\0'; |
| + | ((char *)in.value)[i] = '\0'; |
| rc = gss_import_name(minor_status, &in, in_name_type, out_name); | |
| free(in.value); | |
| return rc; | |
| } | |
| - | OM_uint32 |
| - | Curl_gss_display_status_a(OM_uint32 *minor_status, OM_uint32 status_value, |
| - | int status_type, gss_OID mech_type, |
| - | gss_msg_ctx_t *message_context, |
| - | gss_buffer_t status_string) |
| + | OM_uint32 Curl_gss_display_status_a(OM_uint32 *minor_status, |
| + | OM_uint32 status_value, int status_type, |
| + | gss_OID mech_type, |
| + | gss_msg_ctx_t *message_context, |
| + | gss_buffer_t status_string) |
| { | |
| int rc; | |
| @@ -477,7 +457,7 @@ Curl_gss_init_sec_context_a(OM_uint32 *minor_status, | |
| } | |
| QadrtConvertA2E(in.value, input_token->value, i, i); | |
| - | ((char *) in.value)[i] = '\0'; |
| + | ((char *)in.value)[i] = '\0'; |
| in.length = i; | |
| inp = ∈ | |
| } | |
| @@ -503,11 +483,9 @@ Curl_gss_init_sec_context_a(OM_uint32 *minor_status, | |
| return rc; | |
| } | |
| - | |
| - | OM_uint32 |
| - | Curl_gss_delete_sec_context_a(OM_uint32 *minor_status, |
| - | gss_ctx_id_t *context_handle, |
| - | gss_buffer_t output_token) |
| + | OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 *minor_status, |
| + | gss_ctx_id_t *context_handle, |
| + | gss_buffer_t output_token) |
| { | |
| OM_uint32 rc; | |
| @@ -533,38 +511,36 @@ Curl_gss_delete_sec_context_a(OM_uint32 *minor_status, | |
| /* ASCII wrappers for the LDAP procedures. */ | |
| - | void * |
| - | Curl_ldap_init_a(char *host, int port) |
| + | void *Curl_ldap_init_a(char *host, int port) |
| { | |
| size_t i; | |
| char *ehost; | |
| void *result; | |
| if(!host) | |
| - | return (void *) ldap_init(host, port); |
| + | return (void *)ldap_init(host, port); |
| i = strlen(host); | |
| ehost = malloc(i + 1); | |
| if(!ehost) | |
| - | return (void *) NULL; |
| + | return (void *)NULL; |
| QadrtConvertA2E(ehost, host, i, i); | |
| ehost[i] = '\0'; | |
| - | result = (void *) ldap_init(ehost, port); |
| + | result = (void *)ldap_init(ehost, port); |
| free(ehost); | |
| return result; | |
| } | |
| - | int |
| - | Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd) |
| + | int Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd) |
| { | |
| int i; | |
| char *edn; | |
| char *epasswd; | |
| - | edn = (char *) NULL; |
| - | epasswd = (char *) NULL; |
| + | edn = (char *)NULL; |
| + | epasswd = (char *)NULL; |
| if(dn) { | |
| i = strlen(dn); | |
| @@ -596,9 +572,8 @@ Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd) | |
| return i; | |
| } | |
| - | int |
| - | Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter, |
| - | char **attrs, int attrsonly, LDAPMessage **res) |
| + | int Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter, |
| + | char **attrs, int attrsonly, LDAPMessage **res) |
| { | |
| int i; | |
| int j; | |
| @@ -607,9 +582,9 @@ Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter, | |
| char **eattrs; | |
| int status; | |
| - | ebase = (char *) NULL; |
| - | efilter = (char *) NULL; |
| - | eattrs = (char **) NULL; |
| + | ebase = (char *)NULL; |
| + | efilter = (char *)NULL; |
| + | eattrs = (char **)NULL; |
| status = LDAP_SUCCESS; | |
| if(base) { | |
| @@ -676,14 +651,13 @@ Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter, | |
| return status; | |
| } | |
| - | |
| - | struct berval ** |
| - | Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr) |
| + | struct berval **Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, |
| + | const char *attr) |
| { | |
| char *cp; | |
| struct berval **result; | |
| - | cp = (char *) NULL; |
| + | cp = (char *)NULL; |
| if(attr) { | |
| int i = strlen(attr); | |
| @@ -692,7 +666,7 @@ Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr) | |
| if(!cp) { | |
| ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL, | |
| ldap_err2string(LDAP_NO_MEMORY)); | |
| - | return (struct berval **) NULL; |
| + | return (struct berval **)NULL; |
| } | |
| QadrtConvertA2E(cp, attr, i, i); | |
| @@ -708,14 +682,12 @@ Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr) | |
| return result; | |
| } | |
| - | char * |
| - | Curl_ldap_err2string_a(int error) |
| + | char *Curl_ldap_err2string_a(int error) |
| { | |
| return set_thread_string(LK_LDAP_ERROR, ldap_err2string(error)); | |
| } | |
| - | char * |
| - | Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry) |
| + | char *Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry) |
| { | |
| int i; | |
| char *cp; | |
| @@ -744,9 +716,8 @@ Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry) | |
| return cp; | |
| } | |
| - | char * |
| - | Curl_ldap_first_attribute_a(void *ld, |
| - | LDAPMessage *entry, BerElement **berptr) |
| + | char *Curl_ldap_first_attribute_a(void *ld, LDAPMessage *entry, |
| + | BerElement **berptr) |
| { | |
| int i; | |
| char *cp; | |
| @@ -775,9 +746,8 @@ Curl_ldap_first_attribute_a(void *ld, | |
| return cp; | |
| } | |
| - | char * |
| - | Curl_ldap_next_attribute_a(void *ld, |
| - | LDAPMessage *entry, BerElement *berptr) |
| + | char *Curl_ldap_next_attribute_a(void *ld, LDAPMessage *entry, |
| + | BerElement *berptr) |
| { | |
| int i; | |
| char *cp; | |
| @@ -808,9 +778,8 @@ Curl_ldap_next_attribute_a(void *ld, | |
| #endif /* CURL_DISABLE_LDAP */ | |
| - | static int |
| - | sockaddr2ebcdic(struct sockaddr_storage *dstaddr, |
| - | const struct sockaddr *srcaddr, int srclen) |
| + | static int sockaddr2ebcdic(struct sockaddr_storage *dstaddr, |
| + | const struct sockaddr *srcaddr, int srclen) |
| { | |
| const struct sockaddr_un *srcu; | |
| struct sockaddr_un *dstu; | |
| @@ -826,13 +795,13 @@ sockaddr2ebcdic(struct sockaddr_storage *dstaddr, | |
| return -1; | |
| } | |
| - | memcpy((char *) dstaddr, (char *) srcaddr, srclen); |
| + | memcpy((char *)dstaddr, (char *)srcaddr, srclen); |
| switch(srcaddr->sa_family) { | |
| case AF_UNIX: | |
| - | srcu = (const struct sockaddr_un *) srcaddr; |
| - | dstu = (struct sockaddr_un *) dstaddr; |
| + | srcu = (const struct sockaddr_un *)srcaddr; |
| + | dstu = (struct sockaddr_un *)dstaddr; |
| dstsize = sizeof(*dstaddr) - offsetof(struct sockaddr_un, sun_path); | |
| srclen -= offsetof(struct sockaddr_un, sun_path); | |
| i = QadrtConvertA2E(dstu->sun_path, srcu->sun_path, dstsize - 1, srclen); | |
| @@ -843,10 +812,8 @@ sockaddr2ebcdic(struct sockaddr_storage *dstaddr, | |
| return srclen; | |
| } | |
| - | |
| - | static int |
| - | sockaddr2ascii(struct sockaddr *dstaddr, int dstlen, |
| - | const struct sockaddr_storage *srcaddr, int srclen) |
| + | static int sockaddr2ascii(struct sockaddr *dstaddr, int dstlen, |
| + | const struct sockaddr_storage *srcaddr, int srclen) |
| { | |
| const struct sockaddr_un *srcu; | |
| struct sockaddr_un *dstu; | |
| @@ -864,15 +831,15 @@ sockaddr2ascii(struct sockaddr *dstaddr, int dstlen, | |
| return -1; | |
| } | |
| - | memcpy((char *) dstaddr, (char *) srcaddr, srclen); |
| + | memcpy((char *)dstaddr, (char *)srcaddr, srclen); |
| if(srclen >= offsetof(struct sockaddr_storage, ss_family) + | |
| sizeof(srcaddr->ss_family)) { | |
| switch(srcaddr->ss_family) { | |
| case AF_UNIX: | |
| - | srcu = (const struct sockaddr_un *) srcaddr; |
| - | dstu = (struct sockaddr_un *) dstaddr; |
| + | srcu = (const struct sockaddr_un *)srcaddr; |
| + | dstu = (struct sockaddr_un *)dstaddr; |
| dstsize = dstlen - offsetof(struct sockaddr_un, sun_path); | |
| srclen -= offsetof(struct sockaddr_un, sun_path); | |
| if(dstsize > 0 && srclen > 0) { | |
| @@ -887,8 +854,7 @@ sockaddr2ascii(struct sockaddr *dstaddr, int dstlen, | |
| return srclen; | |
| } | |
| - | int |
| - | Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen) |
| + | int Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen) |
| { | |
| int i; | |
| struct sockaddr_storage laddr; | |
| @@ -898,11 +864,10 @@ Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen) | |
| if(i < 0) | |
| return -1; | |
| - | return connect(sd, (struct sockaddr *) &laddr, i); |
| + | return connect(sd, (struct sockaddr *)&laddr, i); |
| } | |
| - | int |
| - | Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen) |
| + | int Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen) |
| { | |
| int i; | |
| struct sockaddr_storage laddr; | |
| @@ -912,12 +877,11 @@ Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen) | |
| if(i < 0) | |
| return -1; | |
| - | return bind(sd, (struct sockaddr *) &laddr, i); |
| + | return bind(sd, (struct sockaddr *)&laddr, i); |
| } | |
| - | int |
| - | Curl_os400_sendto(int sd, char *buffer, int buflen, int flags, |
| - | const struct sockaddr *dstaddr, int addrlen) |
| + | int Curl_os400_sendto(int sd, char *buffer, int buflen, int flags, |
| + | const struct sockaddr *dstaddr, int addrlen) |
| { | |
| int i; | |
| struct sockaddr_storage laddr; | |
| @@ -927,12 +891,11 @@ Curl_os400_sendto(int sd, char *buffer, int buflen, int flags, | |
| if(i < 0) | |
| return -1; | |
| - | return sendto(sd, buffer, buflen, flags, (struct sockaddr *) &laddr, i); |
| + | return sendto(sd, buffer, buflen, flags, (struct sockaddr *)&laddr, i); |
| } | |
| - | int |
| - | Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags, |
| - | struct sockaddr *fromaddr, int *addrlen) |
| + | int Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags, |
| + | struct sockaddr *fromaddr, int *addrlen) |
| { | |
| int rcvlen; | |
| struct sockaddr_storage laddr; | |
| @@ -943,7 +906,7 @@ Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags, | |
| laddr.ss_family = AF_UNSPEC; /* To detect if unused. */ | |
| rcvlen = recvfrom(sd, buffer, buflen, flags, | |
| - | (struct sockaddr *) &laddr, &laddrlen); |
| + | (struct sockaddr *)&laddr, &laddrlen); |
| if(rcvlen < 0) | |
| return rcvlen; | |
| @@ -959,12 +922,11 @@ Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags, | |
| return rcvlen; | |
| } | |
| - | int |
| - | Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen) |
| + | int Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen) |
| { | |
| struct sockaddr_storage laddr; | |
| int laddrlen = sizeof(laddr); | |
| - | int retcode = getpeername(sd, (struct sockaddr *) &laddr, &laddrlen); |
| + | int retcode = getpeername(sd, (struct sockaddr *)&laddr, &laddrlen); |
| if(!retcode) { | |
| laddrlen = sockaddr2ascii(addr, *addrlen, &laddr, laddrlen); | |
| @@ -976,12 +938,11 @@ Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen) | |
| return retcode; | |
| } | |
| - | int |
| - | Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen) |
| + | int Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen) |
| { | |
| struct sockaddr_storage laddr; | |
| int laddrlen = sizeof(laddr); | |
| - | int retcode = getsockname(sd, (struct sockaddr *) &laddr, &laddrlen); |
| + | int retcode = getsockname(sd, (struct sockaddr *)&laddr, &laddrlen); |
| if(!retcode) { | |
| laddrlen = sockaddr2ascii(addr, *addrlen, &laddr, laddrlen); | |
| @@ -993,17 +954,14 @@ Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen) | |
| return retcode; | |
| } | |
| - | |
| #ifdef HAVE_LIBZ | |
| - | const char * |
| - | Curl_os400_zlibVersion(void) |
| + | const char *Curl_os400_zlibVersion(void) |
| { | |
| return set_thread_string(LK_ZLIB_VERSION, zlibVersion()); | |
| } | |
| - | |
| - | int |
| - | Curl_os400_inflateInit_(z_streamp strm, const char *version, int stream_size) |
| + | int Curl_os400_inflateInit_(z_streamp strm, const char *version, |
| + | int stream_size) |
| { | |
| z_const char *msgb4 = strm->msg; | |
| int ret; | |
| @@ -1016,9 +974,8 @@ Curl_os400_inflateInit_(z_streamp strm, const char *version, int stream_size) | |
| return ret; | |
| } | |
| - | int |
| - | Curl_os400_inflateInit2_(z_streamp strm, int windowBits, |
| - | const char *version, int stream_size) |
| + | int Curl_os400_inflateInit2_(z_streamp strm, int windowBits, |
| + | const char *version, int stream_size) |
| { | |
| z_const char *msgb4 = strm->msg; | |
| int ret; | |
| @@ -1031,8 +988,7 @@ Curl_os400_inflateInit2_(z_streamp strm, int windowBits, | |
| return ret; | |
| } | |
| - | int |
| - | Curl_os400_inflate(z_streamp strm, int flush) |
| + | int Curl_os400_inflate(z_streamp strm, int flush) |
| { | |
| z_const char *msgb4 = strm->msg; | |
| int ret; | |
| @@ -1045,8 +1001,7 @@ Curl_os400_inflate(z_streamp strm, int flush) | |
| return ret; | |
| } | |
| - | int |
| - | Curl_os400_inflateEnd(z_streamp strm) |
| + | int Curl_os400_inflateEnd(z_streamp strm) |
| { | |
| z_const char *msgb4 = strm->msg; | |
| int ret; | |
| @@ -28,30 +28,27 @@ | |
| #ifndef __OS400_SYS_ | |
| #define __OS400_SYS_ | |
| - | |
| /* Per-thread item identifiers. */ | |
| typedef enum { | |
| - | LK_GSK_ERROR, |
| - | LK_LDAP_ERROR, |
| - | LK_CURL_VERSION, |
| - | LK_VERSION_INFO, |
| - | LK_VERSION_INFO_DATA, |
| - | LK_EASY_STRERROR, |
| - | LK_SHARE_STRERROR, |
| - | LK_MULTI_STRERROR, |
| - | LK_URL_STRERROR, |
| - | LK_ZLIB_VERSION, |
| - | LK_ZLIB_MSG, |
| - | LK_LAST |
| - | } localkey_t; |
| - | |
| - | |
| - | extern char * (* Curl_thread_buffer)(localkey_t key, long size); |
| - | |
| + | LK_GSK_ERROR, |
| + | LK_LDAP_ERROR, |
| + | LK_CURL_VERSION, |
| + | LK_VERSION_INFO, |
| + | LK_VERSION_INFO_DATA, |
| + | LK_EASY_STRERROR, |
| + | LK_SHARE_STRERROR, |
| + | LK_MULTI_STRERROR, |
| + | LK_URL_STRERROR, |
| + | LK_ZLIB_VERSION, |
| + | LK_ZLIB_MSG, |
| + | LK_LAST |
| + | } localkey_t; |
| + | |
| + | extern char *(*Curl_thread_buffer)(localkey_t key, long size); |
| /* Maximum string expansion factor due to character code conversion. */ | |
| - | #define MAX_CONV_EXPANSION 4 /* Can deal with UTF-8. */ |
| + | #define MAX_CONV_EXPANSION 4 /* Can deal with UTF-8. */ |
| #endif | |
| @@ -78,34 +78,29 @@ struct itmlst_3 { | |
| #pragma member_alignment restore | |
| #ifdef __VAX | |
| - | #define ENABLE "ENABLE" |
| + | #define ENABLE "ENABLE" |
| #define DISABLE "DISABLE" | |
| #else | |
| - | #define ENABLE TRUE |
| + | #define ENABLE TRUE |
| #define DISABLE 0 | |
| - | int decc$feature_get_index (const char *name); |
| - | int decc$feature_set_value (int index, int mode, int value); |
| + | int decc$feature_get_index(const char *name); |
| + | int decc$feature_set_value(int index, int mode, int value); |
| #endif | |
| - | int SYS$TRNLNM( |
| - | const unsigned long *attr, |
| - | const struct dsc$descriptor_s *table_dsc, |
| - | struct dsc$descriptor_s *name_dsc, |
| - | const unsigned char *acmode, |
| - | const struct itmlst_3 *item_list); |
| - | int SYS$CRELNM( |
| - | const unsigned long *attr, |
| - | const struct dsc$descriptor_s *table_dsc, |
| - | const struct dsc$descriptor_s *name_dsc, |
| - | const unsigned char *acmode, |
| - | const struct itmlst_3 *item_list); |
| - | |
| + | int SYS$TRNLNM(const unsigned long *attr, |
| + | const struct dsc$descriptor_s *table_dsc, |
| + | struct dsc$descriptor_s *name_dsc, |
| + | const unsigned char *acmode, |
| + | const struct itmlst_3 *item_list); |
| + | int SYS$CRELNM(const unsigned long *attr, |
| + | const struct dsc$descriptor_s *table_dsc, |
| + | const struct dsc$descriptor_s *name_dsc, |
| + | const unsigned char *acmode, |
| + | const struct itmlst_3 *item_list); |
| /* Take all the fun out of simply looking up a logical name */ | |
| - | static int sys_trnlnm(const char *logname, |
| - | char *value, |
| - | int value_len) |
| + | static int sys_trnlnm(const char *logname, char *value, int value_len) |
| { | |
| const $DESCRIPTOR(table_dsc, "LNM$FILE_DEV"); | |
| const unsigned long attr = LNM$M_CASE_BLIND; | |
| @@ -140,8 +135,7 @@ static int sys_trnlnm(const char *logname, | |
| } | |
| /* How to simply create a logical name */ | |
| - | static int sys_crelnm(const char *logname, |
| - | const char *value) |
| + | static int sys_crelnm(const char *logname, const char *value) |
| { | |
| int ret_val; | |
| const char *proc_table = "LNM$PROCESS_TABLE"; | |
| @@ -149,12 +143,12 @@ static int sys_crelnm(const char *logname, | |
| struct dsc$descriptor_s logname_dsc; | |
| struct itmlst_3 item_list[2]; | |
| - | proc_table_dsc.dsc$a_pointer = (char *) proc_table; |
| + | proc_table_dsc.dsc$a_pointer = (char *)proc_table; |
| proc_table_dsc.dsc$w_length = strlen(proc_table); | |
| proc_table_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | |
| proc_table_dsc.dsc$b_class = DSC$K_CLASS_S; | |
| - | logname_dsc.dsc$a_pointer = (char *) logname; |
| + | logname_dsc.dsc$a_pointer = (char *)logname; |
| logname_dsc.dsc$w_length = strlen(logname); | |
| logname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | |
| logname_dsc.dsc$b_class = DSC$K_CLASS_S; | |
| @@ -172,7 +166,6 @@ static int sys_crelnm(const char *logname, | |
| return ret_val; | |
| } | |
| - | |
| /* Start of DECC RTL Feature handling */ | |
| /* | |
| @@ -191,7 +184,7 @@ static void set_feature_default(const char *name, int value) | |
| index = decc$feature_get_index(name); | |
| if(index > 0) | |
| - | decc$feature_set_value (index, 0, value); |
| + | decc$feature_set_value(index, 0, value); |
| } | |
| #endif | |
| @@ -202,7 +195,7 @@ static void set_features(void) | |
| int use_unix_settings = 1; | |
| status = sys_trnlnm("GNV$UNIX_SHELL", | |
| - | unix_shell_name, sizeof(unix_shell_name) -1); |
| + | unix_shell_name, sizeof(unix_shell_name) - 1); |
| if(!$VMS_STATUS_SUCCESS(status)) { | |
| use_unix_settings = 0; | |
| } | |
| @@ -262,7 +255,6 @@ static void set_features(void) | |
| set_feature_default("DECC$FILE_OWNER_UNIX", ENABLE); | |
| set_feature_default("DECC$POSIX_SEEK_STREAM_FILE", ENABLE); | |
| - | |
| } | |
| else { | |
| set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE); | |
| @@ -285,10 +277,9 @@ static void set_features(void) | |
| /* Commented here to prevent future bugs: A program or user should */ | |
| /* never ever enable DECC$POSIX_STYLE_UID. */ | |
| /* It will probably break all code that accesses UIDs */ | |
| - | /* do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */ |
| + | /* do_not_set_default("DECC$POSIX_STYLE_UID", TRUE); */ |
| } | |
| - | |
| /* Some boilerplate to force this to be a proper LIB$INITIALIZE section */ | |
| #pragma nostandard | |
| @@ -306,7 +297,7 @@ static void set_features(void) | |
| # endif | |
| #endif | |
| /* Set our contribution to the LIB$INITIALIZE array */ | |
| - | void (* const iniarray[])(void) = {set_features }; |
| + | void (* const iniarray[])(void) = { set_features }; |
| #ifndef __VAX | |
| # if __INITIAL_POINTER_SIZE | |
| # pragma __pointer_size __restore | |
| @@ -315,7 +306,6 @@ void (* const iniarray[])(void) = {set_features }; | |
| # endif | |
| #endif | |
| - | |
| /* | |
| ** Force a reference to LIB$INITIALIZE to ensure it | |
| ** exists in the image. | |
| @@ -324,7 +314,7 @@ int LIB$INITIALIZE(void); | |
| #ifdef __DECC | |
| #pragma extern_model strict_refdef | |
| #endif | |
| - | int lib_init_ref = (int) LIB$INITIALIZE; |
| + | int lib_init_ref = (int)LIB$INITIALIZE; |
| #ifdef __DECC | |
| #pragma extern_model restore | |
| #pragma standard | |
| @@ -50,93 +50,93 @@ | |
| /* IF YOU UPDATE THIS FILE, UPDATE CURLMSG_VMS.H SO THAT THEY ARE IN SYNC */ | |
| /* */ | |
| - | #define CURL_FACILITY 3841 |
| - | #define CURL_OK 251756553 |
| - | #define CURL_UNSUPPORTED_PROTOCOL 251756562 |
| - | #define CURL_FAILED_INIT 251756570 |
| - | #define CURL_URL_MALFORMAT 251756578 |
| - | #define CURL_OBSOLETE4 251756586 |
| - | #define CURL_COULDNT_RESOLVE_PROXY 251756594 |
| - | #define CURL_COULDNT_RESOLVE_HOST 251756602 |
| - | #define CURL_COULDNT_CONNECT 251756610 |
| - | #define CURL_WEIRD_SERVER_REPLY 251756618 |
| + | #define CURL_FACILITY 3841 |
| + | #define CURL_OK 251756553 |
| + | #define CURL_UNSUPPORTED_PROTOCOL 251756562 |
| + | #define CURL_FAILED_INIT 251756570 |
| + | #define CURL_URL_MALFORMAT 251756578 |
| + | #define CURL_OBSOLETE4 251756586 |
| + | #define CURL_COULDNT_RESOLVE_PROXY 251756594 |
| + | #define CURL_COULDNT_RESOLVE_HOST 251756602 |
| + | #define CURL_COULDNT_CONNECT 251756610 |
| + | #define CURL_WEIRD_SERVER_REPLY 251756618 |
| #define CURL_FTP_WEIRD_SERVER_REPLY CURL_WEIRD_SERVER_REPLY | |
| - | #define CURL_FTP_ACCESS_DENIED 251756626 |
| - | #define CURL_OBSOLETE10 251756634 |
| - | #define CURL_FTP_WEIRD_PASS_REPLY 251756642 |
| - | #define CURL_OBSOLETE12 251756650 |
| - | #define CURL_FTP_WEIRD_PASV_REPLY 251756658 |
| - | #define CURL_FTP_WEIRD_227_FORMAT 251756666 |
| - | #define CURL_FTP_CANT_GET_HOST 251756674 |
| - | #define CURL_OBSOLETE16 251756682 |
| - | #define CURL_FTP_COULDNT_SET_TYPE 251756690 |
| - | #define CURL_PARTIAL_FILE 251756698 |
| - | #define CURL_FTP_COULDNT_RETR_FILE 251756706 |
| - | #define CURL_OBSOLETE20 251756714 |
| - | #define CURL_QUOTE_ERROR 251756722 |
| - | #define CURL_HTTP_RETURNED_ERROR 251756730 |
| - | #define CURL_WRITE_ERROR 251756738 |
| - | #define CURL_OBSOLETE24 251756746 |
| - | #define CURL_UPLOAD_FAILED 251756754 |
| - | #define CURL_READ_ERROR 251756762 |
| - | #define CURL_OUT_OF_MEMORY 251756770 |
| - | #define CURL_OPERATION_TIMEOUTED 251756778 |
| - | #define CURL_OBSOLETE29 251756786 |
| - | #define CURL_FTP_PORT_FAILED 251756794 |
| - | #define CURL_FTP_COULDNT_USE_REST 251756802 |
| - | #define CURL_OBSOLETE32 251756810 |
| - | #define CURL_RANGE_ERROR 251756818 |
| - | #define CURL_HTTP_POST_ERROR 251756826 |
| - | #define CURL_SSL_CONNECT_ERROR 251756834 |
| - | #define CURL_BAD_DOWNLOAD_RESUME 251756842 |
| + | #define CURL_FTP_ACCESS_DENIED 251756626 |
| + | #define CURL_OBSOLETE10 251756634 |
| + | #define CURL_FTP_WEIRD_PASS_REPLY 251756642 |
| + | #define CURL_OBSOLETE12 251756650 |
| + | #define CURL_FTP_WEIRD_PASV_REPLY 251756658 |
| + | #define CURL_FTP_WEIRD_227_FORMAT 251756666 |
| + | #define CURL_FTP_CANT_GET_HOST 251756674 |
| + | #define CURL_OBSOLETE16 251756682 |
| + | #define CURL_FTP_COULDNT_SET_TYPE 251756690 |
| + | #define CURL_PARTIAL_FILE 251756698 |
| + | #define CURL_FTP_COULDNT_RETR_FILE 251756706 |
| + | #define CURL_OBSOLETE20 251756714 |
| + | #define CURL_QUOTE_ERROR 251756722 |
| + | #define CURL_HTTP_RETURNED_ERROR 251756730 |
| + | #define CURL_WRITE_ERROR 251756738 |
| + | #define CURL_OBSOLETE24 251756746 |
| + | #define CURL_UPLOAD_FAILED 251756754 |
| + | #define CURL_READ_ERROR 251756762 |
| + | #define CURL_OUT_OF_MEMORY 251756770 |
| + | #define CURL_OPERATION_TIMEOUTED 251756778 |
| + | #define CURL_OBSOLETE29 251756786 |
| + | #define CURL_FTP_PORT_FAILED 251756794 |
| + | #define CURL_FTP_COULDNT_USE_REST 251756802 |
| + | #define CURL_OBSOLETE32 251756810 |
| + | #define CURL_RANGE_ERROR 251756818 |
| + | #define CURL_HTTP_POST_ERROR 251756826 |
| + | #define CURL_SSL_CONNECT_ERROR 251756834 |
| + | #define CURL_BAD_DOWNLOAD_RESUME 251756842 |
| #define CURL_FILE_COULDNT_READ_FILE 251756850 | |
| - | #define CURL_LDAP_CANNOT_BIND 251756858 |
| - | #define CURL_LDAP_SEARCH_FAILED 251756866 |
| - | #define CURL_OBSOLETE40 251756874 |
| - | #define CURL_FUNCTION_NOT_FOUND 251756882 |
| - | #define CURL_ABORTED_BY_CALLBACK 251756890 |
| - | #define CURL_BAD_FUNCTION_ARGUMENT 251756898 |
| - | #define CURL_OBSOLETE44 251756906 |
| - | #define CURL_INTERFACE_FAILED 251756914 |
| - | #define CURL_OBSOLETE46 251756922 |
| - | #define CURL_TOO_MANY_REDIRECTS 251756930 |
| - | #define CURL_UNKNOWN_TELNET_OPTION 251756938 |
| - | #define CURL_TELNET_OPTION_SYNTAX 251756946 |
| - | #define CURL_OBSOLETE50 251756954 |
| - | #define CURL_PEER_FAILED_VERIF 251756962 |
| - | #define CURL_GOT_NOTHING 251756970 |
| - | #define CURL_SSL_ENGINE_NOTFOUND 251756978 |
| - | #define CURL_SSL_ENGINE_SETFAILED 251756986 |
| - | #define CURL_SEND_ERROR 251756994 |
| - | #define CURL_RECV_ERROR 251757002 |
| - | #define CURL_OBSOLETE57 251757010 |
| - | #define CURL_SSL_CERTPROBLEM 251757018 |
| - | #define CURL_SSL_CIPHER 251757026 |
| - | #define CURL_SSL_CACERT 251757034 |
| - | #define CURL_BAD_CONTENT_ENCODING 251757042 |
| - | #define CURL_LDAP_INVALID_URL 251757050 |
| - | #define CURL_FILESIZE_EXCEEDED 251757058 |
| - | #define CURL_USE_SSL_FAILED 251757066 |
| - | #define CURL_SEND_FAIL_REWIND 251757074 |
| - | #define CURL_SSL_ENGINE_INITFAILED 251757082 |
| - | #define CURL_LOGIN_DENIED 251757090 |
| - | #define CURL_TFTP_NOTFOUND 251757098 |
| - | #define CURL_TFTP_PERM 251757106 |
| - | #define CURL_REMOTE_DISK_FULL 251757114 |
| - | #define CURL_TFTP_ILLEGAL 251757122 |
| - | #define CURL_TFTP_UNKNOWNID 251757130 |
| - | #define CURL_REMOTE_FILE_EXISTS 251757138 |
| - | #define CURL_TFTP_NOSUCHUSER 251757146 |
| - | #define CURL_CONV_FAILED 251757154 |
| - | #define CURL_CONV_REQD 251757162 |
| - | #define CURL_SSL_CACERT_BADFILE 251757170 |
| - | #define CURL_REMOTE_FILE_NOT_FOUND 251757178 |
| - | #define CURL_SSH 251757186 |
| - | #define CURL_SSL_SHUTDOWN_FAILED 251757194 |
| - | #define CURL_AGAIN 251757202 |
| - | #define CURL_SSL_CRL_BADFILE 251757210 |
| - | #define CURL_SSL_ISSUER_ERROR 251757218 |
| - | #define CURL_CURL_LAST 251757226 |
| + | #define CURL_LDAP_CANNOT_BIND 251756858 |
| + | #define CURL_LDAP_SEARCH_FAILED 251756866 |
| + | #define CURL_OBSOLETE40 251756874 |
| + | #define CURL_FUNCTION_NOT_FOUND 251756882 |
| + | #define CURL_ABORTED_BY_CALLBACK 251756890 |
| + | #define CURL_BAD_FUNCTION_ARGUMENT 251756898 |
| + | #define CURL_OBSOLETE44 251756906 |
| + | #define CURL_INTERFACE_FAILED 251756914 |
| + | #define CURL_OBSOLETE46 251756922 |
| + | #define CURL_TOO_MANY_REDIRECTS 251756930 |
| + | #define CURL_UNKNOWN_TELNET_OPTION 251756938 |
| + | #define CURL_TELNET_OPTION_SYNTAX 251756946 |
| + | #define CURL_OBSOLETE50 251756954 |
| + | #define CURL_PEER_FAILED_VERIF 251756962 |
| + | #define CURL_GOT_NOTHING 251756970 |
| + | #define CURL_SSL_ENGINE_NOTFOUND 251756978 |
| + | #define CURL_SSL_ENGINE_SETFAILED 251756986 |
| + | #define CURL_SEND_ERROR 251756994 |
| + | #define CURL_RECV_ERROR 251757002 |
| + | #define CURL_OBSOLETE57 251757010 |
| + | #define CURL_SSL_CERTPROBLEM 251757018 |
| + | #define CURL_SSL_CIPHER 251757026 |
| + | #define CURL_SSL_CACERT 251757034 |
| + | #define CURL_BAD_CONTENT_ENCODING 251757042 |
| + | #define CURL_LDAP_INVALID_URL 251757050 |
| + | #define CURL_FILESIZE_EXCEEDED 251757058 |
| + | #define CURL_USE_SSL_FAILED 251757066 |
| + | #define CURL_SEND_FAIL_REWIND 251757074 |
| + | #define CURL_SSL_ENGINE_INITFAILED 251757082 |
| + | #define CURL_LOGIN_DENIED 251757090 |
| + | #define CURL_TFTP_NOTFOUND 251757098 |
| + | #define CURL_TFTP_PERM 251757106 |
| + | #define CURL_REMOTE_DISK_FULL 251757114 |
| + | #define CURL_TFTP_ILLEGAL 251757122 |
| + | #define CURL_TFTP_UNKNOWNID 251757130 |
| + | #define CURL_REMOTE_FILE_EXISTS 251757138 |
| + | #define CURL_TFTP_NOSUCHUSER 251757146 |
| + | #define CURL_CONV_FAILED 251757154 |
| + | #define CURL_CONV_REQD 251757162 |
| + | #define CURL_SSL_CACERT_BADFILE 251757170 |
| + | #define CURL_REMOTE_FILE_NOT_FOUND 251757178 |
| + | #define CURL_SSH 251757186 |
| + | #define CURL_SSL_SHUTDOWN_FAILED 251757194 |
| + | #define CURL_AGAIN 251757202 |
| + | #define CURL_SSL_CRL_BADFILE 251757210 |
| + | #define CURL_SSL_ISSUER_ERROR 251757218 |
| + | #define CURL_CURL_LAST 251757226 |
| #pragma __member_alignment __restore | |
| @@ -35,15 +35,14 @@ | |
| #include <stsdef.h> | |
| #include <errno.h> | |
| - | unsigned long LIB$SET_SYMBOL( |
| - | const struct dsc$descriptor_s * symbol, |
| - | const struct dsc$descriptor_s * value, |
| - | const unsigned long *table_type); |
| + | unsigned long LIB$SET_SYMBOL(const struct dsc$descriptor_s *symbol, |
| + | const struct dsc$descriptor_s *value, |
| + | const unsigned long *table_type); |
| int main(int argc, char **argv) | |
| { | |
| void *libptr; | |
| - | const char * (*ssl_version)(int t); |
| + | const char *(*ssl_version)(int t); |
| const char *version; | |
| if(argc < 1) { | |
| @@ -53,11 +52,11 @@ int main(int argc, char **argv) | |
| libptr = dlopen(argv[1], 0); | |
| - | ssl_version = (const char * (*)(int))dlsym(libptr, "SSLeay_version"); |
| + | ssl_version = (const char *(*)(int))dlsym(libptr, "SSLeay_version"); |
| if(!ssl_version) { | |
| - | ssl_version = (const char * (*)(int))dlsym(libptr, "ssleay_version"); |
| + | ssl_version = (const char *(*)(int))dlsym(libptr, "ssleay_version"); |
| if(!ssl_version) { | |
| - | ssl_version = (const char * (*)(int))dlsym(libptr, "SSLEAY_VERSION"); |
| + | ssl_version = (const char *(*)(int))dlsym(libptr, "SSLEAY_VERSION"); |
| } | |
| } | |
| @@ -54,7 +54,6 @@ while(1) { | |
| } | |
| } | |
| - | |
| use POSIX qw(strftime); | |
| my @ts; | |
| if(defined($ENV{SOURCE_DATE_EPOCH})) { | |
| @@ -1205,7 +1205,6 @@ sub scanfile { | |
| } | |
| - | |
| if($errors || $warnings || $verbose) { | |
| printf "checksrc: %d errors and %d warnings\n", $errors, $warnings; | |
| if($suppressed) { | |
| @@ -108,7 +108,6 @@ my %defaulton = ( | |
| ); | |
| - | |
| sub configureopts { | |
| my ($opts)=@_; | |
| my %thisin; | |
| @@ -189,7 +188,6 @@ for my $w (sort keys %avail) { | |
| } | |
| } | |
| - | |
| print "ENABLED configure options that are not available\n"; | |
| for my $w (sort keys %with) { | |
| if(!$avail{$w}) { | |
| @@ -95,7 +95,7 @@ my $deletes=`git diff-tree --diff-filter=A -r --summary origin/$branch $start 2> | |
| my $creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start 2>/dev/null | wc -l`; | |
| # Time since that tag | |
| - | my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut "-d|" -f2`; # Unix timestamp |
| + | my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # Unix timestamp |
| my $taggednice=`git for-each-ref --format="%(refname:short) | %(creatordate)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # human readable time | |
| chomp $taggednice; | |
| my $now=POSIX::strftime("%s", localtime()); | |
| @@ -54,7 +54,6 @@ cat > "$out" <<EOF | |
| ## | |
| EOF | |
| - | |
| certutil -L -h 'Builtin Object Token' -d "$db" | \ | |
| grep ' *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$' | \ | |
| sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \ | |
| @@ -85,7 +85,6 @@ sub manpageify { | |
| return "--$k$trail"; | |
| } | |
| - | |
| my $colwidth=79; # max number of columns | |
| sub prefixline { | |
| @@ -500,7 +499,6 @@ sub render { | |
| # convert single backslash to double-backslash | |
| $d =~ s/\\/\\\\/g if($manpage); | |
| - | |
| if($manpage) { | |
| if(!$quote && $d =~ /--/) { | |
| $d =~ s/--([a-z0-9.-]+)/manpageify($1, 1)/ge; | |
| @@ -1047,7 +1045,6 @@ sub header { | |
| printdesc($manpage, 0, @d); | |
| } | |
| - | |
| sub sourcecategories { | |
| my ($dir) = @_; | |
| my %cats; | |
| @@ -255,7 +255,6 @@ sub sha256 { | |
| return $result; | |
| } | |
| - | |
| sub oldhash { | |
| my $hash = ""; | |
| open(C, "<$_[0]") || return 0; | |
| @@ -35,45 +35,45 @@ struct detail { | |
| }; | |
| static const struct detail scheme[] = { | |
| - | {"dict", "#ifndef CURL_DISABLE_DICT" }, |
| - | {"file", "#ifndef CURL_DISABLE_FILE" }, |
| - | {"ftp", "#ifndef CURL_DISABLE_FTP" }, |
| - | {"ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" }, |
| - | {"gopher", "#ifndef CURL_DISABLE_GOPHER" }, |
| - | {"gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" }, |
| - | {"http", "#ifndef CURL_DISABLE_HTTP" }, |
| - | {"https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" }, |
| - | {"imap", "#ifndef CURL_DISABLE_IMAP" }, |
| - | {"imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" }, |
| - | {"ldap", "#ifndef CURL_DISABLE_LDAP" }, |
| - | {"ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n" |
| - | " !defined(CURL_DISABLE_LDAPS) && \\\n" |
| - | " ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n" |
| - | " (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" }, |
| - | {"mqtt", "#ifndef CURL_DISABLE_MQTT" }, |
| - | {"pop3", "#ifndef CURL_DISABLE_POP3" }, |
| - | {"pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" }, |
| - | {"rtmp", "#ifdef USE_LIBRTMP" }, |
| - | {"rtmpt", "#ifdef USE_LIBRTMP" }, |
| - | {"rtmpe", "#ifdef USE_LIBRTMP" }, |
| - | {"rtmpte", "#ifdef USE_LIBRTMP" }, |
| - | {"rtmps", "#ifdef USE_LIBRTMP" }, |
| - | {"rtmpts", "#ifdef USE_LIBRTMP" }, |
| - | {"rtsp", "#ifndef CURL_DISABLE_RTSP" }, |
| - | {"scp", "#ifdef USE_SSH" }, |
| - | {"sftp", "#ifdef USE_SSH" }, |
| - | {"smb", "#if !defined(CURL_DISABLE_SMB) && \\\n" |
| - | " defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" }, |
| - | {"smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n" |
| - | " defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" }, |
| - | {"smtp", "#ifndef CURL_DISABLE_SMTP" }, |
| - | {"smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" }, |
| - | {"telnet", "#ifndef CURL_DISABLE_TELNET" }, |
| - | {"tftp", "#ifndef CURL_DISABLE_TFTP" }, |
| - | {"ws", |
| - | "#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" }, |
| - | {"wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n" |
| - | " defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" }, |
| + | { "dict", "#ifndef CURL_DISABLE_DICT" }, |
| + | { "file", "#ifndef CURL_DISABLE_FILE" }, |
| + | { "ftp", "#ifndef CURL_DISABLE_FTP" }, |
| + | { "ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" }, |
| + | { "gopher", "#ifndef CURL_DISABLE_GOPHER" }, |
| + | { "gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" }, |
| + | { "http", "#ifndef CURL_DISABLE_HTTP" }, |
| + | { "https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" }, |
| + | { "imap", "#ifndef CURL_DISABLE_IMAP" }, |
| + | { "imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" }, |
| + | { "ldap", "#ifndef CURL_DISABLE_LDAP" }, |
| + | { "ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n" |
| + | " !defined(CURL_DISABLE_LDAPS) && \\\n" |
| + | " ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n" |
| + | " (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" }, |
| + | { "mqtt", "#ifndef CURL_DISABLE_MQTT" }, |
| + | { "pop3", "#ifndef CURL_DISABLE_POP3" }, |
| + | { "pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" }, |
| + | { "rtmp", "#ifdef USE_LIBRTMP" }, |
| + | { "rtmpt", "#ifdef USE_LIBRTMP" }, |
| + | { "rtmpe", "#ifdef USE_LIBRTMP" }, |
| + | { "rtmpte", "#ifdef USE_LIBRTMP" }, |
| + | { "rtmps", "#ifdef USE_LIBRTMP" }, |
| + | { "rtmpts", "#ifdef USE_LIBRTMP" }, |
| + | { "rtsp", "#ifndef CURL_DISABLE_RTSP" }, |
| + | { "scp", "#ifdef USE_SSH" }, |
| + | { "sftp", "#ifdef USE_SSH" }, |
| + | { "smb", "#if !defined(CURL_DISABLE_SMB) && \\\n" |
| + | " defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" }, |
| + | { "smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n" |
| + | " defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" }, |
| + | { "smtp", "#ifndef CURL_DISABLE_SMTP" }, |
| + | { "smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" }, |
| + | { "telnet", "#ifndef CURL_DISABLE_TELNET" }, |
| + | { "tftp", "#ifndef CURL_DISABLE_TFTP" }, |
| + | { "ws", |
| + | "#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" }, |
| + | { "wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n" |
| + | " defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" }, |
| { NULL, NULL } | |
| }; | |
| @@ -108,7 +108,8 @@ static void showtable(int try, int init, int shift) | |
| " s++;\n" | |
| " l--;\n" | |
| " }\n" | |
| - | "*/\n", init, shift); |
| + | "*/\n", |
| + | init, shift); |
| printf(" static const struct Curl_handler * const protocols[%d] = {", try); | |
| @@ -158,10 +159,10 @@ int main(void) | |
| for(j = 0; j < i; j++) { | |
| if(num[j] == v) { | |
| - | /* |
| + | #if 0 |
| printf("NOPE: %u is a dupe (%s and %s)\n", | |
| v, scheme[i], scheme[j]); | |
| - | */ |
| + | #endif |
| badcombo = 1; | |
| break; | |
| } | |
| @@ -273,7 +273,6 @@ ParameterError parseconfig(const char *filename, int max_recursive, | |
| return err; | |
| } | |
| - | |
| static bool get_line(FILE *input, struct dynbuf *buf, bool *error) | |
| { | |
| CURLcode result; | |
| @@ -38,7 +38,6 @@ BEGIN { | |
| ); | |
| } | |
| - | |
| my %APPVEYOR_TEST_NAMES; # JSON and shell-quoted test names by test number | |
| sub appveyor_check_environment { | |
| @@ -1,7 +1,6 @@ | |
| <HTML><BODY> | |
| <CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GnuTLS</a></H1></CENTER> | |
| - | |
| <p>Session ID: <i>003030000100000001000000000000000030330001000000B062410001000000</i></p> | |
| <h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5> | |
| <p>Connected as user 'jsmith'.</p> | |
| @@ -30,7 +30,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER#test | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <protocol crlf="headers"> | |
| @@ -31,7 +31,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <protocol crlf="headers"> | |
| @@ -31,7 +31,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment#fragment2 | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <protocol crlf="headers"> | |
| @@ -49,8 +49,6 @@ Content-Length: 6 | |
| hello | |
| </datacheck> | |
| - | |
| - | |
| </reply> | |
| # Client-side | |
| @@ -31,8 +31,6 @@ Set-Cookie: time=2 | |
| -foo- | |
| </data2> | |
| - | |
| - | |
| </reply> | |
| # | |
| @@ -6,7 +6,6 @@ FAILURE | |
| </keywords> | |
| </info> | |
| - | |
| # | |
| # Client-side | |
| <client> | |
| @@ -6,7 +6,6 @@ FAILURE | |
| </keywords> | |
| </info> | |
| - | |
| # | |
| # Client-side | |
| <client> | |
| @@ -23,7 +23,6 @@ Funny-head: yesyes | |
| </data> | |
| </reply> | |
| - | |
| # | |
| # Client-side | |
| <client> | |
| @@ -29,7 +29,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| # This does not send QUIT because of known bug: | |
| @@ -25,7 +25,6 @@ ensure that the order does not matter. --> | |
| --> | |
| - | |
| <!-- First request has NTLM auth, wrong password --> | |
| <data100 crlf="headers"> | |
| HTTP/1.1 401 Need Digest or NTLM auth | |
| @@ -6,7 +6,6 @@ FTP | |
| </keywords> | |
| </info> | |
| - | |
| # | |
| # Server-side | |
| <reply> | |
| @@ -17,7 +17,6 @@ connection-monitor | |
| auth_required | |
| </servercmd> | |
| - | |
| # this is returned first since we get no proxy-auth | |
| <connect crlf="headers"> | |
| HTTP/1.1 407 Authorization Required to proxy me my dear | |
| @@ -50,7 +50,6 @@ client CONNECT 2e 00044d51545404c2003c000c6375726c | |
| server CONNACK 2 20020005 | |
| </protocol> | |
| - | |
| # 8 is CURLE_WEIRD_SERVER_REPLY | |
| <errorcode> | |
| 8 | |
| @@ -34,7 +34,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count" | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <protocol crlf="yes"> | |
| @@ -5,7 +5,6 @@ curl_multi_remove_handle | |
| </keywords> | |
| </info> | |
| - | |
| # | |
| # Client-side | |
| <client> | |
| @@ -5,7 +5,6 @@ URL | |
| </keywords> | |
| </info> | |
| - | |
| # | |
| # Client-side | |
| <client> | |
| @@ -34,7 +34,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count" ftp://%HOSTIP:%FTPP | |
| </command> | |
| </client> | |
| - | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <protocol crlf="yes"> | |
| @@ -64,7 +64,6 @@ use testutil qw( | |
| ); | |
| use getpart; | |
| - | |
| ####################################################################### | |
| # logmsg is our general message logging subroutine. | |
| # This function is currently required to be here by servers.pm | |
| @@ -105,7 +104,6 @@ sub parseprotocols { | |
| push @protocols, 'none'; | |
| } | |
| - | |
| ####################################################################### | |
| # Initialize @protocols from the curl binary under test | |
| # | |
| @@ -117,7 +115,6 @@ sub init_protocols { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Initialize the test harness to run tests | |
| # | |
| @@ -37,7 +37,6 @@ BEGIN { | |
| ); | |
| } | |
| - | |
| my %file_chmod1 = ( | |
| 'name' => 'chmod1', | |
| 'content' => "This file should have permissions 444\n", | |
| @@ -103,8 +103,8 @@ sub getpartattr { | |
| if(!$inside && ($_ =~ /^ *\<$section/)) { | |
| $inside++; | |
| } | |
| - | if((1 ==$inside) && ( ($_ =~ /^ *\<$part ([^>]*)/) || |
| - | !(defined($part)) ) |
| + | if((1 == $inside) && (($_ =~ /^ *\<$part ([^>]*)/) || |
| + | !(defined($part))) |
| ) { | |
| $inside++; | |
| my $attr=$1; | |
| @@ -118,10 +118,10 @@ sub getpartattr { | |
| last; | |
| } | |
| # detect end of section when part was not found | |
| - | elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) { |
| + | elsif((1 == $inside) && ($_ =~ /^ *\<\/$section\>/)) { |
| last; | |
| } | |
| - | elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) { |
| + | elsif((2 == $inside) && ($_ =~ /^ *\<\/$part/)) { |
| $inside--; | |
| } | |
| } | |
| @@ -252,7 +252,6 @@ sub loadtest { | |
| return 0; | |
| } | |
| - | |
| # Return entire document as list of lines | |
| sub fulltest { | |
| return @xml; | |
| @@ -323,7 +322,6 @@ sub savetest { | |
| # Strip off all lines that match the specified pattern and return | |
| # the new array. | |
| # | |
| - | |
| sub striparray { | |
| my ($pattern, $arrayref) = @_; | |
| @@ -423,5 +421,4 @@ sub loadarray { | |
| return @array; | |
| } | |
| - | |
| 1; | |
| @@ -85,7 +85,6 @@ use pathhelp qw( | |
| use Cwd qw(getcwd); | |
| use File::Spec; | |
| - | |
| ####################################################################### | |
| # global configuration variables | |
| # | |
| @@ -21,12 +21,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "first.h" | |
| #include "testtrace.h" | |
| - | |
| #ifndef CURL_DISABLE_FTP | |
| struct test_cli_ftp_upload_data { | |
| @@ -85,8 +83,7 @@ static CURLcode test_cli_ftp_upload(const char *URL) | |
| curl_off_t uploadsize = -1; | |
| (void)URL; | |
| - | while((ch = cgetopt(test_argc, test_argv, "r:")) |
| - | != -1) { |
| + | while((ch = cgetopt(test_argc, test_argv, "r:")) != -1) { |
| switch(ch) { | |
| case 'r': | |
| resolve = coptarg; | |
| @@ -55,7 +55,6 @@ static CURLcode test_lib651(const char *URL) | |
| if(formrc) | |
| curl_mprintf("curl_formadd(1) = %d\n", formrc); | |
| - | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| @@ -74,7 +74,6 @@ my @not_built_in_num = ( | |
| 'CURLOPT_SOCKS5_AUTH', | |
| ); | |
| - | |
| # | |
| # Generate a set of string checks | |
| # | |
| @@ -626,7 +625,6 @@ MOO | |
| } | |
| } | |
| - | |
| print $fh <<FOOTER | |
| /* NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange) */ | |
| @@ -92,6 +92,7 @@ | |
| goto unit_test_abort; \ | |
| } while(0) | |
| + | /* begin/end macros */ |
| #define UNITTEST_BEGIN_SIMPLE \ | |
| (void)arg; \ | |
| @@ -43,12 +43,10 @@ log = logging.getLogger(__name__) | |
| HOST = "localhost" | |
| IDENT = "NTEL" | |
| - | |
| # The strings that indicate the test framework is checking our aliveness | |
| VERIFIED_REQ = "verifiedserver" | |
| VERIFIED_RSP = "WE ROOLZ: {pid}" | |
| - | |
| def telnetserver(options): | |
| """Start up a TCP server with a telnet handler and serve DICT requests forever.""" | |
| if options.pidfile: | |
| @@ -69,7 +67,6 @@ def telnetserver(options): | |
| # leaving `with` calls server.close() automatically | |
| return ScriptRC.SUCCESS | |
| - | |
| class NegotiatingTelnetHandler(socketserver.BaseRequestHandler): | |
| """Handler class for Telnet connections.""" | |
| @@ -113,7 +110,6 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler): | |
| except IOError: | |
| log.exception("IOError hit during request") | |
| - | |
| class Negotiator(object): | |
| NO_NEG = 0 | |
| START_NEG = 1 | |
| @@ -242,7 +238,6 @@ class Negotiator(object): | |
| log.debug("Sending WONT %s", option_str) | |
| self.send_iac([NegTokens.WONT, NegOptions.to_val(option_str)]) | |
| - | |
| class NegBase(object): | |
| @classmethod | |
| def to_val(cls, name): | |
| @@ -256,7 +251,6 @@ class NegBase(object): | |
| return "<unknown>" | |
| - | |
| class NegTokens(NegBase): | |
| # The start of a negotiation sequence | |
| IAC = 255 | |
| @@ -274,7 +268,6 @@ class NegTokens(NegBase): | |
| # The end of sub-negotiation options. | |
| SE = 240 | |
| - | |
| class NegOptions(NegBase): | |
| # Binary Transmission | |
| BINARY = 0 | |
| @@ -287,7 +280,6 @@ class NegOptions(NegBase): | |
| # Charset option | |
| CHARSET = 42 | |
| - | |
| def get_options(): | |
| parser = argparse.ArgumentParser() | |
| @@ -306,7 +298,6 @@ def get_options(): | |
| return parser.parse_args() | |
| - | |
| def setup_logging(options): | |
| """Set up logging from the command line options.""" | |
| root_logger = logging.getLogger() | |
| @@ -339,7 +330,6 @@ def setup_logging(options): | |
| stdout_handler.setLevel(logging.DEBUG) | |
| root_logger.addHandler(stdout_handler) | |
| - | |
| class ScriptRC(object): | |
| """Enum for script return codes.""" | |
| @@ -347,7 +337,6 @@ class ScriptRC(object): | |
| FAILURE = 1 | |
| EXCEPTION = 2 | |
| - | |
| if __name__ == '__main__': | |
| # Get the options from the user. | |
| options = get_options() | |
| @@ -67,7 +67,6 @@ BEGIN { | |
| ); | |
| } | |
| - | |
| ####################################################################### | |
| # Block for cached static variables | |
| # | |
| @@ -468,7 +468,6 @@ sub killallsockfilters { | |
| } | |
| } | |
| - | |
| sub set_advisor_read_lock { | |
| my ($filename) = @_; | |
| @@ -479,7 +478,6 @@ sub set_advisor_read_lock { | |
| printf "Error creating lock file $filename error: $!\n"; | |
| } | |
| - | |
| sub clear_advisor_read_lock { | |
| my ($filename) = @_; | |
| @@ -488,5 +486,4 @@ sub clear_advisor_read_lock { | |
| } | |
| } | |
| - | |
| 1; | |
| @@ -111,7 +111,6 @@ use testutil qw( | |
| use valgrind; | |
| use memanalyzer; | |
| - | |
| ####################################################################### | |
| # Global variables set elsewhere but used only by this package | |
| # These may only be set *before* runner_init is called | |
| @@ -384,7 +383,6 @@ sub prepro { | |
| return @out; | |
| } | |
| - | |
| ####################################################################### | |
| # Load test keywords into %keywords hash | |
| # | |
| @@ -399,7 +397,6 @@ sub readtestkeywords { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Return a list of log locks that still exist | |
| # | |
| @@ -585,7 +582,6 @@ sub torture { | |
| return 0; | |
| } | |
| - | |
| ####################################################################### | |
| # restore environment variables that were modified in test | |
| sub restore_test_env { | |
| @@ -603,7 +599,6 @@ sub restore_test_env { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Start the servers needed to run this test case | |
| sub singletest_startservers { | |
| @@ -639,7 +634,6 @@ sub singletest_startservers { | |
| return ($why, $error); | |
| } | |
| - | |
| ####################################################################### | |
| # Generate preprocessed test file | |
| sub singletest_preprocess { | |
| @@ -663,7 +657,6 @@ sub singletest_preprocess { | |
| loadtest("$LOGDIR/test${testnum}"); | |
| } | |
| - | |
| ####################################################################### | |
| # Set up the test environment to run this test case | |
| sub singletest_setenv { | |
| @@ -693,7 +686,6 @@ sub singletest_setenv { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Check that test environment is fine to run this test case | |
| sub singletest_precheck { | |
| @@ -731,7 +723,6 @@ sub singletest_precheck { | |
| return $why; | |
| } | |
| - | |
| ####################################################################### | |
| # Prepare the test environment to run this test case | |
| sub singletest_prepare { | |
| @@ -804,7 +795,6 @@ sub singletest_prepare { | |
| return 0; | |
| } | |
| - | |
| ####################################################################### | |
| # Run the test command | |
| sub singletest_run { | |
| @@ -1072,7 +1062,6 @@ sub singletest_run { | |
| return (0, $cmdres, $dumped_core, $CURLOUT, $tool, use_valgrind() && !$disablevalgrind); | |
| } | |
| - | |
| ####################################################################### | |
| # Clean up after test command | |
| sub singletest_clean { | |
| @@ -1181,7 +1170,6 @@ sub singletest_postcheck { | |
| return 0; | |
| } | |
| - | |
| ################################################################### | |
| # Get ready to run a single test case | |
| sub runner_test_preprocess { | |
| @@ -1239,7 +1227,6 @@ sub runner_test_preprocess { | |
| return ($why, $error, clearlogs(), \%testtimings); | |
| } | |
| - | |
| ################################################################### | |
| # Run a single test case with an environment that already been prepared | |
| # Returns 0=success, -1=skippable failure, -2=permanent error, | |
| @@ -1437,7 +1424,6 @@ sub runnerar_ready { | |
| return (undef, undef); | |
| } | |
| - | |
| ################################################################### | |
| # Cleanly abort and exit the runner | |
| # This uses print since there is no longer any controller to write logs. | |
| @@ -1537,5 +1523,4 @@ sub runner_shutdown { | |
| undef $runnerw; | |
| } | |
| - | |
| 1; | |
| @@ -220,6 +220,7 @@ sub logmsg_bufferfortest { | |
| $singletest_bufferedrunner = $runnerid; | |
| } | |
| } | |
| + | |
| ####################################################################### | |
| # Store a log message in a buffer for this test | |
| # The messages can then be displayed all at once at the end of the test | |
| @@ -325,7 +326,6 @@ if($ENV{"NGHTTPX"}) { | |
| chomp $nghttpx_h3; | |
| } | |
| - | |
| ####################################################################### | |
| # Get the list of tests that the tests/data/Makefile.am knows about! | |
| # | |
| @@ -344,7 +344,6 @@ sub get_disttests { | |
| close($dh); | |
| } | |
| - | |
| ####################################################################### | |
| # Remove all files in the specified directory | |
| # | |
| @@ -381,7 +380,6 @@ sub cleardir { | |
| return $done; | |
| } | |
| - | |
| ####################################################################### | |
| # Given two array references, this function will store them in two temporary | |
| # files, run 'diff' on them, store the result and return the diff output! | |
| @@ -424,7 +422,6 @@ sub showdiff { | |
| return @out; | |
| } | |
| - | |
| ####################################################################### | |
| # compare test results with the expected output, we might filter off | |
| # some pattern that is allowed to differ, output test results | |
| @@ -951,7 +948,6 @@ sub timestampskippedevents { | |
| } | |
| } | |
| - | |
| # Setup CI Test Run | |
| sub citest_starttestrun { | |
| if(azure_check_environment()) { | |
| @@ -961,7 +957,6 @@ sub citest_starttestrun { | |
| # Appveyor does not require anything here | |
| } | |
| - | |
| # Register the test case with the CI runner | |
| sub citest_starttest { | |
| my $testnum = $_[0]; | |
| @@ -979,7 +974,6 @@ sub citest_starttest { | |
| } | |
| } | |
| - | |
| # Submit the test case result with the CI runner | |
| sub citest_finishtest { | |
| my ($testnum, $error) = @_; | |
| @@ -1001,7 +995,6 @@ sub citest_finishtestrun { | |
| # Appveyor does not require anything here | |
| } | |
| - | |
| # add one set of test timings from the runner to global set | |
| sub updatetesttimings { | |
| my ($testnum, %testtimings)=@_; | |
| @@ -1026,7 +1019,6 @@ sub updatetesttimings { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Return the log directory for the given test runner | |
| sub getrunnernumlogdir { | |
| @@ -1050,7 +1042,6 @@ sub getrunnerlogdir { | |
| die "Internal error: runner ID $runnerid not found"; | |
| } | |
| - | |
| ####################################################################### | |
| # Verify that this test case should be run | |
| sub singletest_shouldrun { | |
| @@ -1195,7 +1186,6 @@ sub singletest_shouldrun { | |
| return ($why, $errorreturncode); | |
| } | |
| - | |
| ####################################################################### | |
| # Print the test name and count tests | |
| sub singletest_count { | |
| @@ -1903,7 +1893,6 @@ sub singletest_check { | |
| return 0; | |
| } | |
| - | |
| ####################################################################### | |
| # Report a successful test | |
| sub singletest_success { | |
| @@ -2105,7 +2094,6 @@ sub singletest { | |
| return ($cmdres, 0); | |
| } | |
| - | |
| ####################################################################### | |
| # Report a successful test | |
| singletest_success($testnum, $count, $total, ignoreresultcode($testnum)); | |
| @@ -2763,7 +2751,6 @@ if(!$listonly) { | |
| ####################################################################### | |
| # Fetch all disabled tests, if there are any | |
| # | |
| - | |
| sub disabledtests { | |
| my ($file) = @_; | |
| my @input; | |
| @@ -3129,8 +3116,8 @@ while() { | |
| $total++; # number of tests we have run | |
| $executed++; | |
| - | if($error>0) { |
| - | if($error==2) { |
| + | if($error > 0) { |
| + | if($error == 2) { |
| # ignored test failures | |
| $failedign .= "$testnum "; | |
| } | |
| @@ -3151,7 +3138,7 @@ while() { | |
| # display all files in $LOGDIR/ in a nice way | |
| displaylogs($ridready, $testnum); | |
| } | |
| - | if($error==2) { |
| + | if($error == 2) { |
| $ign++; # ignored test result counter | |
| } | |
| elsif(!$anyway) { | |
| @@ -3255,7 +3242,7 @@ if(%skipped && !$short) { | |
| my $r = $_; | |
| my $skip_count = $skipped{$r}; | |
| my $log_line = sprintf("TESTINFO: \"%s\" %d time%s (", $r, $skip_count, | |
| - | ($skip_count == 1) ? "" : "s"); |
| + | ($skip_count == 1) ? "" : "s"); |
| # now gather all test case numbers that had this reason for being | |
| # skipped | |
| @@ -90,7 +90,6 @@ sub logmsg { | |
| } | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return server characterization factors given a server id string. | |
| # | |
| @@ -118,7 +117,6 @@ sub serverfactors { | |
| return($proto, $ipvnum, $idnum); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return server name string formatted for presentation purposes | |
| # | |
| @@ -142,7 +140,6 @@ sub servername_str { | |
| return "${proto}${idnum}${ipver}"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return server name string formatted for identification purposes | |
| # | |
| @@ -151,7 +148,6 @@ sub servername_id { | |
| return lc(servername_str($proto, $ipver, $idnum)); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return server name string formatted for filename purposes | |
| # | |
| @@ -163,7 +159,6 @@ sub servername_canon { | |
| return $string; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for server pid file. | |
| # | |
| @@ -182,7 +177,6 @@ sub server_portfilename { | |
| return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for server log file. | |
| # | |
| @@ -193,7 +187,6 @@ sub server_logfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for server commands file. | |
| # | |
| @@ -203,7 +196,6 @@ sub server_cmdfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for server input file. | |
| # | |
| @@ -213,7 +205,6 @@ sub server_inputfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for server output file. | |
| # | |
| @@ -223,7 +214,6 @@ sub server_outputfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for a server executable | |
| # | |
| @@ -235,7 +225,6 @@ sub server_exe { | |
| return exerunner() . $SRVDIR . "servers" . exe_ext($ext) . " $name"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for a server executable as an argument list | |
| # | |
| @@ -251,7 +240,6 @@ sub server_exe_args { | |
| return @cmd; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for main or primary sockfilter pid file. | |
| # | |
| @@ -263,7 +251,6 @@ sub mainsockf_pidfilename { | |
| return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for main or primary sockfilter log file. | |
| # | |
| @@ -275,7 +262,6 @@ sub mainsockf_logfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for data or secondary sockfilter pid file. | |
| # | |
| @@ -287,7 +273,6 @@ sub datasockf_pidfilename { | |
| return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return filename for data or secondary sockfilter log file. | |
| # | |
| @@ -299,7 +284,6 @@ sub datasockf_logfilename { | |
| return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # End of library | |
| 1; | |
| @@ -117,7 +117,6 @@ use testutil qw( | |
| exerunner | |
| ); | |
| - | |
| my %serverpidfile; # all server pid filenames, identified by server id | |
| my %serverportfile;# all server port filenames, identified by server id | |
| my $sshdvernum; # for socks server, ssh daemon version number | |
| @@ -150,7 +149,6 @@ our $err_unexpected; # error instead of warning on server unexpectedly alive | |
| our $debugprotocol; # nonzero for verbose server logs | |
| our $stunnel; # path to stunnel command | |
| - | |
| ####################################################################### | |
| # Check for a command in the PATH of the test server. | |
| # | |
| @@ -266,7 +264,6 @@ sub init_serverpidfile_hash { | |
| } | |
| } | |
| - | |
| ####################################################################### | |
| # Check if a given child process has just died. Reaps it if so. | |
| # | |
| @@ -280,7 +277,6 @@ sub checkdied { | |
| return ($rc == $pid)?1:0; | |
| } | |
| - | |
| ############################################################################## | |
| # This function makes sure the right set of server is running for the | |
| # specified test case. This is a useful design when we run single tests as not | |
| @@ -331,7 +327,6 @@ sub serverfortest { | |
| return &startservers(@what); | |
| } | |
| - | |
| ####################################################################### | |
| # Start a new thread/process and run the given command line in there. | |
| # Return the pids (yes plural) of the new child process to the parent. | |
| @@ -410,7 +405,6 @@ sub startnew { | |
| return ($child, $pid2); | |
| } | |
| - | |
| ####################################################################### | |
| # Return the port to use for the given protocol. | |
| # | |
| @@ -419,7 +413,6 @@ sub protoport { | |
| return $PORT{$proto} || "[not running]"; | |
| } | |
| - | |
| ####################################################################### | |
| # Stop a test server along with pids which are not in the %run hash yet. | |
| # This also stops all servers which are relative to the given one. | |
| @@ -506,7 +499,6 @@ sub stopserver { | |
| return $result; | |
| } | |
| - | |
| ####################################################################### | |
| # Return flags to let curl use an external HTTP proxy | |
| # | |
| @@ -1072,7 +1064,6 @@ sub responsiveserver { | |
| return 0; | |
| } | |
| - | |
| ####################################################################### | |
| # start the http server | |
| # | |
| @@ -1167,7 +1158,6 @@ sub runhttpserver { | |
| return (0, $httppid, $pid2, $port); | |
| } | |
| - | |
| ####################################################################### | |
| # start the http2 server | |
| # | |
| @@ -1790,7 +1780,6 @@ sub runrtspserver { | |
| return (0, $rtsppid, $pid2, $port); | |
| } | |
| - | |
| ####################################################################### | |
| # Start the ssh (scp/sftp) server | |
| # | |
| @@ -2237,7 +2226,6 @@ sub runnegtelnetserver { | |
| return (0+!$ntelpid, $ntelpid, $pid2, $port); | |
| } | |
| - | |
| ####################################################################### | |
| # Single shot http and gopher server responsiveness test. This should only | |
| # be used to verify that a server present in %run hash is still functional | |
| @@ -3084,7 +3072,6 @@ sub stopservers { | |
| return $result; | |
| } | |
| - | |
| ####################################################################### | |
| # substitute the variable stuff into either a joined up file or | |
| # a command, in either case passed by reference | |
| @@ -54,7 +54,6 @@ TESTS_MAGIC = "TESTS_MAGIC" | |
| VERIFIED_REQ = "verifiedserver" | |
| VERIFIED_RSP = "WE ROOLZ: {pid}\n" | |
| - | |
| class ShutdownHandler(threading.Thread): | |
| """ | |
| Cleanly shut down the SMB server. | |
| @@ -98,7 +98,6 @@ our $hstpubsha256f = 'curl_host_rsa_key.pub_sha256'; # sha256 hash of host pu | |
| our $cliprvkeyf = 'curl_client_key'; # client private key file | |
| our $clipubkeyf = 'curl_client_key.pub'; # client public key file | |
| - | |
| #*************************************************************************** | |
| # Absolute paths where to look for sftp-server plugin, when not in PATH | |
| # | |
| @@ -124,7 +123,6 @@ our @sftppath = qw( | |
| /opt/ssh/libexec | |
| ); | |
| - | |
| #*************************************************************************** | |
| # Absolute paths where to look for httptlssrv (gnutls-serv), when not in PATH | |
| # | |
| @@ -148,7 +146,6 @@ our @httptlssrvpath = qw( | |
| /opt/gnutls/libexec | |
| ); | |
| - | |
| #*************************************************************************** | |
| # Create or overwrite the given file with lines from an array of strings | |
| # | |
| @@ -174,7 +171,6 @@ sub dump_array { | |
| return $error; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the given file | |
| # | |
| @@ -190,7 +186,6 @@ sub display_file { | |
| print "=== End of file $filename\n"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display first line of the given file | |
| # | |
| @@ -205,7 +200,6 @@ sub display_file_top { | |
| print "=== End of file $filename\n"; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the ssh daemon config file | |
| # | |
| @@ -213,7 +207,6 @@ sub display_sshdconfig { | |
| display_file($sshdconfig); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the ssh client config file | |
| # | |
| @@ -221,7 +214,6 @@ sub display_sshconfig { | |
| display_file($sshconfig); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the sftp client config file | |
| # | |
| @@ -229,7 +221,6 @@ sub display_sftpconfig { | |
| display_file($sftpconfig); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the ssh daemon log file | |
| # | |
| @@ -238,7 +229,6 @@ sub display_sshdlog { | |
| display_file($sshdlog); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the ssh client log file | |
| # | |
| @@ -247,7 +237,6 @@ sub display_sshlog { | |
| display_file($sshlog); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Display contents of the sftp client log file | |
| # | |
| @@ -256,7 +245,6 @@ sub display_sftplog { | |
| display_file($sftplog); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find a file somewhere in the given path | |
| # | |
| @@ -273,7 +261,6 @@ sub find_file { | |
| return ""; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find an executable file somewhere in the given path | |
| # | |
| @@ -292,7 +279,6 @@ sub find_exe_file { | |
| return ""; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find a file in environment path or in our sftppath | |
| # | |
| @@ -304,7 +290,6 @@ sub find_file_spath { | |
| return find_file($filename, @spath); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find an executable file in environment path or in our httptlssrvpath | |
| # | |
| @@ -316,7 +301,6 @@ sub find_exe_file_hpath { | |
| return find_exe_file($filename, @hpath); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find ssh daemon and return canonical filename | |
| # | |
| @@ -324,7 +308,6 @@ sub find_sshd { | |
| return find_file_spath($sshdexe); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find ssh client and return canonical filename | |
| # | |
| @@ -332,7 +315,6 @@ sub find_ssh { | |
| return find_file_spath($sshexe); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find sftp-server plugin and return canonical filename | |
| # | |
| @@ -340,7 +322,6 @@ sub find_sftpsrv { | |
| return find_file_spath($sftpsrvexe); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find sftp client and return canonical filename | |
| # | |
| @@ -348,7 +329,6 @@ sub find_sftp { | |
| return find_file_spath($sftpexe); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find ssh-keygen and return canonical filename | |
| # | |
| @@ -356,7 +336,6 @@ sub find_sshkeygen { | |
| return find_file_spath($sshkeygenexe); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find httptlssrv (gnutls-serv) and return canonical filename | |
| # | |
| @@ -376,7 +355,6 @@ sub find_httptlssrv { | |
| return ""; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Return version info for the given ssh client or server binaries | |
| # | |
| @@ -437,7 +415,6 @@ sub sshversioninfo { | |
| return ($sshid, $versnum, $versstr, $error); | |
| } | |
| - | |
| #*************************************************************************** | |
| # End of library | |
| 1; | |
| @@ -225,7 +225,6 @@ $logfile = "$logdir/sshserver.log"; # used by logmsg | |
| # | |
| my $loglevel = $debugprotocol?'DEBUG3':'DEBUG2'; | |
| - | |
| #*************************************************************************** | |
| # Validate username | |
| # | |
| @@ -240,7 +239,6 @@ if($error) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find out ssh daemon canonical filename | |
| # | |
| @@ -250,7 +248,6 @@ if(!$sshd) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find out ssh daemon version info | |
| # | |
| @@ -263,7 +260,6 @@ if(!$sshdid) { | |
| } | |
| logmsg "ssh server found $sshd is $sshdverstr\n" if($verbose); | |
| - | |
| #*************************************************************************** | |
| # ssh daemon command line options we might use and version support | |
| # | |
| @@ -281,7 +277,6 @@ logmsg "ssh server found $sshd is $sshdverstr\n" if($verbose); | |
| # -t: test config file : SunSSH 1.0.0 and later | |
| # -?: sshd version info : SunSSH 1.0.0 and later | |
| - | |
| #*************************************************************************** | |
| # Verify minimum ssh daemon version | |
| # | |
| @@ -291,7 +286,6 @@ if((($sshdid =~ /OpenSSH/) && ($sshdvernum < 299)) || | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find out sftp server plugin canonical filename | |
| # | |
| @@ -302,7 +296,6 @@ if(!$sftpsrv) { | |
| } | |
| logmsg "sftp server plugin found $sftpsrv\n" if($verbose); | |
| - | |
| #*************************************************************************** | |
| # Find out sftp client canonical filename | |
| # | |
| @@ -313,7 +306,6 @@ if(!$sftp) { | |
| } | |
| logmsg "sftp client found $sftp\n" if($verbose); | |
| - | |
| #*************************************************************************** | |
| # Find out ssh keygen canonical filename | |
| # | |
| @@ -324,7 +316,6 @@ if(!$sshkeygen) { | |
| } | |
| logmsg "ssh keygen found $sshkeygen\n" if($verbose); | |
| - | |
| #*************************************************************************** | |
| # Find out ssh client canonical filename | |
| # | |
| @@ -334,7 +325,6 @@ if(!$ssh) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Find out ssh client version info | |
| # | |
| @@ -347,7 +337,6 @@ if(!$sshid) { | |
| } | |
| logmsg "ssh client found $ssh is $sshverstr\n" if($verbose); | |
| - | |
| #*************************************************************************** | |
| # ssh client command line options we might use and version support | |
| # | |
| @@ -367,7 +356,6 @@ logmsg "ssh client found $ssh is $sshverstr\n" if($verbose); | |
| # -vv: increase verbosity : SunSSH 1.0.0 and later | |
| # -V: ssh version info : SunSSH 1.0.0 and later | |
| - | |
| #*************************************************************************** | |
| # Verify minimum ssh client version | |
| # | |
| @@ -377,7 +365,6 @@ if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) || | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # ssh keygen command line options we actually use and version support | |
| # | |
| @@ -473,7 +460,6 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) || | |
| } | |
| } | |
| - | |
| #*************************************************************************** | |
| # Convert paths for curl's tests running on Windows with Cygwin/MSYS OpenSSH | |
| # | |
| @@ -587,7 +573,6 @@ else { | |
| # [2] Option specific for portable versions | |
| # [3] Option not used in our ssh server config file | |
| - | |
| #*************************************************************************** | |
| # Initialize sshd config with options actually supported in OpenSSH 2.9.9 | |
| # | |
| @@ -662,7 +647,6 @@ if(!($sshdid =~ /OpenSSH/) || ($sshdvernum <= 730)) { | |
| push @cfgarr, 'X11Forwarding no'; | |
| push @cfgarr, '#'; | |
| - | |
| #*************************************************************************** | |
| # Write out initial sshd configuration file for curl's tests | |
| # | |
| @@ -672,7 +656,6 @@ if($error) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Verifies at run time if sshd supports a given configuration file option | |
| # | |
| @@ -702,7 +685,6 @@ sub sshd_supports_opt { | |
| return 0; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Kerberos Authentication support may have not been built into sshd | |
| # | |
| @@ -722,7 +704,6 @@ if(sshd_supports_opt('KerberosTicketCleanup','yes')) { | |
| push @cfgarr, 'KerberosTicketCleanup yes'; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Andrew File System support may have not been built into sshd | |
| # | |
| @@ -730,7 +711,6 @@ if(sshd_supports_opt('AFSTokenPassing','no')) { | |
| push @cfgarr, 'AFSTokenPassing no'; | |
| } | |
| - | |
| #*************************************************************************** | |
| # S/Key authentication support may have not been built into sshd | |
| # | |
| @@ -738,7 +718,6 @@ if(sshd_supports_opt('SkeyAuthentication','no')) { | |
| push @cfgarr, 'SkeyAuthentication no'; | |
| } | |
| - | |
| #*************************************************************************** | |
| # GSSAPI Authentication support may have not been built into sshd | |
| # | |
| @@ -764,7 +743,6 @@ if(sshd_supports_opt('GSSUseSessionCredCache','no')) { | |
| } | |
| push @cfgarr, '#'; | |
| - | |
| #*************************************************************************** | |
| # Options that might be supported or not in sshd OpenSSH 2.9.9 and later | |
| # | |
| @@ -824,7 +802,6 @@ if(sshd_supports_opt('X11UseLocalhost','yes')) { | |
| } | |
| push @cfgarr, '#'; | |
| - | |
| #*************************************************************************** | |
| # Write out resulting sshd configuration file for curl's tests | |
| # | |
| @@ -834,7 +811,6 @@ if($error) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Verify that sshd actually supports our generated configuration file | |
| # | |
| @@ -845,7 +821,6 @@ if(system "\"$sshd\" -t -f $sshdconfig_abs > $sshdlog 2>&1") { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Generate ssh client host key database file for curl's tests | |
| # | |
| @@ -878,7 +853,6 @@ if((! -e pp($knownhosts)) || (! -s pp($knownhosts))) { | |
| } | |
| } | |
| - | |
| #*************************************************************************** | |
| # Convert paths for curl's tests running on Windows using Cygwin OpenSSH | |
| # | |
| @@ -899,7 +873,6 @@ else { | |
| $knownhosts_config = abs_path(pp($knownhosts)); | |
| } | |
| - | |
| #*************************************************************************** | |
| # ssh client configuration file options we might use and version support | |
| # | |
| @@ -976,7 +949,6 @@ else { | |
| # [2] Option specific for portable versions | |
| # [3] Option not used in our ssh client config file | |
| - | |
| #*************************************************************************** | |
| # Initialize ssh config with options actually supported in OpenSSH 2.9.9 | |
| # | |
| @@ -1032,7 +1004,6 @@ push @cfgarr, 'StrictHostKeyChecking no'; | |
| push @cfgarr, 'UsePrivilegedPort no'; | |
| push @cfgarr, '#'; | |
| - | |
| #*************************************************************************** | |
| # Options supported in ssh client newer than OpenSSH 2.9.9 | |
| # | |
| @@ -1132,7 +1103,6 @@ if(($sshid =~ /OpenSSH/) && ($sshvernum >= 380)) { | |
| push @cfgarr, '#'; | |
| - | |
| #*************************************************************************** | |
| # Write out resulting ssh client configuration file for curl's tests | |
| # | |
| @@ -1142,7 +1112,6 @@ if($error) { | |
| exit 1; | |
| } | |
| - | |
| #*************************************************************************** | |
| # Initialize client sftp config with options actually supported. | |
| # | |
| @@ -1160,7 +1129,6 @@ for(my $i = scalar(@cfgarr) - 1; $i > 0; $i--) { | |
| } | |
| } | |
| - | |
| #*************************************************************************** | |
| # Write out resulting sftp client configuration file for curl's tests | |
| # | |
| @@ -1171,7 +1139,6 @@ if($error) { | |
| } | |
| @cfgarr = (); | |
| - | |
| #*************************************************************************** | |
| # Generate client sftp commands batch file for sftp server verification | |
| # | |
| @@ -1232,7 +1199,6 @@ elsif($verbose && ($rc >> 8)) { | |
| logmsg sprintf("\"$sshd\" exited with %d\n", $rc >> 8); | |
| } | |
| - | |
| #*************************************************************************** | |
| # Clean up once the server has stopped | |
| # | |
| @@ -134,7 +134,6 @@ sub scanman_md_dir { | |
| } | |
| } | |
| - | |
| scanallheaders(); | |
| scanman_md_dir("$root/docs/libcurl"); | |
| scanman_md_dir("$root/docs/libcurl/opts"); | |
| @@ -185,7 +185,6 @@ my %opts = ( | |
| '--wdebug' => 6, | |
| ); | |
| - | |
| ######################################################################### | |
| # parse the curl code that parses the command line arguments! | |
| open($r, "<", "$root/src/tool_getparam.c") || | |
| @@ -257,7 +256,6 @@ while(<$r>) { | |
| } | |
| close($r); | |
| - | |
| ######################################################################### | |
| # parse the curl code that outputs the curl -h list | |
| open($r, "<", "$root/src/tool_listhelp.c") || | |
| @@ -36,13 +36,10 @@ if(!$docsroot || ($docsroot eq "-g")) { | |
| exit; | |
| } | |
| - | |
| shift @ARGV; | |
| my @f = @ARGV; | |
| - | |
| my %manp; | |
| - | |
| my $errors = 0; | |
| sub manpresent { | |
| @@ -140,7 +140,6 @@ scan_cmake_config_h(); | |
| scan_sources(); | |
| scan_docs(); | |
| - | |
| my $error = 0; | |
| # Check the configure symbols for use in code | |
| for my $s (sort keys %disable) { | |
| @@ -134,7 +134,6 @@ sub scanheader { | |
| close H; | |
| } | |
| - | |
| opendir(my $dh, $incdir) || die "Cannot opendir $incdir: $!"; | |
| my @hfiles = grep { /\.h$/ } readdir($dh); | |
| closedir $dh; | |
| @@ -94,7 +94,6 @@ sub allsymbols { | |
| close($f); | |
| } | |
| - | |
| my %ref = ( | |
| 'curl.1' => 1 | |
| ); | |
| @@ -266,7 +265,6 @@ sub scanmanpage { | |
| $errors++; | |
| } | |
| - | |
| if($optpage && $SH && ($SH !~ /^(SYNOPSIS|EXAMPLE|NAME|SEE ALSO)/i) && | |
| ($_ =~ /(.*)(CURL(OPT_|MOPT_|INFO_|SHOPT_)[A-Z0-9_]*)/)) { | |
| # an option with its own man page, check that it is tagged | |
| @@ -51,7 +51,6 @@ my %hdr; # Public header files deprecations. | |
| my %funcman; # Function man pages deprecations. | |
| my %optman; # Option man pages deprecations. | |
| - | |
| # Scan header file for public function and enum values. Flag them with | |
| # the version they are deprecated in, if some. | |
| sub scan_header { | |
| @@ -238,10 +237,9 @@ sub scan_man_page { | |
| } | |
| } | |
| - | |
| # Read symbols-in-versions. | |
| open(my $fh, "<", "$root/docs/libcurl/symbols-in-versions") || | |
| - | die "$root/docs/libcurl/symbols-in-versions"; |
| + | die "$root/docs/libcurl/symbols-in-versions"; |
| while(<$fh>) { | |
| if($_ =~ /^((?:CURL|LIBCURL)\S+)\s+\S+\s*(\S*)\s*(\S*)$/) { | |
| if($3 eq "") { | |
| @@ -112,7 +112,6 @@ sub checkfile { | |
| close($fh); | |
| } | |
| - | |
| for my $f (@m) { | |
| checkfile($f); | |
| } | |
| @@ -78,7 +78,6 @@ sub scanmanpage { | |
| close(H); | |
| } | |
| - | |
| opendir(my $dh, $curlh) || die "Cannot opendir $curlh: $!"; | |
| my @hfiles = grep { /\.h$/ } readdir($dh); | |
| closedir $dh; | |
| @@ -308,7 +308,6 @@ if(!$confopts) { | |
| } | |
| } | |
| - | |
| if($fixed < 4) { | |
| $fixed=4; | |
| open(my $f, ">", "$setupfile") or die; | |
| @@ -64,7 +64,6 @@ use globalconfig qw( | |
| my $logfunc; # optional reference to function for logging | |
| my @logmessages; # array holding logged messages | |
| - | |
| ####################################################################### | |
| # Log an informational message | |
| # If a log callback function was set in setlogfunc, it is called. If not, | |
| @@ -98,7 +97,6 @@ sub clearlogs { | |
| return $loglines; | |
| } | |
| - | |
| ####################################################################### | |
| sub includefile { | |
| @@ -39,8 +39,8 @@ static CURLcode test_unit1397(const char *arg) | |
| }; | |
| static const struct testcase tests[] = { | |
| - | {".hello.com", "*.hello.com", FALSE }, |
| - | {"a.hello.com", "*.hello.com", TRUE }, |
| + | { ".hello.com", "*.hello.com", FALSE }, |
| + | { "a.hello.com", "*.hello.com", TRUE }, |
| { "", "", FALSE }, | |
| { "a", "", FALSE }, | |
| { "", "b", FALSE }, | |
| @@ -29,10 +29,8 @@ import re | |
| log = logging.getLogger(__name__) | |
| - | |
| REPLY_DATA = re.compile("<reply>[ \t\n\r]*<data[^<]*>(.*?)</data>", re.MULTILINE | re.DOTALL) | |
| - | |
| class ClosingFileHandler(logging.StreamHandler): | |
| def __init__(self, filename): | |
| super(ClosingFileHandler, self).__init__() | |
| @@ -82,7 +80,6 @@ class TestData(object): | |
| # Left-strip the data so we do not get a newline before our data. | |
| return m.group(1).lstrip() | |
| - | |
| if __name__ == '__main__': | |
| td = TestData("./data") | |
| data = td.get_test_data(1451) | |
| @@ -35,7 +35,6 @@ BEGIN { | |
| ); | |
| } | |
| - | |
| use File::Basename; | |
| sub valgrindparse { | |