← Commit list

09f01f28ec

Daniel Stenberg
Daniel Stenberg
2025-12-17
SUCCESS Duration: 202s

Subject

docs: rename CURLcode variables to 'result'

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/examples/10-at-a-time.c +3 -3docs/examples/address-scope.c +8 -8docs/examples/altsvc.c +8 -8docs/examples/anyauthput.c +8 -8docs/examples/block_ip.c +7 -7docs/examples/cacertinmem.c +8 -8docs/examples/certinfo.c +9 -9docs/examples/chkspeed.c +17 -17docs/examples/connect-to.c +5 -5docs/examples/cookie_interface.c +20 -20docs/examples/crawler.c +4 -4docs/examples/debug.c +8 -8docs/examples/default-scheme.c +9 -9docs/examples/ephiperfifo.c +6 -6docs/examples/evhiperfifo.c +8 -7docs/examples/externalsocket.c +7 -7docs/examples/fileupload.c +7 -7docs/examples/ftp-delete.c +8 -8docs/examples/ftp-wildcard.c +5 -5docs/examples/ftpget.c +8 -8docs/examples/ftpgetinfo.c +13 -13docs/examples/ftpgetresp.c +8 -8docs/examples/ftpsget.c +8 -8docs/examples/ftpupload.c +8 -8docs/examples/ftpuploadfrommem.c +9 -9docs/examples/ftpuploadresume.c +10 -10docs/examples/getinfo.c +8 -8docs/examples/getinmemory.c +8 -8docs/examples/getredirect.c +13 -13docs/examples/getreferrer.c +9 -9docs/examples/ghiper.c +5 -5docs/examples/headerapi.c +7 -7docs/examples/hiperfifo.c +6 -6docs/examples/hsts-preload.c +8 -8docs/examples/htmltidy.c +13 -13docs/examples/htmltitle.cpp +19 -19docs/examples/http-options.c +7 -7docs/examples/http-post.c +9 -9docs/examples/http2-download.c +4 -4docs/examples/http2-pushinmemory.c +3 -3docs/examples/http2-serverpush.c +4 -4docs/examples/http2-upload.c +4 -4docs/examples/http3-present.c +3 -3docs/examples/http3.c +7 -7docs/examples/httpcustomheader.c +7 -7docs/examples/httpput-postfields.c +8 -8docs/examples/httpput.c +8 -8docs/examples/https.c +8 -8docs/examples/imap-append.c +7 -7docs/examples/imap-authzid.c +7 -7docs/examples/imap-copy.c +7 -7docs/examples/imap-create.c +7 -7docs/examples/imap-delete.c +7 -7docs/examples/imap-examine.c +7 -7docs/examples/imap-fetch.c +7 -7docs/examples/imap-list.c +7 -7docs/examples/imap-lsub.c +7 -7docs/examples/imap-multi.c +3 -3docs/examples/imap-noop.c +7 -7docs/examples/imap-search.c +7 -7docs/examples/imap-ssl.c +7 -7docs/examples/imap-store.c +10 -10docs/examples/imap-tls.c +7 -7docs/examples/interface.c +5 -5docs/examples/ipv6.c +5 -5docs/examples/keepalive.c +5 -5docs/examples/localport.c +5 -5docs/examples/log_failed_transfers.c +5 -5docs/examples/maxconnects.c +7 -7docs/examples/multi-app.c +3 -3docs/examples/multi-debugcallback.c +3 -3docs/examples/multi-double.c +3 -3docs/examples/multi-event.c +4 -4docs/examples/multi-formadd.c +3 -3docs/examples/multi-legacy.c +3 -3docs/examples/multi-post.c +3 -3docs/examples/multi-single.c +5 -4docs/examples/multi-uv.c +4 -4docs/examples/netrc.c +5 -5docs/examples/persistent.c +12 -12docs/examples/pop3-authzid.c +7 -7docs/examples/pop3-dele.c +7 -7docs/examples/pop3-list.c +7 -7docs/examples/pop3-multi.c +4 -4docs/examples/pop3-noop.c +7 -7docs/examples/pop3-retr.c +7 -7docs/examples/pop3-ssl.c +7 -7docs/examples/pop3-stat.c +7 -7docs/examples/pop3-tls.c +7 -7docs/examples/pop3-top.c +7 -7docs/examples/pop3-uidl.c +7 -7docs/examples/post-callback.c +11 -11docs/examples/postinmemory.c +8 -8docs/examples/postit2-formadd.c +8 -8docs/examples/postit2.c +7 -7docs/examples/progressfunc.c +7 -7docs/examples/protofeats.c +3 -3docs/examples/range.c +5 -5docs/examples/resolve.c +5 -5docs/examples/rtsp-options.c +7 -7docs/examples/sendrecv.c +19 -19docs/examples/sepheaders.c +5 -5docs/examples/sessioninfo.c +8 -8docs/examples/sftpget.c +7 -7docs/examples/sftpuploadresume.c +12 -12docs/examples/shared-connection-cache.c +8 -8docs/examples/simple.c +7 -7docs/examples/simplepost.c +8 -8docs/examples/simplessl.c +9 -9docs/examples/smooth-gtk-thread.c +3 -3docs/examples/smtp-authzid.c +7 -7docs/examples/smtp-expn.c +6 -6docs/examples/smtp-mail.c +7 -7docs/examples/smtp-mime.c +7 -7docs/examples/smtp-multi.c +3 -3docs/examples/smtp-ssl.c +7 -7docs/examples/smtp-tls.c +7 -7docs/examples/smtp-vrfy.c +7 -7docs/examples/synctime.c +7 -7docs/examples/threaded.c +4 -4docs/examples/unixsocket.c +8 -8docs/examples/url2file.c +6 -6docs/examples/urlapi.c +7 -7docs/examples/usercertinmem.c +8 -8docs/examples/websocket-cb.c +8 -8docs/examples/websocket-updown.c +15 -14docs/examples/websocket.c +28 -28docs/examples/xmlstream.c +8 -8docs/libcurl/curl_easy_cleanup.md +4 -4docs/libcurl/curl_easy_duphandle.md +2 -2docs/libcurl/curl_easy_getinfo.md +5 -5docs/libcurl/curl_easy_init.md +2 -2docs/libcurl/curl_easy_perform.md +2 -2docs/libcurl/curl_easy_recv.md +5 -5docs/libcurl/curl_easy_send.md +5 -5docs/libcurl/curl_easy_setopt.md +2 -2docs/libcurl/curl_easy_ssls_export.md +2 -2docs/libcurl/curl_easy_ssls_import.md +2 -2docs/libcurl/curl_easy_strerror.md +4 -4docs/libcurl/curl_ws_recv.md +13 -11docs/libcurl/curl_ws_send.md +9 -8docs/libcurl/curl_ws_start_frame.md +5 -5docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md +6 -6docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md +5 -5docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_CERTINFO.md +5 -5docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md +5 -5docs/libcurl/opts/CURLINFO_CONNECT_TIME.md +5 -5docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_CONN_ID.md +5 -5docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md +5 -5docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md +6 -5docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md +5 -5docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md +5 -5docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md +5 -5docs/libcurl/opts/CURLINFO_COOKIELIST.md +5 -5docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md +5 -5docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md +3 -3docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md +3 -3docs/libcurl/opts/CURLINFO_FILETIME.md +5 -5docs/libcurl/opts/CURLINFO_FILETIME_T.md +5 -5docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md +5 -5docs/libcurl/opts/CURLINFO_HEADER_SIZE.md +5 -5docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md +5 -5docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md +5 -5docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md +5 -5docs/libcurl/opts/CURLINFO_HTTP_VERSION.md +3 -3docs/libcurl/opts/CURLINFO_LASTSOCKET.md +6 -6docs/libcurl/opts/CURLINFO_LOCAL_IP.md +3 -3docs/libcurl/opts/CURLINFO_LOCAL_PORT.md +5 -5docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md +5 -5docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md +6 -5docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md +5 -5docs/libcurl/opts/CURLINFO_OS_ERRNO.md +5 -5docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md +6 -5docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md +6 -5docs/libcurl/opts/CURLINFO_PRIMARY_IP.md +3 -3docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md +5 -5docs/libcurl/opts/CURLINFO_PRIVATE.md +5 -5docs/libcurl/opts/CURLINFO_PROTOCOL.md +3 -3docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md +5 -5docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md +5 -5docs/libcurl/opts/CURLINFO_PROXY_ERROR.md +5 -5docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md +7 -7docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md +3 -3docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md +5 -5docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_REDIRECT_URL.md +3 -3docs/libcurl/opts/CURLINFO_REFERER.md +3 -3docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md +5 -5docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md +3 -3docs/libcurl/opts/CURLINFO_RETRY_AFTER.md +3 -3docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md +3 -3docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md +3 -3docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md +3 -3docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md +3 -3docs/libcurl/opts/CURLINFO_SCHEME.md +3 -3docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md +5 -5docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md +5 -5docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md +5 -5docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md +5 -5docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md +5 -5docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md +5 -5docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md +5 -5docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md +5 -5docs/libcurl/opts/CURLINFO_SSL_ENGINES.md +3 -3docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md +7 -7docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md +5 -5docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_TLS_SESSION.md +4 -4docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md +5 -5docs/libcurl/opts/CURLINFO_TOTAL_TIME.md +5 -5docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md +5 -5docs/libcurl/opts/CURLINFO_USED_PROXY.md +5 -5docs/libcurl/opts/CURLINFO_XFER_ID.md +5 -5docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md +2 -2docs/libcurl/opts/CURLOPT_AUTOREFERER.md +2 -2docs/libcurl/opts/CURLOPT_BUFFERSIZE.md +2 -2docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_CAPATH.md +2 -2docs/libcurl/opts/CURLOPT_CERTINFO.md +5 -5docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md +3 -3docs/libcurl/opts/CURLOPT_COOKIEFILE.md +2 -2docs/libcurl/opts/CURLOPT_COOKIEJAR.md +2 -2docs/libcurl/opts/CURLOPT_COOKIESESSION.md +2 -2docs/libcurl/opts/CURLOPT_CRLF.md +2 -2docs/libcurl/opts/CURLOPT_CRLFILE.md +2 -2docs/libcurl/opts/CURLOPT_CURLU.md +2 -2docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md +2 -2docs/libcurl/opts/CURLOPT_DEBUGDATA.md +2 -2docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md +4 -4docs/libcurl/opts/CURLOPT_DIRLISTONLY.md +2 -2docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md +3 -3docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md +2 -2docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md +2 -2docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md +2 -2docs/libcurl/opts/CURLOPT_DNS_SERVERS.md +2 -2docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md +2 -2docs/libcurl/opts/CURLOPT_ERRORBUFFER.md +5 -5docs/libcurl/opts/CURLOPT_FAILONERROR.md +3 -3docs/libcurl/opts/CURLOPT_FILETIME.md +5 -5docs/libcurl/opts/CURLOPT_FTPPORT.md +2 -2docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md +2 -2docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md +2 -2docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md +2 -2docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md +2 -2docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md +2 -2docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md +2 -2docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md +2 -2docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md +2 -2docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md +2 -2docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md +2 -2docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md +2 -2docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md +2 -2docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md +2 -2docs/libcurl/opts/CURLOPT_HEADEROPT.md +2 -2docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md +2 -2docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md +2 -2docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md +2 -2docs/libcurl/opts/CURLOPT_HTTPAUTH.md +2 -2docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md +2 -2docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md +2 -2docs/libcurl/opts/CURLOPT_HTTP_VERSION.md +3 -3docs/libcurl/opts/CURLOPT_INTERFACE.md +2 -2docs/libcurl/opts/CURLOPT_IPRESOLVE.md +2 -2docs/libcurl/opts/CURLOPT_ISSUERCERT.md +2 -2docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md +2 -2docs/libcurl/opts/CURLOPT_KEYPASSWD.md +2 -2docs/libcurl/opts/CURLOPT_KRBLEVEL.md +2 -2docs/libcurl/opts/CURLOPT_LOCALPORT.md +2 -2docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md +2 -2docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md +2 -2docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md +3 -3docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md +3 -3docs/libcurl/opts/CURLOPT_MAIL_AUTH.md +2 -2docs/libcurl/opts/CURLOPT_MAIL_FROM.md +2 -2docs/libcurl/opts/CURLOPT_MAIL_RCPT.md +2 -2docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md +2 -2docs/libcurl/opts/CURLOPT_MAXCONNECTS.md +2 -2docs/libcurl/opts/CURLOPT_MAXFILESIZE.md +2 -2docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md +2 -2docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md +2 -2docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md +2 -2docs/libcurl/opts/CURLOPT_NETRC.md +2 -2docs/libcurl/opts/CURLOPT_NETRC_FILE.md +2 -2docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md +2 -2docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md +2 -2docs/libcurl/opts/CURLOPT_NOSIGNAL.md +2 -2docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md +2 -2docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md +2 -2docs/libcurl/opts/CURLOPT_PASSWORD.md +2 -2docs/libcurl/opts/CURLOPT_PORT.md +2 -2docs/libcurl/opts/CURLOPT_POST.md +2 -2docs/libcurl/opts/CURLOPT_POSTQUOTE.md +2 -2docs/libcurl/opts/CURLOPT_PREQUOTE.md +2 -2docs/libcurl/opts/CURLOPT_PROXYAUTH.md +2 -2docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md +2 -2docs/libcurl/opts/CURLOPT_PROXYPORT.md +2 -2docs/libcurl/opts/CURLOPT_PROXYTYPE.md +2 -2docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md +2 -2docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md +2 -2docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md +2 -2docs/libcurl/opts/CURLOPT_QUICK_EXIT.md +2 -2docs/libcurl/opts/CURLOPT_QUOTE.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md +2 -2docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md +2 -2docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md +2 -2docs/libcurl/opts/CURLOPT_SASL_IR.md +2 -2docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md +2 -2docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md +2 -2docs/libcurl/opts/CURLOPT_SERVICE_NAME.md +2 -2docs/libcurl/opts/CURLOPT_SHARE.md +3 -3docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md +2 -2docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md +2 -2docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md +2 -2docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md +2 -2docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md +2 -2docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md +2 -2docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md +2 -2docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md +2 -2docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md +2 -2docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md +2 -2docs/libcurl/opts/CURLOPT_SSLCERT.md +2 -2docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md +2 -2docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_SSLENGINE.md +2 -2docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md +2 -2docs/libcurl/opts/CURLOPT_SSLKEY.md +2 -2docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md +2 -2docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md +2 -2docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md +2 -2docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md +4 -4docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md +4 -4docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md +2 -2docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md +2 -2docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md +2 -2docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md +2 -2docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md +2 -2docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md +2 -2docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md +2 -2docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md +2 -2docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md +2 -2docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md +2 -2docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md +2 -2docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md +2 -2docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md +2 -2docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md +3 -3docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md +2 -2docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md +2 -2docs/libcurl/opts/CURLOPT_USERNAME.md +2 -2docs/libcurl/opts/CURLOPT_USERPWD.md +2 -2docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md +2 -2docs/libcurl/opts/CURLOPT_WS_OPTIONS.md +2 -2docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md +2 -2
docs/examples/10-at-a-time.c+3 -3
@@ -106,9 +106,9 @@ int main(void)
{
CURLM *multi;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
multi = curl_multi_init();
if(multi) {
docs/examples/address-scope.c+8 -8
@@ -39,9 +39,9 @@ int main(void)
/* Windows/MS-DOS users need to find how to use if_nametoindex() */
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -51,18 +51,18 @@ int main(void)
my_scope_id = (long)if_nametoindex("eth0");
curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
#else
return 0;
#endif
docs/examples/altsvc.c+8 -8
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -48,16 +48,16 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL,
CURLALTSVC_H1 | CURLALTSVC_H2 | CURLALTSVC_H3);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/anyauthput.c+8 -8
@@ -91,7 +91,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
int main(int argc, char **argv)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
FILE *fp;
struct stat file_info;
@@ -115,10 +115,10 @@ int main(int argc, char **argv)
}
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fclose(fp);
- return (int)res;
+ return (int)result;
}
/* get a curl handle */
@@ -157,11 +157,11 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
/* Now run off and do what you have been told! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -169,5 +169,5 @@ int main(int argc, char **argv)
fclose(fp); /* close the local file */
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/block_ip.c+7 -7
@@ -293,17 +293,17 @@ static curl_socket_t opensocket(void *clientp,
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct connection_filter *filter;
filter = (struct connection_filter *)calloc(1, sizeof(*filter));
if(!filter)
return 1;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
free(filter);
- return (int)res;
+ return (int)result;
}
curl = curl_easy_init();
@@ -336,12 +336,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
/* Clean up */
docs/examples/cacertinmem.c+8 -8
@@ -119,9 +119,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -147,8 +147,8 @@ int main(void)
/* first try: retrieve page without ca certificates -> should fail
* unless libcurl was built --with-ca-fallback enabled at build-time
*/
- res = curl_easy_perform(curl);
- if(res == CURLE_OK)
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
@@ -168,8 +168,8 @@ int main(void)
* "modifications" to the SSL CONTEXT just before link init
*/
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK)
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
@@ -177,5 +177,5 @@ int main(void)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/certinfo.c+9 -9
@@ -39,11 +39,11 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -57,14 +57,14 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
struct curl_certinfo *certinfo;
- res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
+ result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
- if(!res && certinfo) {
+ if(!result && certinfo) {
int i;
printf("%d certs!\n", certinfo->num_of_certs);
@@ -83,5 +83,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/chkspeed.c+17 -17
@@ -69,7 +69,7 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
int main(int argc, char *argv[])
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
int prtall = 0, prtsep = 0, prttime = 0;
const char *url = URL_1M;
char *appname = argv[0];
@@ -161,9 +161,9 @@ int main(int argc, char *argv[])
}
/* init libcurl */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* init the curl session */
curl = curl_easy_init();
@@ -181,43 +181,43 @@ int main(int argc, char *argv[])
"libcurl-speedchecker/" CHKSPEED_VERSION);
/* get it! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
curl_off_t val;
/* check for bytes downloaded */
- res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &val);
- if((CURLE_OK == res) && (val > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &val);
+ if((CURLE_OK == result) && (val > 0))
printf("Data downloaded: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", val);
/* check for total download time */
- res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &val);
- if((CURLE_OK == res) && (val > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &val);
+ if((CURLE_OK == result) && (val > 0))
printf("Total download time: %" CURL_FORMAT_CURL_OFF_T
".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
val / 1000000,
val % 1000000);
/* check for average download speed */
- res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &val);
- if((CURLE_OK == res) && (val > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &val);
+ if((CURLE_OK == result) && (val > 0))
printf("Average download speed: "
"%" CURL_FORMAT_CURL_OFF_T " kbyte/sec.\n",
val / 1024);
if(prtall) {
/* check for name resolution time */
- res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &val);
- if((CURLE_OK == res) && (val > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &val);
+ if((CURLE_OK == result) && (val > 0))
printf("Name lookup time: %" CURL_FORMAT_CURL_OFF_T
".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
val / 1000000,
val % 1000000);
/* check for connect time */
- res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &val);
- if((CURLE_OK == res) && (val > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &val);
+ if((CURLE_OK == result) && (val > 0))
printf("Connect time: %" CURL_FORMAT_CURL_OFF_T
".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
val / 1000000,
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
}
else {
fprintf(stderr, "Error while fetching '%s' : %s\n",
- url, curl_easy_strerror(res));
+ url, curl_easy_strerror(result));
}
/* cleanup curl stuff */
docs/examples/connect-to.c+5 -5
@@ -34,9 +34,9 @@ int main(void)
struct curl_slist *host;
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/*
Each single string should be written using the format
@@ -62,7 +62,7 @@ int main(void)
/* Letting the wrong hostname in the certificate be okay, the transfer
goes through but (most likely) causes a 404 or similar because it sends
an unknown name in the Host: header field */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/cookie_interface.c+20 -20
@@ -44,16 +44,16 @@
static int print_cookies(CURL *curl)
{
- CURLcode res;
+ CURLcode result;
struct curl_slist *cookies;
struct curl_slist *nc;
int i;
printf("Cookies, curl knows:\n");
- res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
- if(res != CURLE_OK) {
+ result = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
+ if(result != CURLE_OK) {
fprintf(stderr, "curl curl_easy_getinfo failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
return 1;
}
nc = cookies;
@@ -74,11 +74,11 @@ static int print_cookies(CURL *curl)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -87,9 +87,9 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
- fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
+ fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(result));
return 1;
}
@@ -107,10 +107,10 @@ int main(void)
".example.com", "TRUE", "/", "FALSE",
difftime(time(NULL) + 31337, (time_t)0),
"PREF", "hello example, I like you!");
- res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+ if(result != CURLE_OK) {
fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
return 1;
}
@@ -122,18 +122,18 @@ int main(void)
snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com");
- res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+ if(result != CURLE_OK) {
fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
return 1;
}
print_cookies(curl);
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
- fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
+ fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(result));
return 1;
}
docs/examples/crawler.c+4 -4
@@ -183,11 +183,11 @@ int main(void)
int pending;
int complete;
int still_running;
- CURLcode res;
+ CURLcode result;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
signal(SIGINT, sighandler);
LIBXML_TEST_VERSION
docs/examples/debug.c+8 -8
@@ -122,12 +122,12 @@ static int my_trace(CURL *curl, curl_infotype type,
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct data config;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
config.trace_ascii = 1; /* enable ASCII tracing */
@@ -143,15 +143,15 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/default-scheme.c+9 -9
@@ -32,11 +32,11 @@
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -48,16 +48,16 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ephiperfifo.c+6 -6
@@ -186,10 +186,10 @@ static void check_multi_info(struct GlobalInfo *g)
while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
if(msg->msg == CURLMSG_DONE) {
CURL *curl = msg->easy_handle;
- CURLcode res = msg->data.result;
+ CURLcode result = msg->data.result;
curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
- fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
curl_multi_remove_handle(g->multi, curl);
free(conn->url);
curl_easy_cleanup(curl);
@@ -453,7 +453,7 @@ void sigint_handler(int signo)
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct GlobalInfo g;
struct itimerspec its;
struct epoll_event ev;
@@ -461,9 +461,9 @@ int main(int argc, char **argv)
(void)argc;
(void)argv;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
g_should_exit_ = 0;
signal(SIGINT, sigint_handler);
docs/examples/evhiperfifo.c+8 -7
@@ -173,10 +173,10 @@ static void check_multi_info(struct GlobalInfo *g)
while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
if(msg->msg == CURLMSG_DONE) {
CURL *curl = msg->easy_handle;
- CURLcode res = msg->data.result;
+ CURLcode result = msg->data.result;
curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
- fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
curl_multi_remove_handle(g->multi, curl);
free(conn->url);
curl_easy_cleanup(curl);
@@ -197,7 +197,8 @@ static void event_cb(EV_P_ struct ev_io *w, int revents)
action = ((revents & EV_READ) ? CURL_POLL_IN : 0) |
((revents & EV_WRITE) ? CURL_POLL_OUT : 0);
- mresult = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
+ mresult = curl_multi_socket_action(g->multi, w->fd, action,
+ &g->still_running);
mcode_or_die("event_cb: curl_multi_socket_action", mresult);
check_multi_info(g);
if(g->still_running <= 0) {
@@ -411,14 +412,14 @@ static int init_fifo(struct GlobalInfo *g)
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct GlobalInfo g;
(void)argc;
(void)argv;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
memset(&g, 0, sizeof(g));
g.loop = ev_default_loop(0);
docs/examples/externalsocket.c+7 -7
@@ -99,13 +99,13 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct sockaddr_in servaddr; /* socket address structure */
curl_socket_t sockfd;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -157,14 +157,14 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
close(sockfd);
- if(res) {
- printf("libcurl error: %d\n", res);
+ if(result) {
+ printf("libcurl error: %d\n", result);
return 4;
}
}
docs/examples/fileupload.c+7 -7
@@ -48,14 +48,14 @@
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct stat file_info;
curl_off_t speed_upload, total_time;
FILE *fd;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
fd = fopen("debugit", "rb"); /* open file to upload */
if(!fd) {
@@ -89,11 +89,11 @@ int main(void)
/* enable verbose for easier tracing */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
else {
/* now extract transfer info */
docs/examples/ftp-delete.c+8 -8
@@ -39,12 +39,12 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct curl_slist *headerlist = NULL;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -64,7 +64,7 @@ int main(void)
/* pass in list of FTP commands to run after the transfer */
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
@@ -72,13 +72,13 @@ int main(void)
/* clean up the FTP commands list */
curl_slist_free_all(headerlist);
- if(CURLE_OK != res) {
+ if(CURLE_OK != result) {
/* we failed */
- fprintf(stderr, "curl told us %d\n", res);
+ fprintf(stderr, "curl told us %d\n", result);
}
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftp-wildcard.c+5 -5
@@ -106,9 +106,9 @@ int main(int argc, char **argv)
struct callback_data data = { 0 };
/* global initialization */
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* initialization of easy handle */
curl = curl_easy_init();
@@ -142,9 +142,9 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/test/*");
/* and start transfer! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpget.c+8 -8
@@ -55,15 +55,15 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct FtpFile ftpfile = {
"curl.tar.gz", /* name to store the file as if successful */
NULL
};
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -80,14 +80,14 @@ int main(void)
/* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
- if(CURLE_OK != res) {
+ if(CURLE_OK != result) {
/* we failed */
- fprintf(stderr, "curl told us %d\n", res);
+ fprintf(stderr, "curl told us %d\n", result);
}
}
@@ -96,5 +96,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpgetinfo.c+13 -13
@@ -49,14 +49,14 @@ int main(void)
{
char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
CURL *curl;
- CURLcode res;
+ CURLcode result;
long filetime = -1;
curl_off_t filesize = 0;
const char *filename = strrchr(ftpurl, '/') + 1;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -70,24 +70,24 @@ int main(void)
/* Switch on full protocol/debug output */
/* curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
/* https://curl.se/libcurl/c/curl_easy_getinfo.html */
- res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if((CURLE_OK == res) && (filetime >= 0)) {
+ result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+ if((CURLE_OK == result) && (filetime >= 0)) {
time_t file_time = (time_t)filetime;
printf("filetime %s: %s", filename, ctime(&file_time));
}
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
- &filesize);
- if((CURLE_OK == res) && (filesize > 0))
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+ &filesize);
+ if((CURLE_OK == result) && (filesize > 0))
printf("filesize %s: %" CURL_FORMAT_CURL_OFF_T " bytes\n",
filename, filesize);
}
else {
/* we failed */
- fprintf(stderr, "curl told us %d\n", res);
+ fprintf(stderr, "curl told us %d\n", result);
}
/* always cleanup */
@@ -96,5 +96,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpgetresp.c+8 -8
@@ -48,13 +48,13 @@ static size_t write_response(void *ptr, size_t size, size_t nmemb, void *data)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
FILE *ftpfile;
FILE *respfile;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* local filename to store the file as */
ftpfile = fopen(FTPBODY, "wb"); /* b is binary, needed on Windows */
@@ -80,11 +80,11 @@ int main(void)
CURLOPT_WRITEFUNCTION as well */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -95,5 +95,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpsget.c+8 -8
@@ -55,15 +55,15 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct FtpFile ftpfile = {
"yourfile.bin", /* name to store the file as if successful */
NULL
};
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -85,14 +85,14 @@ int main(void)
/* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
- if(CURLE_OK != res) {
+ if(CURLE_OK != result) {
/* we failed */
- fprintf(stderr, "curl told us %d\n", res);
+ fprintf(stderr, "curl told us %d\n", result);
}
}
@@ -101,5 +101,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpupload.c+8 -8
@@ -80,7 +80,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
FILE *hd_src;
struct stat file_info;
curl_off_t fsize;
@@ -106,10 +106,10 @@ int main(void)
printf("Local file size: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", fsize);
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fclose(hd_src);
- return (int)res;
+ return (int)result;
}
/* get a curl handle */
@@ -141,11 +141,11 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, fsize);
/* Now run off and do what you have been told! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* clean up the FTP commands list */
curl_slist_free_all(headerlist);
@@ -156,5 +156,5 @@ int main(void)
fclose(hd_src); /* close the local file */
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpuploadfrommem.c+9 -9
@@ -70,7 +70,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct WriteThis upload;
@@ -78,11 +78,11 @@ int main(void)
upload.sizeleft = strlen(data);
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ result = curl_global_init(CURL_GLOBAL_DEFAULT);
/* Check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
return 1;
}
@@ -112,16 +112,16 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)upload.sizeleft);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ftpuploadresume.c+10 -10
@@ -77,7 +77,7 @@ static int upload(CURL *curl, const char *remotepath,
{
FILE *f;
long uploaded_len = 0;
- CURLcode res = CURLE_GOT_NOTHING;
+ CURLcode result = CURLE_GOT_NOTHING;
int c;
f = fopen(localpath, "rb");
@@ -111,7 +111,7 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- for(c = 0; (res != CURLE_OK) && (c < tries); c++) {
+ for(c = 0; (result != CURLE_OK) && (c < tries); c++) {
/* are we resuming? */
if(c) { /* yes */
/* determine the length of the file already written */
@@ -125,8 +125,8 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
- res = curl_easy_perform(curl);
- if(res != CURLE_OK)
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK)
continue;
curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
@@ -140,15 +140,15 @@ static int upload(CURL *curl, const char *remotepath,
curl_easy_setopt(curl, CURLOPT_APPEND, 0L);
}
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
fclose(f);
- if(res == CURLE_OK)
+ if(result == CURLE_OK)
return 1;
else {
- fprintf(stderr, "%s\n", curl_easy_strerror(res));
+ fprintf(stderr, "%s\n", curl_easy_strerror(result));
return 0;
}
}
@@ -157,9 +157,9 @@ int main(void)
{
CURL *curl = NULL;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/getinfo.c+8 -8
@@ -33,21 +33,21 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
char *ct;
/* ask for the content-type */
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
- if((CURLE_OK == res) && ct)
+ if((CURLE_OK == result) && ct)
printf("We received Content-Type: %s\n", ct);
}
@@ -55,5 +55,5 @@ int main(void)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/getinmemory.c+8 -8
@@ -60,13 +60,13 @@ static size_t write_cb(void *contents, size_t size, size_t nmemb, void *userp)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct MemoryStruct chunk;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
chunk.memory = malloc(1); /* grown as needed by the realloc above */
chunk.size = 0; /* no data at this point */
@@ -89,12 +89,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* get it! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
else {
/*
@@ -116,5 +116,5 @@ int main(void)
/* we are done with libcurl, so clean it up */
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/getredirect.c+13 -13
@@ -32,13 +32,13 @@
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
char *location;
long response_code;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -46,22 +46,22 @@ int main(void)
/* example.com is redirected, figure out the redirection! */
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
else {
- res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
- if((res == CURLE_OK) && ((response_code / 100) != 3)) {
+ result = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
+ if((result == CURLE_OK) && ((response_code / 100) != 3)) {
/* a redirect implies a 3xx response code */
fprintf(stderr, "Not a redirect.\n");
}
else {
- res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
+ result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
- if((res == CURLE_OK) && location) {
+ if((result == CURLE_OK) && location) {
/* This is the new absolute URL that you could redirect to, even if
* the Location: response header may have been a relative URL. */
printf("Redirected to: %s\n", location);
@@ -73,5 +73,5 @@ int main(void)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/getreferrer.c+9 -9
@@ -33,25 +33,25 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
else {
char *hdr;
- res = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
- if((res == CURLE_OK) && hdr)
+ result = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
+ if((result == CURLE_OK) && hdr)
printf("Referrer header: %s\n", hdr);
}
docs/examples/ghiper.c+5 -5
@@ -138,12 +138,12 @@ static void check_multi_info(struct GlobalInfo *g)
while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
if(msg->msg == CURLMSG_DONE) {
CURL *curl = msg->easy_handle;
- CURLcode res = msg->data.result;
+ CURLcode result = msg->data.result;
char *eff_url;
struct ConnInfo *conn;
curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
- MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ MSG_OUT("DONE: %s => (%d) %s\n", eff_url, result, conn->error);
curl_multi_remove_handle(g->multi, curl);
free(conn->url);
curl_easy_cleanup(curl);
@@ -433,9 +433,9 @@ int main(void)
int fd;
GIOChannel *ch;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
fd = init_fifo();
if(fd == CURL_SOCKET_BAD) {
docs/examples/headerapi.c+7 -7
@@ -41,9 +41,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -55,12 +55,12 @@ int main(void)
/* this example just ignores the content */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
if(CURLHE_OK == curl_easy_header(curl, "Content-Type", 0, CURLH_HEADER,
-1, &header))
docs/examples/hiperfifo.c+6 -6
@@ -178,10 +178,10 @@ static void check_multi_info(struct GlobalInfo *g)
while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
if(msg->msg == CURLMSG_DONE) {
CURL *curl = msg->easy_handle;
- CURLcode res = msg->data.result;
+ CURLcode result = msg->data.result;
curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
- fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
curl_multi_remove_handle(g->multi, curl);
free(conn->url);
curl_easy_cleanup(curl);
@@ -421,14 +421,14 @@ static void clean_fifo(struct GlobalInfo *g)
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct GlobalInfo g;
(void)argc;
(void)argv;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
memset(&g, 0, sizeof(g));
g.evbase = event_base_new();
docs/examples/hsts-preload.c+8 -8
@@ -87,9 +87,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -113,16 +113,16 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/htmltidy.c+13 -13
@@ -81,16 +81,16 @@ int main(int argc, char **argv)
TidyDoc tdoc;
TidyBuffer docbuf = { 0 };
TidyBuffer tidy_errbuf = { 0 };
- CURLcode res;
+ CURLcode result;
if(argc != 2) {
printf("usage: %s <url>\n", argv[0]);
return 1;
}
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
tdoc = tidyCreate();
tidyOptSetBool(tdoc, TidyForceOutput, yes); /* try harder */
@@ -107,14 +107,14 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf);
- res = curl_easy_perform(curl);
- if(!res) {
- res = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
- if(res >= 0) {
- res = tidyCleanAndRepair(tdoc); /* fix any problems */
- if(res >= 0) {
- res = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
- if(res >= 0) {
+ result = curl_easy_perform(curl);
+ if(!result) {
+ result = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
+ if(result >= 0) {
+ result = tidyCleanAndRepair(tdoc); /* fix any problems */
+ if(result >= 0) {
+ result = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
+ if(result >= 0) {
dumpNode(tdoc, tidyGetRoot(tdoc), 0); /* walk the tree */
fprintf(stderr, "%s\n", tidy_errbuf.bp); /* show errors */
}
@@ -134,5 +134,5 @@ int main(int argc, char **argv)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/htmltitle.cpp+19 -19
@@ -86,7 +86,7 @@ static size_t writer(char *data, size_t size, size_t nmemb,
//
static bool init(CURL *&curl, const char *url)
{
- CURLcode res;
+ CURLcode result;
curl = curl_easy_init();
@@ -95,32 +95,32 @@ static bool init(CURL *&curl, const char *url)
return false;
}
- res = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
- if(res != CURLE_OK) {
- fprintf(stderr, "Failed to set error buffer [%d]\n", res);
+ result = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
+ if(result != CURLE_OK) {
+ fprintf(stderr, "Failed to set error buffer [%d]\n", result);
return false;
}
- res = curl_easy_setopt(curl, CURLOPT_URL, url);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_URL, url);
+ if(result != CURLE_OK) {
fprintf(stderr, "Failed to set URL [%s]\n", errorBuffer);
return false;
}
- res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ if(result != CURLE_OK) {
fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
return false;
}
- res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
+ if(result != CURLE_OK) {
fprintf(stderr, "Failed to set writer [%s]\n", errorBuffer);
return false;
}
- res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
- if(res != CURLE_OK) {
+ result = curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
+ if(result != CURLE_OK) {
fprintf(stderr, "Failed to set write data [%s]\n", errorBuffer);
return false;
}
@@ -253,7 +253,7 @@ static void parseHtml(const std::string &html,
int main(int argc, char *argv[])
{
CURL *curl = NULL;
- CURLcode res;
+ CURLcode result;
std::string title;
// Ensure one argument is given
@@ -263,9 +263,9 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
// Initialize CURL handle
@@ -277,10 +277,10 @@ int main(int argc, char *argv[])
// Retrieve content for the URL
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);
return EXIT_FAILURE;
}
@@ -291,5 +291,5 @@ int main(int argc, char *argv[])
// Display the extracted title
printf("Title: %s\n", title.c_str());
- return (int)res;
+ return (int)result;
}
docs/examples/http-options.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -49,12 +49,12 @@ int main(void)
from libcurl as this exits anyway */
curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/http-post.c+9 -9
@@ -32,12 +32,12 @@
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* get a curl handle */
curl = curl_easy_init();
@@ -49,16 +49,16 @@ int main(void)
/* Now specify the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/http2-download.c+4 -4
@@ -189,7 +189,7 @@ static int setup(struct transfer *t, int num)
*/
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct transfer *trans;
CURLM *multi = NULL;
int i;
@@ -205,9 +205,9 @@ int main(int argc, char **argv)
else
num_transfers = 3; /* a suitable low default */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
trans = calloc(num_transfers, sizeof(*trans));
if(!trans) {
docs/examples/http2-pushinmemory.c+3 -3
@@ -125,9 +125,9 @@ int main(void)
int transfers = 1; /* we start with one */
int i;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* init a multi stack */
multi = curl_multi_init();
docs/examples/http2-serverpush.c+4 -4
@@ -215,7 +215,7 @@ static int server_push_callback(CURL *parent,
*/
int main(int argc, char *argv[])
{
- CURLcode res;
+ CURLcode result;
CURL *curl;
CURLM *multi;
int transfers = 1; /* we start with one */
@@ -224,9 +224,9 @@ int main(int argc, char *argv[])
if(argc == 2)
url = argv[1];
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* init a multi stack */
multi = curl_multi_init();
docs/examples/http2-upload.c+4 -4
@@ -287,7 +287,7 @@ static int setup(struct input *t, int num, const char *upload)
*/
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct input *trans;
CURLM *multi = NULL;
int i;
@@ -308,9 +308,9 @@ int main(int argc, char **argv)
else
num_transfers = 3; /* a suitable low default */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
trans = calloc(num_transfers, sizeof(*trans));
if(!trans) {
docs/examples/http3-present.c+3 -3
@@ -33,9 +33,9 @@ int main(void)
{
curl_version_info_data *ver;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
ver = curl_version_info(CURLVERSION_NOW);
if(ver->features & CURL_VERSION_HTTP2)
docs/examples/http3.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -44,12 +44,12 @@ int main(void)
/* Use HTTP/3 but fallback to earlier HTTP if necessary */
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/httpcustomheader.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -60,11 +60,11 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "localhost");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
curl_slist_free_all(chunk);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/httpput-postfields.c+8 -8
@@ -50,7 +50,7 @@ static const char olivertwist[] =
int main(int argc, char **argv)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
char *url;
if(argc < 2)
@@ -59,9 +59,9 @@ int main(int argc, char **argv)
url = argv[1];
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* get a curl handle */
curl = curl_easy_init();
@@ -89,11 +89,11 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_URL, url);
/* Now run off and do what you have been told! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -103,5 +103,5 @@ int main(int argc, char **argv)
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/httpput.c+8 -8
@@ -76,7 +76,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
int main(int argc, char **argv)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
FILE *hd_src;
struct stat file_info;
@@ -103,10 +103,10 @@ int main(int argc, char **argv)
}
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fclose(hd_src);
- return (int)res;
+ return (int)result;
}
/* get a curl handle */
@@ -131,11 +131,11 @@ int main(int argc, char **argv)
(curl_off_t)file_info.st_size);
/* Now run off and do what you have been told! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -143,5 +143,5 @@ int main(int argc, char **argv)
fclose(hd_src); /* close the local file */
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/https.c+8 -8
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -68,12 +68,12 @@ int main(void)
/* cache the CA cert bundle in memory for a week */
curl_easy_setopt(curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -81,5 +81,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-append.c+7 -7
@@ -87,9 +87,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -117,12 +117,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_INFILESIZE, infilesize);
/* Perform the append */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -130,5 +130,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-authzid.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -60,12 +60,12 @@ int main(void)
"imap://imap.example.com/INBOX/;UID=1");
/* Perform the fetch */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-copy.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -60,12 +60,12 @@ int main(void)
* imap-store.c for more information on deleting messages. */
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-create.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-delete.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-examine.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-fetch.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -54,12 +54,12 @@ int main(void)
"imap://imap.example.com/INBOX/;UID=1");
/* Perform the fetch */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -67,5 +67,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-list.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -55,12 +55,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
/* Perform the list */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -68,5 +68,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-lsub.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -57,12 +57,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LSUB \"\" *");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -70,5 +70,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-multi.c+3 -3
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/imap-noop.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-search.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -60,12 +60,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-ssl.c+7 -7
@@ -40,9 +40,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -81,12 +81,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Perform the fetch */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -94,5 +94,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-store.c+10 -10
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -58,24 +58,24 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
else {
/* Set the EXPUNGE command, although you can use the CLOSE command if you
* do not want to know the result of the STORE */
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE");
/* Perform the second custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
/* Always cleanup */
@@ -84,5 +84,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/imap-tls.c+7 -7
@@ -40,9 +40,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -81,12 +81,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Perform the fetch */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -94,5 +94,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/interface.c+5 -5
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -46,7 +46,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_INTERFACE, "enp3s0");
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
@@ -54,5 +54,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/ipv6.c+5 -5
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -43,12 +43,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/keepalive.c+5 -5
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -53,12 +53,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/localport.c+5 -5
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -47,7 +47,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 10L);
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
@@ -55,5 +55,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/log_failed_transfers.c+5 -5
@@ -208,7 +208,7 @@ static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
int main(void)
{
- CURLcode res;
+ CURLcode result;
unsigned i;
int total_failed = 0;
char errbuf[CURL_ERROR_SIZE] = { 0, };
@@ -224,10 +224,10 @@ int main(void)
transfer[1].bodyfile = "400.txt";
transfer[1].logfile = "400_transfer_log.txt";
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fprintf(stderr, "curl_global_init failed\n");
- return (int)res;
+ return (int)result;
}
/* You could enable global tracing for extra verbosity when verbosity is
@@ -277,7 +277,7 @@ int main(void)
if(t->bodyfp) {
/* Perform the transfer */
- CURLcode result = curl_easy_perform(t->curl);
+ result = curl_easy_perform(t->curl);
/* Save the body file */
fclose(t->bodyfp);
docs/examples/maxconnects.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
while(urls[i]) {
curl_easy_setopt(curl, CURLOPT_URL, urls[i]);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
i++;
}
/* always cleanup */
docs/examples/multi-app.c+3 -3
@@ -46,9 +46,9 @@ int main(void)
int i;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* Allocate one curl handle per transfer */
for(i = 0; i < HANDLECOUNT; i++)
docs/examples/multi-debugcallback.c+3 -3
@@ -121,9 +121,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/multi-double.c+3 -3
@@ -38,9 +38,9 @@ int main(void)
CURL *curl;
CURL *curl2;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
curl2 = curl_easy_init();
docs/examples/multi-event.c+4 -4
@@ -217,15 +217,15 @@ static int handle_socket(CURL *curl, curl_socket_t s, int action, void *userp,
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
if(argc <= 1)
return 0;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fprintf(stderr, "Could not init curl\n");
- return (int)res;
+ return (int)result;
}
base = event_base_new();
docs/examples/multi-formadd.c+3 -3
@@ -43,9 +43,9 @@ int main(void)
struct curl_slist *headerlist = NULL;
static const char buf[] = "Expect:";
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
CURL_IGNORE_DEPRECATION(
/* Fill in the file upload field. This makes libcurl load data from
docs/examples/multi-legacy.c+3 -3
@@ -52,9 +52,9 @@ int main(void)
int i;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* Allocate one curl handle per transfer */
for(i = 0; i < HANDLECOUNT; i++)
docs/examples/multi-post.c+3 -3
@@ -39,9 +39,9 @@ int main(void)
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/multi-single.c+5 -4
@@ -38,9 +38,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -66,7 +66,8 @@ int main(void)
mresult = curl_multi_poll(multi, NULL, 0, 1000, NULL);
if(mresult) {
- fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mresult);
+ fprintf(stderr, "curl_multi_poll() failed, code %d.\n",
+ (int)mresult);
break;
}
docs/examples/multi-uv.c+4 -4
@@ -229,16 +229,16 @@ static int cb_socket(CURL *curl, curl_socket_t s, int action,
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
struct datauv uv = { 0 };
int running_handles;
if(argc <= 1)
return 0;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
uv.loop = uv_default_loop();
uv_timer_init(uv.loop, &uv.timeout);
docs/examples/netrc.c+5 -5
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -43,12 +43,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/home/daniel/s3cr3ts.txt");
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/persistent.c+12 -12
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -45,23 +45,23 @@ int main(void)
/* get the first document */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* get another document from the same server using the same
connection */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/docs/");
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-authzid.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -59,12 +59,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
/* Perform the retr */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-dele.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -59,12 +59,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-list.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -53,12 +53,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
/* Perform the list */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -66,5 +66,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-multi.c+4 -4
@@ -37,12 +37,12 @@
int main(void)
{
- CURLcode res;
+ CURLcode result;
CURL *curl;
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/pop3-noop.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -59,12 +59,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-retr.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -53,12 +53,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
/* Perform the retr */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -66,5 +66,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-ssl.c+7 -7
@@ -40,9 +40,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -80,12 +80,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Perform the retr */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -93,5 +93,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-stat.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -59,12 +59,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-tls.c+7 -7
@@ -40,9 +40,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -80,12 +80,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Perform the retr */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -93,5 +93,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-top.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TOP 1 0");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/pop3-uidl.c+7 -7
@@ -39,9 +39,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,12 +56,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Always cleanup */
curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/post-callback.c+11 -11
@@ -68,7 +68,7 @@ static size_t read_cb(char *dest, size_t size, size_t nmemb, void *userp)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct WriteThis wt;
@@ -76,12 +76,12 @@ int main(void)
wt.sizeleft = strlen(data);
/* In Windows, this inits the Winsock stuff */
- res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ result = curl_global_init(CURL_GLOBAL_DEFAULT);
/* Check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed: %s\n",
- curl_easy_strerror(res));
- return (int)res;
+ curl_easy_strerror(result));
+ return (int)result;
}
/* get a curl handle */
@@ -114,7 +114,7 @@ int main(void)
struct curl_slist *chunk = NULL;
chunk = curl_slist_append(chunk, "Transfer-Encoding: chunked");
- res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+ result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
/* use curl_slist_free_all() after the *perform() call to free this
list again */
}
@@ -137,18 +137,18 @@ int main(void)
struct curl_slist *chunk = NULL;
chunk = curl_slist_append(chunk, "Expect:");
- res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+ result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
/* use curl_slist_free_all() after the *perform() call to free this
list again */
}
#endif
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/postinmemory.c+8 -8
@@ -59,13 +59,13 @@ static size_t write_cb(void *contents, size_t size, size_t nmemb, void *userp)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct MemoryStruct chunk;
static const char *postthis = "Field=1&Field=2&Field=3";
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
chunk.memory = malloc(1); /* grown as needed by realloc above */
chunk.size = 0; /* no data at this point */
@@ -89,12 +89,12 @@ int main(void)
/* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
else {
/*
docs/examples/postit2-formadd.c+8 -8
@@ -48,16 +48,16 @@
int main(int argc, char *argv[])
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct curl_httppost *formpost = NULL;
struct curl_httppost *lastptr = NULL;
struct curl_slist *headerlist = NULL;
static const char buf[] = "Expect:";
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
CURL_IGNORE_DEPRECATION(
/* Fill in the file upload field */
@@ -96,12 +96,12 @@ int main(int argc, char *argv[])
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
)
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/postit2.c+7 -7
@@ -46,9 +46,9 @@ int main(int argc, char *argv[])
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -85,12 +85,12 @@ int main(int argc, char *argv[])
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, form);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/progressfunc.c+7 -7
@@ -77,9 +77,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -95,14 +95,14 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(res != CURLE_OK)
- fprintf(stderr, "%s\n", curl_easy_strerror(res));
+ if(result != CURLE_OK)
+ fprintf(stderr, "%s\n", curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/protofeats.c+3 -3
@@ -38,9 +38,9 @@ int main(void)
curl_version_info_data *ver;
const char * const *ptr;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
ver = curl_version_info(CURLVERSION_NOW);
printf("Protocols:\n");
docs/examples/range.c+5 -5
@@ -31,20 +31,20 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
curl_easy_setopt(curl, CURLOPT_RANGE, "200-999");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/resolve.c+5 -5
@@ -42,15 +42,15 @@ int main(void)
struct curl_slist *host = curl_slist_append(NULL,
"example.com:443:127.0.0.1");
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
@@ -59,5 +59,5 @@ int main(void)
curl_slist_free_all(host);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/rtsp-options.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -45,12 +45,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/sendrecv.c+19 -19
@@ -83,9 +83,9 @@ int main(void)
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
size_t request_len = strlen(request);
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* A general note of caution here: if you are using curl_easy_recv() or
curl_easy_send() to implement HTTP or _any_ other protocol libcurl
@@ -103,18 +103,18 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
return 1;
}
/* Extract the socket from the curl handle - we need it for waiting. */
- res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
return 1;
}
@@ -127,18 +127,18 @@ int main(void)
size_t nsent;
do {
nsent = 0;
- res = curl_easy_send(curl, request + nsent_total,
+ result = curl_easy_send(curl, request + nsent_total,
request_len - nsent_total, &nsent);
nsent_total += nsent;
- if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
+ if(result == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
printf("Error: timeout.\n");
return 1;
}
- } while(res == CURLE_AGAIN);
+ } while(result == CURLE_AGAIN);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
return 1;
}
@@ -154,16 +154,16 @@ int main(void)
size_t nread;
do {
nread = 0;
- res = curl_easy_recv(curl, buf, sizeof(buf), &nread);
+ result = curl_easy_recv(curl, buf, sizeof(buf), &nread);
- if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 1, 60000L)) {
+ if(result == CURLE_AGAIN && !wait_on_socket(sockfd, 1, 60000L)) {
printf("Error: timeout.\n");
return 1;
}
- } while(res == CURLE_AGAIN);
+ } while(result == CURLE_AGAIN);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
break;
}
docs/examples/sepheaders.c+5 -5
@@ -46,9 +46,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* init the curl session */
curl = curl_easy_init();
@@ -91,7 +91,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, bodyfile);
/* get it! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* close the header file */
fclose(headerfile);
@@ -105,5 +105,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/sessioninfo.c+8 -8
@@ -46,14 +46,14 @@ static CURL *curl;
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
{
const struct curl_tlssessioninfo *info;
- CURLcode res;
+ CURLcode result;
(void)stream;
(void)ptr;
- res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
+ result = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
- if(!res) {
+ if(!result) {
unsigned int cert_list_size;
const gnutls_datum_t *chainp;
@@ -96,9 +96,9 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
int main(void)
{
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -106,12 +106,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/sftpget.c+7 -7
@@ -70,9 +70,9 @@ int main(void)
NULL
};
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -96,14 +96,14 @@ int main(void)
/* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
- if(CURLE_OK != res) {
+ if(CURLE_OK != result) {
/* we failed */
- fprintf(stderr, "curl told us %d\n", res);
+ fprintf(stderr, "curl told us %d\n", result);
}
}
@@ -112,5 +112,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/sftpuploadresume.c+12 -12
@@ -59,7 +59,7 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
@@ -69,11 +69,11 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
&remoteFileSizeByte);
- if(res)
+ if(result)
return -1;
printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte);
}
@@ -87,7 +87,7 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
const char *localpath)
{
FILE *f = NULL;
- CURLcode res = CURLE_GOT_NOTHING;
+ CURLcode result = CURLE_GOT_NOTHING;
curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath);
if(remoteFileSizeByte == -1) {
@@ -112,14 +112,14 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
fseek(f, (long)remoteFileSizeByte, SEEK_SET);
#endif
curl_easy_setopt(curl, CURLOPT_APPEND, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
fclose(f);
- if(res == CURLE_OK)
+ if(result == CURLE_OK)
return 1;
else {
- fprintf(stderr, "%s\n", curl_easy_strerror(res));
+ fprintf(stderr, "%s\n", curl_easy_strerror(result));
return 0;
}
}
@@ -128,9 +128,9 @@ int main(void)
{
CURL *curl = NULL;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/shared-connection-cache.c+8 -8
@@ -52,9 +52,9 @@ int main(void)
CURLSH *share;
int i;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
share = curl_share_init();
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
@@ -73,12 +73,12 @@ int main(void)
/* use the share object */
curl_easy_setopt(curl, CURLOPT_SHARE, share);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
@@ -87,5 +87,5 @@ int main(void)
curl_share_cleanup(share);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/simple.c+7 -7
@@ -33,9 +33,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -43,12 +43,12 @@ int main(void)
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/examples/simplepost.c+8 -8
@@ -36,9 +36,9 @@ int main(void)
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -48,16 +48,16 @@ int main(void)
/* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/simplessl.c+9 -9
@@ -51,7 +51,7 @@
int main(void)
{
CURL *curl = NULL;
- CURLcode res;
+ CURLcode result;
FILE *headerfile;
const char *pPassphrase = NULL;
@@ -70,9 +70,9 @@ int main(void)
pKeyType = "PEM";
#endif
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
+ return (int)result;
}
headerfile = fopen(pHeaderFile, "wb");
@@ -128,12 +128,12 @@ int main(void)
/* disconnect if we cannot validate server's cert */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
error:
@@ -146,5 +146,5 @@ error:
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smooth-gtk-thread.c+3 -3
@@ -168,9 +168,9 @@ int main(int argc, char **argv)
GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
/* Must initialize libcurl before any threads are started */
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* Init thread */
g_thread_init(NULL);
docs/examples/smtp-authzid.c+7 -7
@@ -92,9 +92,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -137,12 +137,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* Send the message */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
@@ -160,5 +160,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smtp-expn.c+6 -6
@@ -42,9 +42,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -61,12 +61,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPN");
/* Perform the custom request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
docs/examples/smtp-mail.c+7 -7
@@ -89,9 +89,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -125,12 +125,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* Send the message */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
@@ -148,5 +148,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smtp-mime.c+7 -7
@@ -70,9 +70,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -140,12 +140,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
/* Send the message */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free lists. */
curl_slist_free_all(recipients);
@@ -167,5 +167,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smtp-multi.c+3 -3
@@ -82,9 +82,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/smtp-ssl.c+7 -7
@@ -86,9 +86,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -152,12 +152,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Send the message */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
@@ -168,5 +168,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smtp-tls.c+7 -7
@@ -86,9 +86,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -155,12 +155,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* Send the message */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
@@ -171,5 +171,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/smtp-vrfy.c+7 -7
@@ -45,9 +45,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -61,12 +61,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
/* Perform the VRFY */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* Free the list of recipients */
curl_slist_free_all(recipients);
@@ -82,5 +82,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/synctime.c+7 -7
@@ -189,7 +189,7 @@ static CURLcode SyncTime_CURL_Fetch(CURL *curl, const char *URL_Str,
const char *OutFileName, int HttpGetBody)
{
FILE *outfile;
- CURLcode res;
+ CURLcode result;
outfile = NULL;
if(HttpGetBody == HTTP_COMMAND_HEAD)
@@ -200,10 +200,10 @@ static CURLcode SyncTime_CURL_Fetch(CURL *curl, const char *URL_Str,
}
curl_easy_setopt(curl, CURLOPT_URL, URL_Str);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
if(outfile)
fclose(outfile);
- return res; /* CURLE_OK */
+ return result; /* CURLE_OK */
}
static void showUsage(void)
@@ -228,7 +228,7 @@ static void showUsage(void)
int main(int argc, char *argv[])
{
- CURLcode res;
+ CURLcode result;
CURL *curl;
struct conf conf;
int RetValue;
@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
"https://www.ntp.org/");
/* Init CURL before usage */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
docs/examples/threaded.c+4 -4
@@ -81,15 +81,15 @@ static void *pull_one_url(void *p)
int main(void)
{
- CURLcode res;
+ CURLcode result;
pthread_t tid[NUMT];
struct targ targs[NUMT];
int i;
/* Must initialize libcurl before any threads are started */
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
for(i = 0; i < NUMT; i++) {
int error;
docs/examples/unixsocket.c+8 -8
@@ -42,9 +42,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -56,16 +56,16 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, PATH);
#endif
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/url2file.c+6 -6
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
{
static const char *pagefilename = "page.out";
- CURLcode res;
+ CURLcode result;
CURL *curl;
if(argc < 2) {
@@ -54,10 +54,10 @@ int main(int argc, char *argv[])
return 1;
}
- res = curl_global_init(CURL_GLOBAL_ALL);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result) {
fprintf(stderr, "Could not init curl\n");
- return (int)res;
+ return (int)result;
}
/* init the curl session */
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
curl_easy_setopt(curl, CURLOPT_WRITEDATA, pagefile);
/* get it! */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* close the header file */
fclose(pagefile);
@@ -97,5 +97,5 @@ int main(int argc, char *argv[])
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/urlapi.c+7 -7
@@ -38,9 +38,9 @@ int main(void)
CURLU *urlp;
CURLUcode uc;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* init curl URL */
urlp = curl_url();
@@ -62,16 +62,16 @@ int main(void)
/* only allow HTTP, TFTP and SFTP */
curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,tftp,sftp");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
cleanup:
curl_url_cleanup(urlp);
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/usercertinmem.c+8 -8
@@ -158,9 +158,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -183,8 +183,8 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
/* first try: retrieve page without user certificate and key -> fails */
- res = curl_easy_perform(curl);
- if(res == CURLE_OK)
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
@@ -194,8 +194,8 @@ int main(void)
* the necessary "modifications" to the SSL CONTEXT just before link init
*/
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK)
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
@@ -203,5 +203,5 @@ int main(void)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/websocket-cb.c+8 -8
@@ -45,9 +45,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -57,16 +57,16 @@ int main(void)
/* pass the easy handle to the callback */
curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/websocket-updown.c+15 -14
@@ -60,14 +60,15 @@ static size_t read_cb(char *buf, size_t nitems, size_t buflen, void *p)
struct read_ctx *ctx = p;
size_t len = nitems * buflen;
size_t left = ctx->blen - ctx->nsent;
- CURLcode res;
+ CURLcode result;
if(!ctx->nsent) {
- /* On first call, set the FRAME information to be used (it defaults
- * to CURLWS_BINARY otherwise). */
- res = curl_ws_start_frame(ctx->curl, CURLWS_TEXT, (curl_off_t)ctx->blen);
- if(res) {
- fprintf(stderr, "error starting frame: %d\n", res);
+ /* On first call, set the FRAME information to be used (it defaults to
+ * CURLWS_BINARY otherwise). */
+ result = curl_ws_start_frame(ctx->curl, CURLWS_TEXT,
+ (curl_off_t)ctx->blen);
+ if(result) {
+ fprintf(stderr, "error starting frame: %d\n", result);
return CURL_READFUNC_ABORT;
}
}
@@ -88,9 +89,9 @@ int main(int argc, const char *argv[])
struct read_ctx rctx;
const char *payload = "Hello, friend!";
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
memset(&rctx, 0, sizeof(rctx));
@@ -111,16 +112,16 @@ int main(int argc, const char *argv[])
curl_easy_setopt(curl, CURLOPT_READDATA, &rctx);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/websocket.c+28 -28
@@ -39,17 +39,17 @@
static CURLcode ping(CURL *curl, const char *send_payload)
{
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
const char *buf = send_payload;
size_t sent, blen = strlen(send_payload);
while(blen) {
- res = curl_ws_send(curl, buf, blen, &sent, 0, CURLWS_PING);
- if(!res) {
+ result = curl_ws_send(curl, buf, blen, &sent, 0, CURLWS_PING);
+ if(!result) {
buf += sent; /* deduct what was sent */
blen -= sent;
}
- else if(res == CURLE_AGAIN) { /* blocked on sending */
+ else if(result == CURLE_AGAIN) { /* blocked on sending */
fprintf(stderr, "ws: sent PING blocked, waiting a second\n");
sleep(1); /* either select() on socket or max timeout would
be good here. */
@@ -57,9 +57,9 @@ static CURLcode ping(CURL *curl, const char *send_payload)
else /* real error sending */
break;
}
- if(!res)
+ if(!result)
fprintf(stderr, "ws: sent PING with payload\n");
- return res;
+ return result;
}
static CURLcode recv_pong(CURL *curl, const char *expected_payload)
@@ -67,11 +67,11 @@ static CURLcode recv_pong(CURL *curl, const char *expected_payload)
size_t rlen = 0;
const struct curl_ws_frame *meta;
char buffer[256];
- CURLcode res;
+ CURLcode result;
retry:
- res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
- if(!res) {
+ result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
+ if(!result) {
/* on small PING content, this example assumes the complete
* PONG content arrives in one go. Larger frames will arrive
* in chunks, however. */
@@ -98,16 +98,16 @@ retry:
goto retry;
}
}
- else if(res == CURLE_AGAIN) { /* blocked on receiving */
+ else if(result == CURLE_AGAIN) { /* blocked on receiving */
fprintf(stderr, "ws: PONG not there yet, waiting a second\n");
sleep(1); /* either select() on socket or max timeout would
be good here. */
goto retry;
}
- if(res)
+ if(result)
fprintf(stderr, "ws: curl_ws_recv returned %u, received %u\n",
- (unsigned int)res, (unsigned int)rlen);
- return res;
+ (unsigned int)result, (unsigned int)rlen);
+ return result;
}
/* close the connection */
@@ -119,28 +119,28 @@ static void websocket_close(CURL *curl)
static CURLcode websocket(CURL *curl)
{
- CURLcode res;
+ CURLcode result;
int i = 0;
do {
- res = ping(curl, "foobar");
- if(res)
+ result = ping(curl, "foobar");
+ if(result)
break;
- res = recv_pong(curl, "foobar");
- if(res)
+ result = recv_pong(curl, "foobar");
+ if(result)
break;
sleep(1);
} while(i++ < 10);
websocket_close(curl);
- return res;
+ return result;
}
int main(int argc, const char *argv[])
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
curl = curl_easy_init();
if(curl) {
@@ -151,20 +151,20 @@ int main(int argc, const char *argv[])
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(curl);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
else {
/* connected and ready */
- res = websocket(curl);
+ result = websocket(curl);
}
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/examples/xmlstream.c+8 -8
@@ -118,9 +118,9 @@ int main(void)
{
CURL *curl;
- CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
- if(res)
- return (int)res;
+ CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+ if(result)
+ return (int)result;
/* Initialize a libcurl handle. */
curl = curl_easy_init();
@@ -146,13 +146,13 @@ int main(void)
printf("Depth Characters Closing Tag\n");
/* Perform the request and any follow-up parsing. */
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
else if(state.ok) {
- /* Expat requires one final call to finalize parsing. */
+ /* Expat requiresult one final call to finalize parsing. */
if(XML_Parse(parser, NULL, 0, 1) == 0) {
enum XML_Error error_code = XML_GetErrorCode(parser);
fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
@@ -173,5 +173,5 @@ int main(void)
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
docs/libcurl/curl_easy_cleanup.md+4 -4
@@ -62,11 +62,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res)
- printf("error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result)
+ printf("error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
}
}
docs/libcurl/curl_easy_duphandle.md+2 -2
@@ -56,11 +56,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
CURL *nother;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
nother = curl_easy_duphandle(curl);
- res = curl_easy_perform(nother);
+ result = curl_easy_perform(nother);
curl_easy_cleanup(nother);
curl_easy_cleanup(curl);
}
docs/libcurl/curl_easy_getinfo.md+5 -5
@@ -413,16 +413,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
char *ct;
/* ask for the content-type */
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
- if((CURLE_OK == res) && ct)
+ if((CURLE_OK == result) && ct)
printf("We received Content-Type: %s\n", ct);
}
docs/libcurl/curl_easy_init.md+2 -2
@@ -60,9 +60,9 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/curl_easy_perform.md+2 -2
@@ -68,9 +68,9 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/curl_easy_recv.md+5 -5
@@ -67,22 +67,22 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ if(result == CURLE_OK) {
char buf[256];
size_t nread;
curl_socket_t sockfd;
/* Extract the socket from the curl handle - we need it for waiting. */
- res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
/* read data */
- res = curl_easy_recv(curl, buf, sizeof(buf), &nread);
+ result = curl_easy_recv(curl, buf, sizeof(buf), &nread);
}
}
}
docs/libcurl/curl_easy_send.md+5 -5
@@ -62,20 +62,20 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ if(result == CURLE_OK) {
curl_socket_t sockfd;
size_t sent;
/* Extract the socket from the curl handle - we need it for waiting. */
- res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
/* send data */
- res = curl_easy_send(curl, "hello", 5, &sent);
+ result = curl_easy_send(curl, "hello", 5, &sent);
}
}
}
docs/libcurl/curl_easy_setopt.md+2 -2
@@ -1356,9 +1356,9 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/curl_easy_ssls_export.md+2 -2
@@ -139,7 +139,7 @@ int main(void)
{
CURLSHcode sh;
CURLSH *share = curl_share_init();
- CURLcode rc;
+ CURLcode result;
CURL *curl;
sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
@@ -156,7 +156,7 @@ int main(void)
curl_easy_perform(curl);
/* export the TLS sessions collected in the share */
- rc = curl_easy_ssls_export(curl, my_export_cb, NULL);
+ result = curl_easy_ssls_export(curl, my_export_cb, NULL);
/* always cleanup */
curl_easy_cleanup(curl);
docs/libcurl/curl_easy_ssls_import.md+2 -2
@@ -53,7 +53,7 @@ int main(void)
{
CURLSHcode sh;
CURLSH *share = curl_share_init();
- CURLcode rc;
+ CURLcode result;
CURL *curl;
sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
@@ -68,7 +68,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SHARE, share);
/* read shmac and sdata from storage */
- rc = curl_easy_ssls_import(curl, NULL, shmac, hlen, sdata, slen);
+ result = curl_easy_ssls_import(curl, NULL, shmac, hlen, sdata, slen);
/* always cleanup */
curl_easy_cleanup(curl);
docs/libcurl/curl_easy_strerror.md+4 -4
@@ -43,14 +43,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
/* set options */
/* Perform the entire transfer */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
}
}
~~~
docs/libcurl/curl_ws_recv.md+13 -11
@@ -74,7 +74,7 @@ int main(void)
{
char buffer[256];
size_t offset = 0;
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "wss://example.com/");
@@ -82,30 +82,32 @@ int main(void)
/* start HTTPS connection and upgrade to WSS, then return control */
curl_easy_perform(curl);
- /* Note: This example neglects fragmented messages. (CURLWS_CONT bit)
- A real application must handle them appropriately. */
+ /* Note: This example neglects fragmented messages.
+ (CURLWS_CONT bit) A real application must handle them
+ appropriately. */
- while(!res) {
+ while(!result) {
size_t recv;
const struct curl_ws_frame *meta;
- res = curl_ws_recv(curl, buffer + offset, sizeof(buffer) - offset, &recv,
- &meta);
+ result = curl_ws_recv(curl, buffer + offset,
+ sizeof(buffer) - offset, &recv,
+ &meta);
offset += recv;
- if(res == CURLE_OK) {
+ if(result == CURLE_OK) {
if(meta->bytesleft == 0)
break; /* finished receiving */
if(meta->bytesleft > sizeof(buffer) - offset)
- res = CURLE_TOO_LARGE;
+ result = CURLE_TOO_LARGE;
}
- if(res == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
/* in real application: wait for socket here, e.g. using select() */
- res = CURLE_OK;
+ result = CURLE_OK;
}
curl_easy_cleanup(curl);
- return (int)res;
+ return (int)result;
}
~~~
docs/libcurl/curl_ws_send.md+9 -8
@@ -88,7 +88,7 @@ int main(void)
{
const char *buffer = "PAYLOAD";
size_t offset = 0;
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "wss://example.com/");
@@ -96,24 +96,25 @@ int main(void)
/* start HTTPS connection and upgrade to WSS, then return control */
curl_easy_perform(curl);
- while(!res) {
+ while(!result) {
size_t sent;
- res = curl_ws_send(curl, buffer + offset, strlen(buffer) - offset, &sent,
- 0, CURLWS_TEXT);
+ result = curl_ws_send(curl, buffer + offset,
+ strlen(buffer) - offset, &sent,
+ 0, CURLWS_TEXT);
offset += sent;
- if(res == CURLE_OK) {
+ if(result == CURLE_OK) {
if(offset == strlen(buffer))
break; /* finished sending */
}
- if(res == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
/* in real application: wait for socket here, e.g. using select() */
- res = CURLE_OK;
+ result = CURLE_OK;
}
curl_easy_cleanup(curl);
- return (int)res;
+ return (int)result;
}
~~~
docs/libcurl/curl_ws_start_frame.md+5 -5
@@ -102,7 +102,7 @@ int main(void)
{
CURL *easy;
struct read_ctx rctx;
- CURLcode res;
+ CURLcode result;
easy = curl_easy_init();
if(!easy)
@@ -118,12 +118,12 @@ int main(void)
curl_easy_setopt(easy, CURLOPT_READDATA, &rctx);
curl_easy_setopt(easy, CURLOPT_UPLOAD, 1L);
- /* Perform the request, res gets the return code */
- res = curl_easy_perform(easy);
+ /* Perform the request, result gets the return code */
+ result = curl_easy_perform(easy);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(easy);
docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md+6 -6
@@ -50,22 +50,22 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_socket_t sockfd;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
return 1;
}
/* Extract the socket from the curl handle */
- res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
- if(!res && sockfd != CURL_SOCKET_BAD) {
+ result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ if(!result && sockfd != CURL_SOCKET_BAD) {
/* operate on sockfd */
}
docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md+5 -5
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double connect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
+ if(CURLE_OK == result) {
printf("Time: %.1f", connect);
}
}
docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md+5 -5
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t connect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
(long)(connect % 1000000));
}
docs/libcurl/opts/CURLINFO_CERTINFO.md+5 -5
@@ -60,7 +60,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
/* connect to any HTTPS site, trusted or not */
@@ -69,14 +69,14 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
int i;
struct curl_certinfo *ci;
- res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+ result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
- if(!res) {
+ if(!result) {
printf("%d certs!\n", ci->num_of_certs);
for(i = 0; i < ci->num_of_certs; i++) {
docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md+5 -5
@@ -46,7 +46,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
@@ -57,13 +57,13 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the time condition */
long unmet;
- res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+ if(!result) {
printf("The time condition was %sfulfilled\n", unmet?"NOT":"");
}
}
docs/libcurl/opts/CURLINFO_CONNECT_TIME.md+5 -5
@@ -43,13 +43,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double connect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
+ if(CURLE_OK == result) {
printf("Time: %.1f", connect);
}
}
docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md+5 -5
@@ -45,13 +45,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t connect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &connect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &connect);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
(long)(connect % 1000000));
}
docs/libcurl/opts/CURLINFO_CONN_ID.md+5 -5
@@ -44,17 +44,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t conn_id;
- res = curl_easy_getinfo(curl, CURLINFO_CONN_ID, &conn_id);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONN_ID, &conn_id);
+ if(!result) {
printf("Connection used: %" CURL_FORMAT_CURL_OFF_T "\n", conn_id);
}
}
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md+5 -5
@@ -44,17 +44,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
double cl;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
+ if(!result) {
printf("Size: %.0f\n", cl);
}
}
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md+6 -5
@@ -41,17 +41,18 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
curl_off_t cl;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
- if(!res) {
+ result =
+ curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
+ if(!result) {
printf("Download size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
}
}
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md+5 -5
@@ -43,17 +43,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the upload */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
double cl;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
+ if(!result) {
printf("Size: %.0f\n", cl);
}
}
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md+5 -5
@@ -40,17 +40,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the upload */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
curl_off_t cl;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
+ if(!result) {
printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
}
}
docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md+5 -5
@@ -49,16 +49,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract the content-type */
char *ct = NULL;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
- if(!res && ct) {
+ result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+ if(!result && ct) {
printf("Content-Type: %s\n", ct);
}
}
docs/libcurl/opts/CURLINFO_COOKIELIST.md+5 -5
@@ -46,19 +46,19 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* enable the cookie engine */
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract all known cookies */
struct curl_slist *cookies = NULL;
- res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
- if(!res && cookies) {
+ result = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
+ if(!result && cookies) {
/* a linked list of cookies in cookie file format */
struct curl_slist *each = cookies;
while(each) {
docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md+5 -5
@@ -51,16 +51,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t amount;
- res = curl_easy_getinfo(curl, CURLINFO_EARLYDATA_SENT_T, &amount);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_EARLYDATA_SENT_T, &amount);
+ if(!result) {
printf("TLS earlydata: %" CURL_FORMAT_CURL_OFF_T " bytes\n", amount);
}
}
docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md+3 -3
@@ -48,12 +48,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *method = NULL;
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_METHOD, &method);
if(method)
docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md+3 -3
@@ -45,11 +45,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *url = NULL;
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
if(url)
docs/libcurl/opts/CURLINFO_FILETIME.md+5 -5
@@ -50,15 +50,15 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Ask for filetime */
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
long filetime = 0;
- res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if((CURLE_OK == res) && (filetime != -1)) {
+ result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+ if((CURLE_OK == result) && (filetime != -1)) {
time_t file_time = (time_t)filetime;
printf("filetime: %s", ctime(&file_time));
}
docs/libcurl/opts/CURLINFO_FILETIME_T.md+5 -5
@@ -51,15 +51,15 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* Ask for filetime */
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
curl_off_t filetime;
- res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
- if((CURLE_OK == res) && (filetime != -1)) {
+ result = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
+ if((CURLE_OK == result) && (filetime != -1)) {
time_t file_time = (time_t)filetime;
printf("filetime: %s", ctime(&file_time));
}
docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md+5 -5
@@ -45,16 +45,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract the entry path */
char *ep = NULL;
- res = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep);
- if(!res && ep) {
+ result = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep);
+ if(!result && ep) {
printf("Entry path was: %s\n", ep);
}
}
docs/libcurl/opts/CURLINFO_HEADER_SIZE.md+5 -5
@@ -43,13 +43,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long size;
- res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
- if(!res)
+ result = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
+ if(!result)
printf("Header size: %ld bytes\n", size);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md+5 -5
@@ -41,16 +41,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract the available authentication types */
long auth;
- res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth);
+ if(!result) {
if(!auth)
printf("No auth available, perhaps no 401?\n");
else {
docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md+5 -5
@@ -42,18 +42,18 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);
curl_easy_setopt(curl, CURLOPT_USERNAME, "shrek");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "swamp");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
long auth;
- res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &auth);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &auth);
+ if(!result) {
if(!auth)
printf("No auth used\n");
else {
docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md+5 -5
@@ -40,16 +40,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* typically CONNECT is used to do HTTPS over HTTP proxies */
curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long code;
- res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code);
- if(!res && code)
+ result = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code);
+ if(!result && code)
printf("The CONNECT response code: %03ld\n", code);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_HTTP_VERSION.md+3 -3
@@ -41,10 +41,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long http_version;
curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &http_version);
}
docs/libcurl/opts/CURLINFO_LASTSOCKET.md+6 -6
@@ -50,22 +50,22 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
long sockfd; /* does not work on win64 */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
- printf("Error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
return 1;
}
/* Extract the socket from the curl handle */
- res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
- if(!res && sockfd != -1) {
+ result = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
+ if(!result && sockfd != -1) {
/* operate on sockfd */
}
docs/libcurl/opts/CURLINFO_LOCAL_IP.md+3 -3
@@ -47,15 +47,15 @@ the corresponding curl handle.
int main(void)
{
char *ip;
- CURLcode res;
+ CURLcode result;
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the transfer */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if((res == CURLE_OK) &&
+ if((result == CURLE_OK) &&
!curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) {
printf("Local IP: %s\n", ip);
}
docs/libcurl/opts/CURLINFO_LOCAL_PORT.md+5 -5
@@ -46,18 +46,18 @@ is returned.
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
long port;
- res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
+ result = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
printf("We used local port: %ld\n", port);
}
}
docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md+5 -5
@@ -44,13 +44,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double namelookup;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup);
+ if(CURLE_OK == result) {
printf("Time: %.1f", namelookup);
}
}
docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md+6 -5
@@ -44,13 +44,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t namelookup;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &namelookup);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T,
+ &namelookup);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", namelookup / 1000000,
(long)(namelookup % 1000000));
}
docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md+5 -5
@@ -42,14 +42,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long connects;
- res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects);
- if(!res)
+ result = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects);
+ if(!result)
printf("It needed %ld connects\n", connects);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_OS_ERRNO.md+5 -5
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res != CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result != CURLE_OK) {
long error;
- res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
- if(!res && error) {
+ result = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
+ if(!result && error) {
printf("Errno: %ld\n", error);
}
}
docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md+5 -5
@@ -45,14 +45,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
curl_off_t posttransfer;
- res = curl_easy_getinfo(curl, CURLINFO_POSTTRANSFER_TIME_T,
+ result = curl_easy_getinfo(curl, CURLINFO_POSTTRANSFER_TIME_T,
&posttransfer);
- if(CURLE_OK == res) {
+ if(CURLE_OK == result) {
printf("Request sent after: %" CURL_FORMAT_CURL_OFF_T ".%06ld s",
posttransfer / 1000000, (long)(posttransfer % 1000000));
}
docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md+6 -5
@@ -49,13 +49,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double pretransfer;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &pretransfer);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
+ &pretransfer);
+ if(CURLE_OK == result) {
printf("Time: %.1f", pretransfer);
}
}
docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md+6 -5
@@ -49,13 +49,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t pretransfer;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T, &pretransfer);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T,
+ &pretransfer);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld\n",
pretransfer / 1000000,
(long)(pretransfer % 1000000));
docs/libcurl/opts/CURLINFO_PRIMARY_IP.md+3 -3
@@ -47,15 +47,15 @@ the corresponding curl handle.
int main(void)
{
char *ip;
- CURLcode res;
+ CURLcode result;
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the transfer */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if((res == CURLE_OK) &&
+ if((result == CURLE_OK) &&
!curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip) && ip) {
printf("IP: %s\n", ip);
}
docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md+5 -5
@@ -50,13 +50,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long port;
- res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port);
- if(!res)
+ result = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port);
+ if(!result)
printf("Connected to remote port: %ld\n", port);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_PRIVATE.md+5 -5
@@ -41,19 +41,19 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
void *pointer = (void *)0x2345454;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* set the private pointer */
curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* extract the private pointer again */
- res = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
+ result = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
- if(res)
- printf("error: %s\n", curl_easy_strerror(res));
+ if(result)
+ printf("error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLINFO_PROTOCOL.md+3 -3
@@ -53,10 +53,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long scheme;
curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &scheme);
}
docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md+5 -5
@@ -41,17 +41,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract the available proxy authentication types */
long auth;
- res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth);
+ if(!result) {
if(!auth)
printf("No proxy auth available, perhaps no 407?\n");
else {
docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md+5 -5
@@ -43,7 +43,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXYAUTH,
@@ -51,12 +51,12 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "shrek");
curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "swamp");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
long auth;
- res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &auth);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &auth);
+ if(!result) {
if(!auth)
printf("No auth used\n");
else {
docs/libcurl/opts/CURLINFO_PROXY_ERROR.md+5 -5
@@ -81,15 +81,15 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://127.0.0.1");
- res = curl_easy_perform(curl);
- if(res == CURLE_PROXY) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_PROXY) {
long proxycode;
- res = curl_easy_getinfo(curl, CURLINFO_PROXY_ERROR, &proxycode);
- if(!res && proxycode)
+ result = curl_easy_getinfo(curl, CURLINFO_PROXY_ERROR, &proxycode);
+ if(!result && proxycode)
printf("The detailed proxy error: %ld\n", proxycode);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md+7 -7
@@ -46,22 +46,22 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
long verifyresult;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
- res = curl_easy_perform(curl);
- if(res) {
- printf("error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result) {
+ printf("error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
return 1;
}
- res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
- &verifyresult);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
+ &verifyresult);
+ if(!result) {
printf("The peer verification said %s\n",
(verifyresult ? "bad" : "fine"));
}
docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md+5 -5
@@ -45,13 +45,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t queue;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
+ if(CURLE_OK == result) {
printf("Queued: %" CURL_FORMAT_CURL_OFF_T ".%06ld us", queue / 1000000,
(long)(queue % 1000000));
}
docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md+3 -3
@@ -41,11 +41,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long redirects;
curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects);
}
docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md+5 -5
@@ -46,13 +46,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double redirect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect);
+ if(CURLE_OK == result) {
printf("Time: %.1f", redirect);
}
}
docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md+5 -5
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t redirect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", redirect / 1000000,
(long)(redirect % 1000000));
}
docs/libcurl/opts/CURLINFO_REDIRECT_URL.md+3 -3
@@ -47,10 +47,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *url = NULL;
curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &url);
if(url)
docs/libcurl/opts/CURLINFO_REFERER.md+3 -3
@@ -44,11 +44,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *hdr = NULL;
curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
if(hdr)
docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md+5 -5
@@ -41,13 +41,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long req;
- res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
- if(!res)
+ result = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
+ if(!result)
printf("Request size: %ld bytes\n", req);
}
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md+3 -3
@@ -47,10 +47,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
}
docs/libcurl/opts/CURLINFO_RETRY_AFTER.md+3 -3
@@ -54,10 +54,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
curl_off_t wait = 0;
curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &wait);
if(wait)
docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md+3 -3
@@ -41,10 +41,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long cseq;
curl_easy_getinfo(curl, CURLINFO_RTSP_CLIENT_CSEQ, &cseq);
}
docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md+3 -3
@@ -41,10 +41,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long cseq;
curl_easy_getinfo(curl, CURLINFO_RTSP_CSEQ_RECV, &cseq);
}
docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md+3 -3
@@ -45,10 +45,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
long cseq;
curl_easy_getinfo(curl, CURLINFO_RTSP_SERVER_CSEQ, &cseq);
}
docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md+3 -3
@@ -46,10 +46,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *id;
curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
}
docs/libcurl/opts/CURLINFO_SCHEME.md+3 -3
@@ -50,10 +50,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
char *scheme = NULL;
curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme);
if(scheme)
docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md+5 -5
@@ -47,17 +47,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
double dl;
- res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl);
+ if(!result) {
printf("Downloaded %.0f bytes\n", dl);
}
}
docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md+5 -5
@@ -44,17 +44,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* check the size */
curl_off_t dl;
- res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
+ if(!result) {
printf("Downloaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", dl);
}
}
docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md+5 -5
@@ -44,16 +44,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
double ul;
- res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
+ if(!result) {
printf("Uploaded %.0f bytes\n", ul);
}
}
docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md+5 -5
@@ -41,16 +41,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t ul;
- res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
+ if(!result) {
printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", ul);
}
}
docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md+5 -5
@@ -44,16 +44,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
double speed;
- res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
+ if(!result) {
printf("Download speed %.0f bytes/sec\n", speed);
}
}
docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md+5 -5
@@ -41,16 +41,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t speed;
- res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
+ if(!result) {
printf("Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n",
speed);
}
docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md+5 -5
@@ -42,16 +42,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
double speed;
- res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
+ if(!result) {
printf("Upload speed %.0f bytes/sec\n", speed);
}
}
docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md+5 -5
@@ -40,16 +40,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t speed;
- res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
+ if(!result) {
printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed);
}
}
docs/libcurl/opts/CURLINFO_SSL_ENGINES.md+3 -3
@@ -46,10 +46,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_slist *engines;
- res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
- if((res == CURLE_OK) && engines) {
+ result = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
+ if((result == CURLE_OK) && engines) {
/* we have a list, free it when done using it */
curl_slist_free_all(engines);
}
docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md+7 -7
@@ -46,21 +46,21 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
long verifyresult;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res) {
- printf("error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result) {
+ printf("error: %s\n", curl_easy_strerror(result));
curl_easy_cleanup(curl);
return 1;
}
- res = curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
- &verifyresult);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
+ &verifyresult);
+ if(!result) {
printf("The peer verification said %s\n",
(verifyresult ? "bad" : "fine"));
}
docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md+5 -5
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double start;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
+ if(CURLE_OK == result) {
printf("Time: %.1f", start);
}
}
docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md+5 -5
@@ -48,13 +48,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t start;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T, &start);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T, &start);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", start / 1000000,
(long)(start % 1000000));
}
docs/libcurl/opts/CURLINFO_TLS_SESSION.md+4 -4
@@ -68,12 +68,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_tlssessioninfo *tls;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(res)
- printf("error: %s\n", curl_easy_strerror(res));
+ result = curl_easy_perform(curl);
+ if(result)
+ printf("error: %s\n", curl_easy_strerror(result));
curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tls);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md+5 -5
@@ -133,8 +133,8 @@ CURL *curl;
static size_t wf(void *ptr, size_t size, size_t nmemb, void *stream)
{
const struct curl_tlssessioninfo *info = NULL;
- CURLcode res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &info);
- if(info && !res) {
+ CURLcode result = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &info);
+ if(info && !result) {
if(CURLSSLBACKEND_OPENSSL == info->backend) {
printf("OpenSSL ver. %s\n", SSL_get_version((SSL*)info->internals));
}
@@ -144,15 +144,15 @@ static size_t wf(void *ptr, size_t size, size_t nmemb, void *stream)
int main(int argc, char **argv)
{
- CURLcode res;
+ CURLcode result;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wf);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
- return res;
+ return result;
}
~~~
docs/libcurl/opts/CURLINFO_TOTAL_TIME.md+5 -5
@@ -45,13 +45,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
double total;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
+ if(CURLE_OK == result) {
printf("Time: %.1f", total);
}
}
docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md+5 -5
@@ -45,13 +45,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_off_t total;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
- res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
+ if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", total / 1000000,
(long)(total % 1000000));
}
docs/libcurl/opts/CURLINFO_USED_PROXY.md+5 -5
@@ -41,18 +41,18 @@ int main(int argc, char *argv[])
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80");
curl_easy_setopt(curl, CURLOPT_NOPROXY, "example.com");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
/* extract the available proxy authentication types */
long used;
- res = curl_easy_getinfo(curl, CURLINFO_USED_PROXY, &used);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_USED_PROXY, &used);
+ if(!result) {
printf("The proxy was %sused\n", used ? "" : "NOT ");
}
}
docs/libcurl/opts/CURLINFO_XFER_ID.md+5 -5
@@ -45,16 +45,16 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
curl_off_t xfer_id;
- res = curl_easy_getinfo(curl, CURLINFO_XFER_ID, &xfer_id);
- if(!res) {
+ result = curl_easy_getinfo(curl, CURLINFO_XFER_ID, &xfer_id);
+ if(!result) {
printf("Transfer ID: %" CURL_FORMAT_CURL_OFF_T "\n", xfer_id);
}
}
docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md+2 -2
@@ -43,12 +43,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
long my_scope_id;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
my_scope_id = if_nametoindex("eth0");
curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_AUTOREFERER.md+2 -2
@@ -53,7 +53,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* follow redirects */
@@ -62,7 +62,7 @@ int main(void)
/* set Referer: automatically when following redirects */
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_BUFFERSIZE.md+2 -2
@@ -63,13 +63,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin");
/* ask libcurl to allocate a larger receive buffer */
curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 120000L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md+2 -2
@@ -65,14 +65,14 @@ int main(void)
char *strpem = "PEMDATA"; /* strpem must point to a PEM string */
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
blob.data = strpem;
blob.len = strlen(strpem);
blob.flags = CURL_BLOB_COPY;
curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_CAPATH.md+2 -2
@@ -63,10 +63,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/cert-dir");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_CERTINFO.md+5 -5
@@ -53,7 +53,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
/* connect to any HTTPS site, trusted or not */
@@ -62,13 +62,13 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
- if(!res) {
+ if(!result) {
struct curl_certinfo *ci;
- res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+ result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
- if(!res) {
+ if(!result) {
int i;
printf("%d certs!\n", ci->num_of_certs);
docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md+3 -3
@@ -65,11 +65,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
- ret = curl_easy_perform(curl);
- if(ret == CURLE_OK) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_OK) {
/* only connected */
}
}
docs/libcurl/opts/CURLOPT_COOKIEFILE.md+2 -2
@@ -78,13 +78,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* get cookies from an existing file */
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_COOKIEJAR.md+2 -2
@@ -75,13 +75,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* export cookies to this file when closing the handle */
curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "/tmp/cookies.txt");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* close the handle, write the cookies */
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLOPT_COOKIESESSION.md+2 -2
@@ -51,7 +51,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* new "session", do not load session cookies */
@@ -60,7 +60,7 @@ int main(void)
/* get the (non session) cookies from this file */
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_CRLF.md+2 -2
@@ -45,10 +45,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_CRLFILE.md+2 -2
@@ -72,10 +72,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_CRLFILE, "/etc/certs/crl.pem");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_CURLU.md+2 -2
@@ -57,13 +57,13 @@ int main(void)
CURL *curl = curl_easy_init();
CURLU *urlp = curl_url();
if(curl) {
- CURLcode res;
+ CURLcode result;
CURLUcode ret;
ret = curl_url_set(urlp, CURLUPART_URL, "https://example.com", 0);
curl_easy_setopt(curl, CURLOPT_CURLU, urlp);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_url_cleanup(urlp);
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md+2 -2
@@ -119,13 +119,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* DELETE the given path */
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_DEBUGDATA.md+2 -2
@@ -57,7 +57,7 @@ static int my_trace(CURL *handle, curl_infotype type,
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
struct data my_tracedata;
curl = curl_easy_init();
@@ -70,7 +70,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md+4 -4
@@ -186,7 +186,7 @@ int my_trace(CURL *handle, curl_infotype type,
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
curl = curl_easy_init();
if(curl) {
@@ -199,11 +199,11 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* Check for errors */
- if(res != CURLE_OK)
+ if(result != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
- curl_easy_strerror(res));
+ curl_easy_strerror(result));
/* always cleanup */
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLOPT_DIRLISTONLY.md+2 -2
@@ -63,13 +63,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/");
/* list only */
curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md+3 -3
@@ -68,17 +68,17 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* only reuse addresses for a short time */
curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 2L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* in this second request, the cache is not be used if more than
two seconds have passed since the previous name resolve */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md+2 -2
@@ -52,10 +52,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_DNS_INTERFACE, "eth0");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md+2 -2
@@ -51,10 +51,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, "192.168.0.14");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md+2 -2
@@ -51,10 +51,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_DNS_SERVERS.md+2 -2
@@ -55,11 +55,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_DNS_SERVERS,
"192.168.1.100:53,192.168.1.101");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md+2 -2
@@ -49,11 +49,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* switch off the use of a global, thread-unsafe, cache */
curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_ERRORBUFFER.md+5 -5
@@ -69,7 +69,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
char errbuf[CURL_ERROR_SIZE];
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
@@ -81,20 +81,20 @@ int main(void)
errbuf[0] = 0;
/* perform the request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* if the request did not complete correctly, show the error
information. if no detailed error information was written to errbuf
show the more generic information from curl_easy_strerror instead.
*/
- if(res != CURLE_OK) {
+ if(result != CURLE_OK) {
size_t len = strlen(errbuf);
- fprintf(stderr, "\nlibcurl: (%d) ", res);
+ fprintf(stderr, "\nlibcurl: (%d) ", result);
if(len)
fprintf(stderr, "%s%s", errbuf,
((errbuf[len - 1] != '\n') ? "\n" : ""));
else
- fprintf(stderr, "%s\n", curl_easy_strerror(res));
+ fprintf(stderr, "%s\n", curl_easy_strerror(result));
}
}
}
docs/libcurl/opts/CURLOPT_FAILONERROR.md+3 -3
@@ -55,11 +55,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
- ret = curl_easy_perform(curl);
- if(ret == CURLE_HTTP_RETURNED_ERROR) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_HTTP_RETURNED_ERROR) {
/* an HTTP response error problem */
}
}
docs/libcurl/opts/CURLOPT_FILETIME.md+5 -5
@@ -49,15 +49,15 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/path.html");
/* Ask for filetime */
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
- res = curl_easy_perform(curl);
- if(CURLE_OK == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OK == result) {
long filetime;
- res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if((CURLE_OK == res) && (filetime >= 0)) {
+ result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+ if((CURLE_OK == result) && (filetime >= 0)) {
time_t file_time = (time_t)filetime;
printf("filetime: %s", ctime(&file_time));
}
docs/libcurl/opts/CURLOPT_FTPPORT.md+2 -2
@@ -80,11 +80,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
curl_easy_setopt(curl, CURLOPT_FTPPORT, "-");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md+2 -2
@@ -57,12 +57,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
/* funny server, ask for SSL before TLS */
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md+2 -2
@@ -49,12 +49,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md+2 -2
@@ -51,10 +51,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md+2 -2
@@ -63,13 +63,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/non-existing/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
CURLFTP_CREATE_DIR_RETRY);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md+2 -2
@@ -66,11 +66,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md+2 -2
@@ -52,12 +52,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
/* please ignore the IP in the PASV response */
curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md+2 -2
@@ -59,12 +59,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
/* go back to clear-text FTP after authenticating */
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md+2 -2
@@ -51,7 +51,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
/* contact us back, aka "active" FTP */
@@ -60,7 +60,7 @@ int main(void)
/* FTP the way the neanderthals did it */
curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md+2 -2
@@ -51,14 +51,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
/* let's shut off this modern feature */
curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md+2 -2
@@ -44,14 +44,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
/* a drftpd server, do it */
curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md+2 -2
@@ -47,12 +47,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* delegate if okayed by policy */
curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION,
CURLGSSAPI_DELEGATION_POLICY_FLAG);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md+2 -2
@@ -48,10 +48,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md+2 -2
@@ -53,10 +53,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HAPROXY_CLIENT_IP, "1.1.1.1");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HEADEROPT.md+2 -2
@@ -54,7 +54,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
struct curl_slist *list;
list = curl_slist_append(NULL, "Shoesize: 10");
list = curl_slist_append(list, "Accept:");
@@ -66,7 +66,7 @@ int main(void)
libcurl to not send the custom headers to the proxy. Keep them
separate. */
curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_slist_free_all(list);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md+2 -2
@@ -85,7 +85,7 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
struct priv my_stuff;
- CURLcode res;
+ CURLcode result;
/* set HSTS read callback */
curl_easy_setopt(curl, CURLOPT_HSTSREADFUNCTION, hsts_cb);
@@ -93,7 +93,7 @@ int main(void)
/* pass in suitable argument to the callback */
curl_easy_setopt(curl, CURLOPT_HSTSREADDATA, &my_stuff);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md+2 -2
@@ -89,7 +89,7 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
struct priv my_stuff;
- CURLcode res;
+ CURLcode result;
/* set HSTS read callback */
curl_easy_setopt(curl, CURLOPT_HSTSWRITEFUNCTION, hswr_cb);
@@ -97,7 +97,7 @@ int main(void)
/* pass in suitable argument to the callback */
curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &my_stuff);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md+2 -2
@@ -45,10 +45,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HTTPAUTH.md+2 -2
@@ -134,12 +134,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* allow whatever auth the server speaks */
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md+2 -2
@@ -46,10 +46,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md+2 -2
@@ -44,10 +44,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_HTTP_VERSION.md+3 -3
@@ -105,11 +105,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
- ret = curl_easy_perform(curl);
- if(ret == CURLE_HTTP_RETURNED_ERROR) {
+ result = curl_easy_perform(curl);
+ if(result == CURLE_HTTP_RETURNED_ERROR) {
/* an HTTP response error problem */
}
}
docs/libcurl/opts/CURLOPT_INTERFACE.md+2 -2
@@ -67,12 +67,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_INTERFACE, "eth0");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_IPRESOLVE.md+2 -2
@@ -62,13 +62,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* of all addresses example.com resolves to, only IPv6 ones are used */
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_ISSUERCERT.md+2 -2
@@ -65,10 +65,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_ISSUERCERT, "/etc/certs/cacert.pem");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md+2 -2
@@ -72,14 +72,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
blob.data = certificateData;
blob.len = filesize;
blob.flags = CURL_BLOB_COPY;
curl_easy_setopt(curl, CURLOPT_ISSUERCERT_BLOB, &blob);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md+2 -2
@@ -51,11 +51,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "sending data");
curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 1L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_KEYPASSWD.md+2 -2
@@ -55,12 +55,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "superman");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_KRBLEVEL.md+2 -2
@@ -52,10 +52,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_KRBLEVEL, "private");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_LOCALPORT.md+2 -2
@@ -45,12 +45,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
/* and try 20 more ports following that */
curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md+2 -2
@@ -48,12 +48,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
/* and try 20 more ports following that */
curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md+2 -2
@@ -64,10 +64,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md+3 -3
@@ -47,13 +47,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* abort if slower than 30 bytes/sec during 60 seconds */
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
- res = curl_easy_perform(curl);
- if(CURLE_OPERATION_TIMEDOUT == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OPERATION_TIMEDOUT == result) {
printf("Timeout.\n");
}
/* always cleanup */
docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md+3 -3
@@ -44,13 +44,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* abort if slower than 30 bytes/sec during 60 seconds */
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
- res = curl_easy_perform(curl);
- if(CURLE_OPERATION_TIMEDOUT == res) {
+ result = curl_easy_perform(curl);
+ if(CURLE_OPERATION_TIMEDOUT == result) {
printf("Timeout.\n");
}
/* always cleanup */
docs/libcurl/opts/CURLOPT_MAIL_AUTH.md+2 -2
@@ -61,10 +61,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, "<secret@cave>");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_MAIL_FROM.md+2 -2
@@ -57,10 +57,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, "[email protected]");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_MAIL_RCPT.md+2 -2
@@ -67,14 +67,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_slist *list;
list = curl_slist_append(NULL, "root@localhost");
list = curl_slist_append(list, "[email protected]");
list = curl_slist_append(list, "<[email protected]> NOTIFY=SUCCESS");
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_slist_free_all(list);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md+2 -2
@@ -55,7 +55,7 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
struct curl_slist *list;
- CURLcode res;
+ CURLcode result;
/* Adding one valid and one invalid email address */
list = curl_slist_append(NULL, "[email protected]");
@@ -64,7 +64,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT_ALLOWFAILS, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_slist_free_all(list);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_MAXCONNECTS.md+2 -2
@@ -58,11 +58,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* limit the connection cache for this handle to no more than 3 */
curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_MAXFILESIZE.md+2 -2
@@ -54,11 +54,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* refuse to download if larger than 1000 bytes */
curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 1000L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md+2 -2
@@ -55,12 +55,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_off_t ridiculous = (curl_off_t)1 << 48;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* refuse to download if larger than ridiculous */
curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, ridiculous);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md+2 -2
@@ -53,11 +53,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* cap the download speed to 31415 bytes/sec */
curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)31415);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md+2 -2
@@ -54,12 +54,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* cap the upload speed to 1000 bytes/sec */
curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)1000);
/* (set some upload options as well) */
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_NETRC.md+2 -2
@@ -131,10 +131,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_NETRC_FILE.md+2 -2
@@ -51,11 +51,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/tmp/magic-netrc");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md+2 -2
@@ -48,12 +48,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"sftp://upload.example.com/newdir/file.zip");
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, 0644L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md+2 -2
@@ -46,10 +46,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://upload.example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, 0664L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_NOSIGNAL.md+2 -2
@@ -56,12 +56,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md+2 -2
@@ -63,7 +63,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
extern int sockfd; /* the already connected one */
/* libcurl thinks that you connect to the host
@@ -76,7 +76,7 @@ int main(void)
/* call this function to set options for the socket */
curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md+2 -2
@@ -111,7 +111,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
extern int sockfd; /* the already connected one */
/* libcurl thinks that you connect to the host
* and port that you specify in the URL option. */
@@ -123,7 +123,7 @@ int main(void)
/* call this function to set options for the socket */
curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_PASSWORD.md+2 -2
@@ -53,12 +53,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "qwerty");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_PORT.md+2 -2
@@ -55,10 +55,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PORT, 8080L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_POST.md+2 -2
@@ -81,13 +81,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_POST, 1L);
/* set up the read callback with CURLOPT_READFUNCTION */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_POSTQUOTE.md+2 -2
@@ -56,13 +56,13 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
/* pass in the FTP commands to run after the transfer */
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, cmdlist);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_PREQUOTE.md+2 -2
@@ -57,13 +57,13 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
/* pass in the FTP commands to run */
curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_PROXYAUTH.md+2 -2
@@ -53,7 +53,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* use this proxy */
curl_easy_setopt(curl, CURLOPT_PROXY, "http://local.example.com:1080");
@@ -61,7 +61,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
/* set the proxy credentials */
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "james:007");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md+2 -2
@@ -53,12 +53,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXYPORT.md+2 -2
@@ -54,11 +54,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "localhost");
curl_easy_setopt(curl, CURLOPT_PROXYPORT, 8080L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXYTYPE.md+2 -2
@@ -81,12 +81,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080");
/* set the proxy type */
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md+2 -2
@@ -53,12 +53,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md+2 -2
@@ -55,11 +55,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "clark%20kent:superman");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md+2 -2
@@ -69,12 +69,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* using an HTTPS proxy */
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md+2 -2
@@ -69,7 +69,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* using an HTTPS proxy */
@@ -78,7 +78,7 @@ int main(void)
blob.len = strlen(strpem);
blob.flags = CURL_BLOB_COPY;
curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO_BLOB, &blob);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md+2 -2
@@ -61,12 +61,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* using an HTTPS proxy */
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md+2 -2
@@ -71,11 +71,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80");
curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md+2 -2
@@ -67,12 +67,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* using an HTTPS proxy */
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT, "/etc/certs/cacert.pem");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md+2 -2
@@ -73,7 +73,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* using an HTTPS proxy */
@@ -82,7 +82,7 @@ int main(void)
blob.len = filesize;
blob.flags = CURL_BLOB_COPY;
curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT_BLOB, &blob);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md+2 -2
@@ -59,11 +59,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md+2 -2
@@ -51,10 +51,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md+2 -2
@@ -62,13 +62,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md+2 -2
@@ -58,14 +58,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md+2 -2
@@ -62,7 +62,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
blob.data = certificateData;
blob.len = filesize;
@@ -72,7 +72,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md+2 -2
@@ -62,13 +62,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md+2 -2
@@ -51,14 +51,14 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md+2 -2
@@ -59,7 +59,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
@@ -73,7 +73,7 @@ int main(void)
blob.len = privateKeySize;
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY_BLOB, &blob);
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md+2 -2
@@ -75,13 +75,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost");
curl_easy_setopt(curl, CURLOPT_PROXY_SSL_CIPHER_LIST,
"ECDHE-ECDSA-CHACHA20-POLY1305:"
"ECDHE-RSA-CHACHA20-POLY1305");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md+2 -2
@@ -104,13 +104,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
/* weaken TLS only for use with silly proxies */
curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md+2 -2
@@ -70,11 +70,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY_TLS13_CIPHERS,
"TLS_CHACHA20_POLY1305_SHA256");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md+2 -2
@@ -56,13 +56,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md+2 -2
@@ -63,13 +63,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md+2 -2
@@ -56,13 +56,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md+2 -2
@@ -48,13 +48,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:80");
curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L);
curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_QUICK_EXIT.md+2 -2
@@ -47,9 +47,9 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_QUOTE.md+2 -2
@@ -147,13 +147,13 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
/* pass in the FTP commands to run before the transfer */
curl_easy_setopt(curl, CURLOPT_QUOTE, cmdlist);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md+2 -2
@@ -45,10 +45,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 1234L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md+2 -2
@@ -121,11 +121,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
/* ask for options */
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md+2 -2
@@ -44,10 +44,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, 1234L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md+2 -2
@@ -52,11 +52,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
char *prev_id = "old"; /* saved from before somehow */
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md+2 -2
@@ -56,11 +56,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI,
"rtsp://foo.example.com/twister/video");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md+2 -2
@@ -48,12 +48,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT,
"RTP/AVP;unicast;client_port=4588-4589");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md+2 -2
@@ -59,12 +59,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SASL_IR.md+2 -2
@@ -56,10 +56,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md+2 -2
@@ -54,11 +54,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
/* wait no more than 23 seconds */
curl_easy_setopt(curl, CURLOPT_SERVER_RESPONSE_TIMEOUT, 23L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md+2 -2
@@ -59,11 +59,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
/* wait no more than 237 milliseconds */
curl_easy_setopt(curl, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS, 237L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_SERVICE_NAME.md+2 -2
@@ -56,10 +56,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode ret;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom");
- ret = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
}
}
~~~
docs/libcurl/opts/CURLOPT_SHARE.md+3 -3
@@ -57,21 +57,21 @@ int main(void)
CURL *curl = curl_easy_init();
CURL *curl2 = curl_easy_init(); /* a second handle */
if(curl) {
- CURLcode res;
+ CURLcode result;
CURLSH *shobject = curl_share_init();
curl_share_setopt(shobject, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
curl_easy_setopt(curl, CURLOPT_SHARE, shobject);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
/* the second handle shares cookies from the first */
curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/second");
curl_easy_setopt(curl2, CURLOPT_COOKIEFILE, "");
curl_easy_setopt(curl2, CURLOPT_SHARE, shobject);
- res = curl_easy_perform(curl2);
+ result = curl_easy_perform(curl2);
curl_easy_cleanup(curl2);
curl_share_cleanup(shobject);
docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md+2 -2
@@ -51,7 +51,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
int recvbuffersize = 256 * 1024;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -60,7 +60,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &recvbuffersize);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md+2 -2
@@ -105,7 +105,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
int sockfd; /* our custom file descriptor */
/* libcurl thinks that you connect to the host
* and port that you specify in the URL option. */
@@ -117,7 +117,7 @@ int main(void)
/* call this function to set options for the socket */
curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md+2 -2
@@ -45,11 +45,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy");
curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md+2 -2
@@ -49,11 +49,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy");
curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE, "rcmd-special");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md+2 -2
@@ -50,11 +50,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES,
CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md+2 -2
@@ -56,11 +56,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
"afe17cd62a0f3b61f1ab9cb22ba269a7");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md+2 -2
@@ -52,11 +52,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256,
"NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ=");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md+2 -2
@@ -58,11 +58,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS,
"/home/clarkkent/.ssh/known_hosts");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md+2 -2
@@ -57,12 +57,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE,
"/home/clarkkent/.ssh/id_rsa");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "password");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md+2 -2
@@ -53,11 +53,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE,
"/home/clarkkent/.ssh/id_rsa.pub");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLCERT.md+2 -2
@@ -66,12 +66,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md+2 -2
@@ -58,13 +58,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md+2 -2
@@ -62,7 +62,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob stblob;
stblob.data = certificateData;
stblob.len = filesize;
@@ -71,7 +71,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSLCERT_BLOB, &stblob);
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "P12");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLENGINE.md+2 -2
@@ -56,10 +56,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md+2 -2
@@ -46,11 +46,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");
curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLKEY.md+2 -2
@@ -60,12 +60,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md+2 -2
@@ -63,13 +63,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md+2 -2
@@ -61,7 +61,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_blob blob;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
blob.data = certificateData;
@@ -75,7 +75,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSLKEY_BLOB, &blob);
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md+2 -2
@@ -80,12 +80,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST,
"ECDHE-ECDSA-CHACHA20-POLY1305:"
"ECDHE-RSA-CHACHA20-POLY1305");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md+4 -4
@@ -82,7 +82,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
/* CA cert in PEM format, replace the XXXs */
char *mypem =
"-----BEGIN CERTIFICATE-----\n"
@@ -103,15 +103,15 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, mypem);
- res = curl_easy_perform(curl);
- if(!res)
+ result = curl_easy_perform(curl);
+ if(!result)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
~~~
docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md+4 -4
@@ -135,7 +135,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
int main(void)
{
CURL *curl;
- CURLcode res;
+ CURLcode result;
/* CA cert in PEM format, replace the XXXs */
char *mypem =
"-----BEGIN CERTIFICATE-----\n"
@@ -156,15 +156,15 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, mypem);
- res = curl_easy_perform(curl);
- if(!res)
+ result = curl_easy_perform(curl);
+ if(!result)
printf("*** transfer succeeded ***\n");
else
printf("*** transfer failed ***\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return (int)result;
}
~~~
docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md+2 -2
@@ -53,10 +53,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_EC_CURVES, "X25519:P-521");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md+2 -2
@@ -45,10 +45,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md+2 -2
@@ -47,10 +47,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md+2 -2
@@ -118,12 +118,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* weaken TLS only for use with silly servers */
curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md+2 -2
@@ -50,11 +50,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* switch off session-id use */
curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md+2 -2
@@ -60,11 +60,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_SIGNATURE_ALGORITHMS,
"DSA+SHA256:rsa_pss_pss_sha256");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md+2 -2
@@ -51,11 +51,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* ask for OCSP stapling */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md+2 -2
@@ -51,13 +51,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
struct curl_slist *options;
options = curl_slist_append(NULL, "TTTYPE=vt100");
options = curl_slist_append(options, "USER=foobar");
curl_easy_setopt(curl, CURLOPT_URL, "telnet://example.com/");
curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, options);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(options);
}
docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md+2 -2
@@ -45,11 +45,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage");
/* try using larger blocks */
curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md+2 -2
@@ -70,11 +70,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_TLS13_CIPHERS,
"TLS_CHACHA20_POLY1305_SHA256");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md+2 -2
@@ -56,12 +56,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md+2 -2
@@ -60,12 +60,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md+2 -2
@@ -55,12 +55,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md+3 -3
@@ -78,7 +78,7 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
/* Set the URL of the request */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -91,13 +91,13 @@ int main(void)
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Trailer: My-super-awesome-trailer");
- res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+ result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
/* Set the trailers filling callback */
curl_easy_setopt(curl, CURLOPT_TRAILERFUNCTION, trailer_cb);
/* Perform the transfer */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md+2 -2
@@ -48,10 +48,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/textfile");
curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md+2 -2
@@ -59,13 +59,13 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin");
/* ask libcurl to allocate a larger upload buffer */
curl_easy_setopt(curl, CURLOPT_UPLOAD_BUFFERSIZE, 120000L);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_USERNAME.md+2 -2
@@ -70,12 +70,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_USERNAME, "clark");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_USERPWD.md+2 -2
@@ -79,12 +79,12 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_USERPWD, "clark:kent");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md+2 -2
@@ -107,7 +107,7 @@ static size_t cb(char *data, size_t size, size_t nmemb, void *clientp)
int main(void)
{
struct memory chunk = { 0 };
- CURLcode res;
+ CURLcode result;
CURL *curl = curl_easy_init();
if(curl) {
/* send all data to this function */
@@ -117,7 +117,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
/* send a request */
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
/* remember to free the buffer */
free(chunk.response);
docs/libcurl/opts/CURLOPT_WS_OPTIONS.md+2 -2
@@ -64,11 +64,11 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ws://example.com/");
/* tell curl we deal with all the WebSocket magic ourselves */
curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE);
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md+2 -2
@@ -56,10 +56,10 @@ int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
- CURLcode res;
+ CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "pop3://example.com/");
curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "1ab9cb22bf269a7");
- res = curl_easy_perform(curl);
+ result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}