From: Daniel Stenberg Date: Tue, 16 Dec 2025 14:54:06 +0000 (+0100) Subject: docs: rename CURLcode variables to 'result' X-Git-Tag: rc-8_18_0-3~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09f01f28eca7edb9384ff85f778d33f399555ae6;p=thirdparty%2Fcurl.git docs: rename CURLcode variables to 'result' --- diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c index 1d680dc0b0..e5cd1f1ad9 100644 --- a/docs/examples/10-at-a-time.c +++ b/docs/examples/10-at-a-time.c @@ -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) { diff --git a/docs/examples/address-scope.c b/docs/examples/address-scope.c index adfcf2789b..dba6c8f773 100644 --- a/docs/examples/address-scope.c +++ b/docs/examples/address-scope.c @@ -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 diff --git a/docs/examples/altsvc.c b/docs/examples/altsvc.c index 99b92c0157..bb813aa3f7 100644 --- a/docs/examples/altsvc.c +++ b/docs/examples/altsvc.c @@ -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; } diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index a8f179e8e7..cdc0ad9e5f 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -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; } diff --git a/docs/examples/block_ip.c b/docs/examples/block_ip.c index 04223ddd03..3515acfad7 100644 --- a/docs/examples/block_ip.c +++ b/docs/examples/block_ip.c @@ -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 */ diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index b37cd6f414..786ae00d5a 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -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; } diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c index e799cfc928..7dfa8e99c9 100644 --- a/docs/examples/certinfo.c +++ b/docs/examples/certinfo.c @@ -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; } diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c index 962180a560..3e8181e16f 100644 --- a/docs/examples/chkspeed.c +++ b/docs/examples/chkspeed.c @@ -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 */ diff --git a/docs/examples/connect-to.c b/docs/examples/connect-to.c index 3353c6a6c2..d401fca662 100644 --- a/docs/examples/connect-to.c +++ b/docs/examples/connect-to.c @@ -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; } diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c index 0398cdf164..e894f19665 100644 --- a/docs/examples/cookie_interface.c +++ b/docs/examples/cookie_interface.c @@ -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; } diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c index d153cc21c5..2b199be116 100644 --- a/docs/examples/crawler.c +++ b/docs/examples/crawler.c @@ -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 diff --git a/docs/examples/debug.c b/docs/examples/debug.c index ff59d9c8ab..e49910a5fc 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -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; } diff --git a/docs/examples/default-scheme.c b/docs/examples/default-scheme.c index db50636107..821cad78c2 100644 --- a/docs/examples/default-scheme.c +++ b/docs/examples/default-scheme.c @@ -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; } diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c index 2c06d225bb..a2cd0f2e7e 100644 --- a/docs/examples/ephiperfifo.c +++ b/docs/examples/ephiperfifo.c @@ -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); diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index eb79a29090..776ab06a88 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -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); diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 4f1b2e9091..d1bdd732b9 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -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; } } diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c index 4639b6b12f..82ebd878c7 100644 --- a/docs/examples/fileupload.c +++ b/docs/examples/fileupload.c @@ -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 */ diff --git a/docs/examples/ftp-delete.c b/docs/examples/ftp-delete.c index 795dae851e..6f670533c5 100644 --- a/docs/examples/ftp-delete.c +++ b/docs/examples/ftp-delete.c @@ -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; } diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c index 9159d3857f..cba40d6eb8 100644 --- a/docs/examples/ftp-wildcard.c +++ b/docs/examples/ftp-wildcard.c @@ -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; } diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c index 4001022074..e48edc9d57 100644 --- a/docs/examples/ftpget.c +++ b/docs/examples/ftpget.c @@ -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; } diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c index 105bc60855..7d3181b9f3 100644 --- a/docs/examples/ftpgetinfo.c +++ b/docs/examples/ftpgetinfo.c @@ -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; } diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c index c46fa057eb..c05f989f9a 100644 --- a/docs/examples/ftpgetresp.c +++ b/docs/examples/ftpgetresp.c @@ -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; } diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c index 38844bb219..fc56bb4ca2 100644 --- a/docs/examples/ftpsget.c +++ b/docs/examples/ftpsget.c @@ -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; } diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index 36663d5afb..85b68da1bf 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -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; } diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 7c75f2b8d7..db06edcd9f 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -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; } diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index 30305f62fe..4908505ea1 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -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) { diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c index 8d43375395..66bb69b8ae 100644 --- a/docs/examples/getinfo.c +++ b/docs/examples/getinfo.c @@ -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; } diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index d4d8960487..ea4da5dd9d 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -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; } diff --git a/docs/examples/getredirect.c b/docs/examples/getredirect.c index 6ad9b9c1aa..fabfc594bc 100644 --- a/docs/examples/getredirect.c +++ b/docs/examples/getredirect.c @@ -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; } diff --git a/docs/examples/getreferrer.c b/docs/examples/getreferrer.c index 6827055c2b..ac190f3fa1 100644 --- a/docs/examples/getreferrer.c +++ b/docs/examples/getreferrer.c @@ -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); } diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index 9a6645fa5f..20a8a2de2d 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -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) { diff --git a/docs/examples/headerapi.c b/docs/examples/headerapi.c index e1fa33b8f6..cbc60acc94 100644 --- a/docs/examples/headerapi.c +++ b/docs/examples/headerapi.c @@ -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)) diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index ffef02f408..4bdba3607a 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -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(); diff --git a/docs/examples/hsts-preload.c b/docs/examples/hsts-preload.c index cd6c30f9c6..9ae1ff5b0f 100644 --- a/docs/examples/hsts-preload.c +++ b/docs/examples/hsts-preload.c @@ -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; } diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c index a3ecc01df1..3cd4f2a5ba 100644 --- a/docs/examples/htmltidy.c +++ b/docs/examples/htmltidy.c @@ -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 \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; } diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp index 4d698f253c..84e02f5c6b 100644 --- a/docs/examples/htmltitle.cpp +++ b/docs/examples/htmltitle.cpp @@ -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; } diff --git a/docs/examples/http-options.c b/docs/examples/http-options.c index f1542edbbe..105f996436 100644 --- a/docs/examples/http-options.c +++ b/docs/examples/http-options.c @@ -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); diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index 510c4c3839..dac8953b72 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -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; } diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index 635a8c7177..a9a0a8a9f7 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -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) { diff --git a/docs/examples/http2-pushinmemory.c b/docs/examples/http2-pushinmemory.c index d9bc038a02..37816742c0 100644 --- a/docs/examples/http2-pushinmemory.c +++ b/docs/examples/http2-pushinmemory.c @@ -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(); diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c index a0e82bd5e8..e646ce1e4b 100644 --- a/docs/examples/http2-serverpush.c +++ b/docs/examples/http2-serverpush.c @@ -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(); diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index 318822b8f2..1ebc993bfd 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -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) { diff --git a/docs/examples/http3-present.c b/docs/examples/http3-present.c index 0052d50188..ee9bdce2d9 100644 --- a/docs/examples/http3-present.c +++ b/docs/examples/http3-present.c @@ -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) diff --git a/docs/examples/http3.c b/docs/examples/http3.c index 99de5f8e2e..702c7d9ac3 100644 --- a/docs/examples/http3.c +++ b/docs/examples/http3.c @@ -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); diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index 3af5c1a2db..7888dfab38 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -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; } diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c index 4fd92aaffb..7163756a36 100644 --- a/docs/examples/httpput-postfields.c +++ b/docs/examples/httpput-postfields.c @@ -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; } diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index 8892d76f07..9a8163ce88 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -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; } diff --git a/docs/examples/https.c b/docs/examples/https.c index 02fd8b87bd..7bb11d21e0 100644 --- a/docs/examples/https.c +++ b/docs/examples/https.c @@ -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; } diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c index e3665d0128..7bd75edd93 100644 --- a/docs/examples/imap-append.c +++ b/docs/examples/imap-append.c @@ -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; } diff --git a/docs/examples/imap-authzid.c b/docs/examples/imap-authzid.c index 690b1d77c7..bf9a61f6af 100644 --- a/docs/examples/imap-authzid.c +++ b/docs/examples/imap-authzid.c @@ -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; } diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c index 7a5b52e10f..91d95b12a6 100644 --- a/docs/examples/imap-copy.c +++ b/docs/examples/imap-copy.c @@ -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; } diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c index 2477a00385..259dc2232f 100644 --- a/docs/examples/imap-create.c +++ b/docs/examples/imap-create.c @@ -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; } diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c index 6744613cd1..03e9d2ad7d 100644 --- a/docs/examples/imap-delete.c +++ b/docs/examples/imap-delete.c @@ -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; } diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c index 32f38493f1..fcb960ce50 100644 --- a/docs/examples/imap-examine.c +++ b/docs/examples/imap-examine.c @@ -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; } diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c index ab25ba552b..b067d15385 100644 --- a/docs/examples/imap-fetch.c +++ b/docs/examples/imap-fetch.c @@ -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; } diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c index e0201e464a..263219eded 100644 --- a/docs/examples/imap-list.c +++ b/docs/examples/imap-list.c @@ -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; } diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c index e967518565..75dbd3ceae 100644 --- a/docs/examples/imap-lsub.c +++ b/docs/examples/imap-lsub.c @@ -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; } diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c index 3d56cb1e3d..35aff98ad9 100644 --- a/docs/examples/imap-multi.c +++ b/docs/examples/imap-multi.c @@ -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) { diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c index a4a53ead4f..9407242918 100644 --- a/docs/examples/imap-noop.c +++ b/docs/examples/imap-noop.c @@ -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; } diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c index ebef27b369..c548829cb5 100644 --- a/docs/examples/imap-search.c +++ b/docs/examples/imap-search.c @@ -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; } diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c index 52448f492d..0ec84d7472 100644 --- a/docs/examples/imap-ssl.c +++ b/docs/examples/imap-ssl.c @@ -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; } diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c index c70c70ebce..db0310b6b0 100644 --- a/docs/examples/imap-store.c +++ b/docs/examples/imap-store.c @@ -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; } diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c index 61f4cea45b..6c09380221 100644 --- a/docs/examples/imap-tls.c +++ b/docs/examples/imap-tls.c @@ -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; } diff --git a/docs/examples/interface.c b/docs/examples/interface.c index 904131c93a..cfe3180f56 100644 --- a/docs/examples/interface.c +++ b/docs/examples/interface.c @@ -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; } diff --git a/docs/examples/ipv6.c b/docs/examples/ipv6.c index d16bfc4393..03e2a0726c 100644 --- a/docs/examples/ipv6.c +++ b/docs/examples/ipv6.c @@ -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; } diff --git a/docs/examples/keepalive.c b/docs/examples/keepalive.c index 5f5c39f57a..7427673394 100644 --- a/docs/examples/keepalive.c +++ b/docs/examples/keepalive.c @@ -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; } diff --git a/docs/examples/localport.c b/docs/examples/localport.c index 21e632d8a7..6cb863cd8d 100644 --- a/docs/examples/localport.c +++ b/docs/examples/localport.c @@ -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; } diff --git a/docs/examples/log_failed_transfers.c b/docs/examples/log_failed_transfers.c index 0c5c1a3b54..3f651c059b 100644 --- a/docs/examples/log_failed_transfers.c +++ b/docs/examples/log_failed_transfers.c @@ -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); diff --git a/docs/examples/maxconnects.c b/docs/examples/maxconnects.c index 95231d6002..0efcaeac1c 100644 --- a/docs/examples/maxconnects.c +++ b/docs/examples/maxconnects.c @@ -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 */ diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index faa91c0b66..44aec5bb21 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -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++) diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index 2f5e6ffdce..3798f541b2 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -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) { diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c index 4e10344772..04ea342ed8 100644 --- a/docs/examples/multi-double.c +++ b/docs/examples/multi-double.c @@ -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(); diff --git a/docs/examples/multi-event.c b/docs/examples/multi-event.c index 2eb3977200..b4e7b18083 100644 --- a/docs/examples/multi-event.c +++ b/docs/examples/multi-event.c @@ -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(); diff --git a/docs/examples/multi-formadd.c b/docs/examples/multi-formadd.c index 3e80393147..6611f2f12e 100644 --- a/docs/examples/multi-formadd.c +++ b/docs/examples/multi-formadd.c @@ -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 diff --git a/docs/examples/multi-legacy.c b/docs/examples/multi-legacy.c index d270cf2972..1c14ea0bd0 100644 --- a/docs/examples/multi-legacy.c +++ b/docs/examples/multi-legacy.c @@ -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++) diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index 68bcc37e96..48db32ff39 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -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) { diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index d8a430b31c..0cf18891fd 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -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; } diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c index 13689ad3f8..dd0102c264 100644 --- a/docs/examples/multi-uv.c +++ b/docs/examples/multi-uv.c @@ -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); diff --git a/docs/examples/netrc.c b/docs/examples/netrc.c index a9eaebff88..8bc998ae43 100644 --- a/docs/examples/netrc.c +++ b/docs/examples/netrc.c @@ -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; } diff --git a/docs/examples/persistent.c b/docs/examples/persistent.c index 7cde055d69..50d110f3e0 100644 --- a/docs/examples/persistent.c +++ b/docs/examples/persistent.c @@ -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; } diff --git a/docs/examples/pop3-authzid.c b/docs/examples/pop3-authzid.c index 85c28d700e..ed7993d85f 100644 --- a/docs/examples/pop3-authzid.c +++ b/docs/examples/pop3-authzid.c @@ -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; } diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c index bd220d7169..f872b882e4 100644 --- a/docs/examples/pop3-dele.c +++ b/docs/examples/pop3-dele.c @@ -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; } diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c index cef33c2b4f..7cc9a249d5 100644 --- a/docs/examples/pop3-list.c +++ b/docs/examples/pop3-list.c @@ -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; } diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c index 022ab928c8..741b7f8d2d 100644 --- a/docs/examples/pop3-multi.c +++ b/docs/examples/pop3-multi.c @@ -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) { diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c index 4bed103fc8..5e05713ec6 100644 --- a/docs/examples/pop3-noop.c +++ b/docs/examples/pop3-noop.c @@ -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; } diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c index 5cb6e1b545..af7e40293a 100644 --- a/docs/examples/pop3-retr.c +++ b/docs/examples/pop3-retr.c @@ -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; } diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c index 4dd808c3f1..c38d41152a 100644 --- a/docs/examples/pop3-ssl.c +++ b/docs/examples/pop3-ssl.c @@ -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; } diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c index 929422af98..160f013d2d 100644 --- a/docs/examples/pop3-stat.c +++ b/docs/examples/pop3-stat.c @@ -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; } diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c index 7693e63219..4258088722 100644 --- a/docs/examples/pop3-tls.c +++ b/docs/examples/pop3-tls.c @@ -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; } diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c index 3a8776f0b2..b961487685 100644 --- a/docs/examples/pop3-top.c +++ b/docs/examples/pop3-top.c @@ -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; } diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c index 01df011eef..4cf571621a 100644 --- a/docs/examples/pop3-uidl.c +++ b/docs/examples/pop3-uidl.c @@ -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; } diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index 0df09a34bf..729642cbce 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -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); diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index 0a2964f1c6..f310c14489 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -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 { /* diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c index 7e5f08ef66..aee12ab0ac 100644 --- a/docs/examples/postit2-formadd.c +++ b/docs/examples/postit2-formadd.c @@ -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); diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index e5cb963369..4535bed6e1 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -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); diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c index 41a87f2bf9..22f876b5c8 100644 --- a/docs/examples/progressfunc.c +++ b/docs/examples/progressfunc.c @@ -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; } diff --git a/docs/examples/protofeats.c b/docs/examples/protofeats.c index 50b31cb9ea..e8d8540089 100644 --- a/docs/examples/protofeats.c +++ b/docs/examples/protofeats.c @@ -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"); diff --git a/docs/examples/range.c b/docs/examples/range.c index ec85ed878d..9555725dab 100644 --- a/docs/examples/range.c +++ b/docs/examples/range.c @@ -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; } diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c index 95adb3c1ba..e56c8efb87 100644 --- a/docs/examples/resolve.c +++ b/docs/examples/resolve.c @@ -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; } diff --git a/docs/examples/rtsp-options.c b/docs/examples/rtsp-options.c index 5e732e105f..7c7ff945f9 100644 --- a/docs/examples/rtsp-options.c +++ b/docs/examples/rtsp-options.c @@ -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); diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index e0bf417e48..21a09b6584 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -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; } diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c index 613bc26a3c..134ecb94a4 100644 --- a/docs/examples/sepheaders.c +++ b/docs/examples/sepheaders.c @@ -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; } diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c index dec9fa988d..788ccf575b 100644 --- a/docs/examples/sessioninfo.c +++ b/docs/examples/sessioninfo.c @@ -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; } diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c index 470474cafd..f1484eb80c 100644 --- a/docs/examples/sftpget.c +++ b/docs/examples/sftpget.c @@ -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; } diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c index 9b78f96ee4..02f18897a3 100644 --- a/docs/examples/sftpuploadresume.c +++ b/docs/examples/sftpuploadresume.c @@ -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) { diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c index acaa610dec..475bb182a8 100644 --- a/docs/examples/shared-connection-cache.c +++ b/docs/examples/shared-connection-cache.c @@ -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; } diff --git a/docs/examples/simple.c b/docs/examples/simple.c index e7ea3be611..6f0751775f 100644 --- a/docs/examples/simple.c +++ b/docs/examples/simple.c @@ -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); diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c index ff7295c59d..7b9356acf9 100644 --- a/docs/examples/simplepost.c +++ b/docs/examples/simplepost.c @@ -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; } diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index c60b91057e..9885dfd91d 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -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; } diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index bf165f7e42..1c9951dfce 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -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); diff --git a/docs/examples/smtp-authzid.c b/docs/examples/smtp-authzid.c index f8e66069f8..64540cb033 100644 --- a/docs/examples/smtp-authzid.c +++ b/docs/examples/smtp-authzid.c @@ -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; } diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c index 60722a5688..9b201240dc 100644 --- a/docs/examples/smtp-expn.c +++ b/docs/examples/smtp-expn.c @@ -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); diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c index 8ed91f55b7..0a3e73d39f 100644 --- a/docs/examples/smtp-mail.c +++ b/docs/examples/smtp-mail.c @@ -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; } diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c index 89bfebd39d..7aa610789a 100644 --- a/docs/examples/smtp-mime.c +++ b/docs/examples/smtp-mime.c @@ -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; } diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c index d623f1edcd..0ce6911152 100644 --- a/docs/examples/smtp-multi.c +++ b/docs/examples/smtp-multi.c @@ -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) { diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c index 3a5e330439..acc559562f 100644 --- a/docs/examples/smtp-ssl.c +++ b/docs/examples/smtp-ssl.c @@ -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; } diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c index e9221b36c9..3b622859ca 100644 --- a/docs/examples/smtp-tls.c +++ b/docs/examples/smtp-tls.c @@ -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; } diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c index e58ed9491d..4d5a8ad601 100644 --- a/docs/examples/smtp-vrfy.c +++ b/docs/examples/smtp-vrfy.c @@ -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; } diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index 1e31f7c158..6209ebc314 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -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) { diff --git a/docs/examples/threaded.c b/docs/examples/threaded.c index bb64221224..9eeffa78f6 100644 --- a/docs/examples/threaded.c +++ b/docs/examples/threaded.c @@ -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; diff --git a/docs/examples/unixsocket.c b/docs/examples/unixsocket.c index 738ffc2c97..4a1a2937d6 100644 --- a/docs/examples/unixsocket.c +++ b/docs/examples/unixsocket.c @@ -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; } diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c index b4cbe1c7eb..0c9c5880f7 100644 --- a/docs/examples/url2file.c +++ b/docs/examples/url2file.c @@ -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; } diff --git a/docs/examples/urlapi.c b/docs/examples/urlapi.c index 7afc759fa1..4d6c6444bd 100644 --- a/docs/examples/urlapi.c +++ b/docs/examples/urlapi.c @@ -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; } diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index 44a0a15bc7..8f50e75d6d 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -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; } diff --git a/docs/examples/websocket-cb.c b/docs/examples/websocket-cb.c index 63d07c7841..defde4c0fe 100644 --- a/docs/examples/websocket-cb.c +++ b/docs/examples/websocket-cb.c @@ -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; } diff --git a/docs/examples/websocket-updown.c b/docs/examples/websocket-updown.c index a40bddf9cf..8cbb938e9d 100644 --- a/docs/examples/websocket-updown.c +++ b/docs/examples/websocket-updown.c @@ -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; } diff --git a/docs/examples/websocket.c b/docs/examples/websocket.c index 0075f68e60..2fa53028a8 100644 --- a/docs/examples/websocket.c +++ b/docs/examples/websocket.c @@ -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; } diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c index 5b35d04861..9122c491dc 100644 --- a/docs/examples/xmlstream.c +++ b/docs/examples/xmlstream.c @@ -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; } diff --git a/docs/libcurl/curl_easy_cleanup.md b/docs/libcurl/curl_easy_cleanup.md index fc653e3a56..ee722ca84d 100644 --- a/docs/libcurl/curl_easy_cleanup.md +++ b/docs/libcurl/curl_easy_cleanup.md @@ -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); } } diff --git a/docs/libcurl/curl_easy_duphandle.md b/docs/libcurl/curl_easy_duphandle.md index 45e738f301..5ea9c4fba0 100644 --- a/docs/libcurl/curl_easy_duphandle.md +++ b/docs/libcurl/curl_easy_duphandle.md @@ -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); } diff --git a/docs/libcurl/curl_easy_getinfo.md b/docs/libcurl/curl_easy_getinfo.md index e05beb614e..a7665f46ad 100644 --- a/docs/libcurl/curl_easy_getinfo.md +++ b/docs/libcurl/curl_easy_getinfo.md @@ -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); } diff --git a/docs/libcurl/curl_easy_init.md b/docs/libcurl/curl_easy_init.md index 909f3c7ac7..34dbc640b9 100644 --- a/docs/libcurl/curl_easy_init.md +++ b/docs/libcurl/curl_easy_init.md @@ -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); } } diff --git a/docs/libcurl/curl_easy_perform.md b/docs/libcurl/curl_easy_perform.md index 3d19669a53..cc61232f87 100644 --- a/docs/libcurl/curl_easy_perform.md +++ b/docs/libcurl/curl_easy_perform.md @@ -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); } } diff --git a/docs/libcurl/curl_easy_recv.md b/docs/libcurl/curl_easy_recv.md index e89c03592b..aeb16c0ce5 100644 --- a/docs/libcurl/curl_easy_recv.md +++ b/docs/libcurl/curl_easy_recv.md @@ -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); } } } diff --git a/docs/libcurl/curl_easy_send.md b/docs/libcurl/curl_easy_send.md index 885b37f1bc..016a6756a8 100644 --- a/docs/libcurl/curl_easy_send.md +++ b/docs/libcurl/curl_easy_send.md @@ -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); } } } diff --git a/docs/libcurl/curl_easy_setopt.md b/docs/libcurl/curl_easy_setopt.md index 49c57fb11f..771442b185 100644 --- a/docs/libcurl/curl_easy_setopt.md +++ b/docs/libcurl/curl_easy_setopt.md @@ -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); } } diff --git a/docs/libcurl/curl_easy_ssls_export.md b/docs/libcurl/curl_easy_ssls_export.md index 32f2fff240..b4960be1d1 100644 --- a/docs/libcurl/curl_easy_ssls_export.md +++ b/docs/libcurl/curl_easy_ssls_export.md @@ -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); diff --git a/docs/libcurl/curl_easy_ssls_import.md b/docs/libcurl/curl_easy_ssls_import.md index f512c2fe69..178c10654c 100644 --- a/docs/libcurl/curl_easy_ssls_import.md +++ b/docs/libcurl/curl_easy_ssls_import.md @@ -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); diff --git a/docs/libcurl/curl_easy_strerror.md b/docs/libcurl/curl_easy_strerror.md index 37040a1c1e..bec2bdc1a3 100644 --- a/docs/libcurl/curl_easy_strerror.md +++ b/docs/libcurl/curl_easy_strerror.md @@ -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)); } } ~~~ diff --git a/docs/libcurl/curl_ws_recv.md b/docs/libcurl/curl_ws_recv.md index 8c5cd55a4c..2669256174 100644 --- a/docs/libcurl/curl_ws_recv.md +++ b/docs/libcurl/curl_ws_recv.md @@ -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; } ~~~ diff --git a/docs/libcurl/curl_ws_send.md b/docs/libcurl/curl_ws_send.md index ac8f020321..dc6e927ca8 100644 --- a/docs/libcurl/curl_ws_send.md +++ b/docs/libcurl/curl_ws_send.md @@ -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; } ~~~ diff --git a/docs/libcurl/curl_ws_start_frame.md b/docs/libcurl/curl_ws_start_frame.md index 166c5cb7e0..84b8065d93 100644 --- a/docs/libcurl/curl_ws_start_frame.md +++ b/docs/libcurl/curl_ws_start_frame.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md index a9db2926b2..9dbf4f8573 100644 --- a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md +++ b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md @@ -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 */ } diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md index e86cd34cc5..a11c633ddd 100644 --- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md +++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md index ecaa9dce32..4b57dd83cb 100644 --- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_CERTINFO.md b/docs/libcurl/opts/CURLINFO_CERTINFO.md index d97c311cc8..e24115f98f 100644 --- a/docs/libcurl/opts/CURLINFO_CERTINFO.md +++ b/docs/libcurl/opts/CURLINFO_CERTINFO.md @@ -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++) { diff --git a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md index 9e7bd173c4..1705967dfe 100644 --- a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md +++ b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md @@ -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":""); } } diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.md b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.md index 4a14a1cd7a..c9caa070eb 100644 --- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.md +++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md index 5f0eb1da7a..2cfeeb8209 100644 --- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_CONN_ID.md b/docs/libcurl/opts/CURLINFO_CONN_ID.md index 95d5258a59..75e2ccc5eb 100644 --- a/docs/libcurl/opts/CURLINFO_CONN_ID.md +++ b/docs/libcurl/opts/CURLINFO_CONN_ID.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md index 7b63c95d9d..1142617c19 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md index 83a714b53d..9bc57e0400 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md index 6045dcfdbf..546325f179 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md index 013f0d064c..6ad40241fe 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md index c019606cc1..8de0a65461 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md +++ b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.md b/docs/libcurl/opts/CURLINFO_COOKIELIST.md index c106864c3a..d3c4a6590e 100644 --- a/docs/libcurl/opts/CURLINFO_COOKIELIST.md +++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.md @@ -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) { diff --git a/docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md b/docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md index 5c1323ba1e..c2cb4a558e 100644 --- a/docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md +++ b/docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md b/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md index 4538a13342..5a1fcdc3e4 100644 --- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md +++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md index 6840583c84..f7adcd810b 100644 --- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md +++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_FILETIME.md b/docs/libcurl/opts/CURLINFO_FILETIME.md index 67bb822e49..48f3f886a5 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME.md +++ b/docs/libcurl/opts/CURLINFO_FILETIME.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_FILETIME_T.md b/docs/libcurl/opts/CURLINFO_FILETIME_T.md index 627881c2a4..e1f896e3ea 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME_T.md +++ b/docs/libcurl/opts/CURLINFO_FILETIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md index 8cf7aae9b2..058d273ba0 100644 --- a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md +++ b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.md b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.md index f546808320..a537f0408e 100644 --- a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.md +++ b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md index 85b67c8bda..8829227c98 100644 --- a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md +++ b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md @@ -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 { diff --git a/docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md b/docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md index 5e4727b68d..031691402b 100644 --- a/docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md +++ b/docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md @@ -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 { diff --git a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md index 0a95125488..2ded9a121b 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md +++ b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.md b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.md index bcc274bf69..0062a043d8 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.md +++ b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_LASTSOCKET.md b/docs/libcurl/opts/CURLINFO_LASTSOCKET.md index 755cf9a5e0..8aa80f9fc5 100644 --- a/docs/libcurl/opts/CURLINFO_LASTSOCKET.md +++ b/docs/libcurl/opts/CURLINFO_LASTSOCKET.md @@ -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 */ } diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_IP.md b/docs/libcurl/opts/CURLINFO_LOCAL_IP.md index 1a99f87014..270b7d5f26 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_IP.md +++ b/docs/libcurl/opts/CURLINFO_LOCAL_IP.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.md b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.md index 40d1f5fb6a..a292f8883f 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.md +++ b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md index 427516819a..c37b36d31d 100644 --- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md +++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md index 418f9f8f32..152abd281f 100644 --- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md index 1728a6614b..dfac440979 100644 --- a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md +++ b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_OS_ERRNO.md b/docs/libcurl/opts/CURLINFO_OS_ERRNO.md index b12a8ec8a5..f163a41819 100644 --- a/docs/libcurl/opts/CURLINFO_OS_ERRNO.md +++ b/docs/libcurl/opts/CURLINFO_OS_ERRNO.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md b/docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md index f2785c0a6f..6819684908 100644 --- a/docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md index ef10c67fa8..297cf06ca5 100644 --- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md +++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md index 4c5d6d9151..43680edcf8 100644 --- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md @@ -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)); diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.md b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.md index 90bd5e400c..683d97de16 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.md +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md index 85f5767423..58b8c0d1b4 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_PRIVATE.md b/docs/libcurl/opts/CURLINFO_PRIVATE.md index b14ece5a1b..ac4fb82e15 100644 --- a/docs/libcurl/opts/CURLINFO_PRIVATE.md +++ b/docs/libcurl/opts/CURLINFO_PRIVATE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_PROTOCOL.md b/docs/libcurl/opts/CURLINFO_PROTOCOL.md index f254857ca7..3f9346fa04 100644 --- a/docs/libcurl/opts/CURLINFO_PROTOCOL.md +++ b/docs/libcurl/opts/CURLINFO_PROTOCOL.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md index fb980f30fe..16161aabee 100644 --- a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md +++ b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md @@ -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 { diff --git a/docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md b/docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md index eace7222d1..e0788c63f2 100644 --- a/docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md +++ b/docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md @@ -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 { diff --git a/docs/libcurl/opts/CURLINFO_PROXY_ERROR.md b/docs/libcurl/opts/CURLINFO_PROXY_ERROR.md index bb833570c8..0c2dab38fd 100644 --- a/docs/libcurl/opts/CURLINFO_PROXY_ERROR.md +++ b/docs/libcurl/opts/CURLINFO_PROXY_ERROR.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md index 39fe1c70d2..6164eaeafd 100644 --- a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md +++ b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md @@ -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")); } diff --git a/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md b/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md index acf9164131..d7521c1d5d 100644 --- a/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md index 586bf3db05..c4796e4c96 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md index 3922b86c79..01d99f8aeb 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md index a612cf04b6..5b3875f8d7 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.md b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.md index 5e33a7115d..32ec6c3355 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.md +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_REFERER.md b/docs/libcurl/opts/CURLINFO_REFERER.md index 07978f463f..6542965fa9 100644 --- a/docs/libcurl/opts/CURLINFO_REFERER.md +++ b/docs/libcurl/opts/CURLINFO_REFERER.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md index 6f68ce4fce..9657f3de60 100644 --- a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md +++ b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md @@ -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); diff --git a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md index f07fb8d908..aeb8aeab8a 100644 --- a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md +++ b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_RETRY_AFTER.md b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.md index 0065f3f32d..3e36aa3d71 100644 --- a/docs/libcurl/opts/CURLINFO_RETRY_AFTER.md +++ b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md index ef699e8553..a16b5a1ab6 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md +++ b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md index d4fecaacf6..98cf8a29aa 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md +++ b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md index 1a4a2a4273..d7fd2131e0 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md +++ b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md index 2fbffbe697..4d75ef33e2 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md +++ b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_SCHEME.md b/docs/libcurl/opts/CURLINFO_SCHEME.md index 5d6288e11c..d453e2891d 100644 --- a/docs/libcurl/opts/CURLINFO_SCHEME.md +++ b/docs/libcurl/opts/CURLINFO_SCHEME.md @@ -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) diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md index 809abd3e77..1b04c27ea9 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md index 102177ae22..0393c49949 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md index b018e00e2d..6111db4a57 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md index ec35a0f974..e75a9809ac 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md index 8b3b7b32e7..c37155686a 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md index 50d6d324f9..3c97fbd5c2 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md index 06778c1e2f..801fe83f04 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md index 12b569186c..49e126bb45 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.md b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.md index 6c4dd46cf6..da9582c01c 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.md +++ b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md index c55a63e05e..d4e565b692 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md +++ b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md @@ -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")); } diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md index 47fe77673f..9c5f20ace5 100644 --- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md +++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md index a1d5c5642f..79d91ea8d8 100644 --- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_TLS_SESSION.md b/docs/libcurl/opts/CURLINFO_TLS_SESSION.md index 18022ac2c6..f4e24253b7 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SESSION.md +++ b/docs/libcurl/opts/CURLINFO_TLS_SESSION.md @@ -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); } diff --git a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md index e1c725727c..db1a41325b 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md +++ b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md @@ -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; } ~~~ diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.md b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.md index 60d383a458..3cdcee36bb 100644 --- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.md +++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md index 0302310b66..93c876ad33 100644 --- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md +++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_USED_PROXY.md b/docs/libcurl/opts/CURLINFO_USED_PROXY.md index 3d652c73b0..11f367ffa4 100644 --- a/docs/libcurl/opts/CURLINFO_USED_PROXY.md +++ b/docs/libcurl/opts/CURLINFO_USED_PROXY.md @@ -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 "); } } diff --git a/docs/libcurl/opts/CURLINFO_XFER_ID.md b/docs/libcurl/opts/CURLINFO_XFER_ID.md index 7de5609399..c01ccd2722 100644 --- a/docs/libcurl/opts/CURLINFO_XFER_ID.md +++ b/docs/libcurl/opts/CURLINFO_XFER_ID.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md index 38fa9542b3..e2880478fb 100644 --- a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md +++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.md b/docs/libcurl/opts/CURLOPT_AUTOREFERER.md index 0d4918a4da..8bc75d4666 100644 --- a/docs/libcurl/opts/CURLOPT_AUTOREFERER.md +++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.md b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.md index 62212e88f7..a08cd8be18 100644 --- a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.md +++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md b/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md index eb0e24f36a..ffced772b4 100644 --- a/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.md b/docs/libcurl/opts/CURLOPT_CAPATH.md index 3dcba2d0a3..b82b40fe8e 100644 --- a/docs/libcurl/opts/CURLOPT_CAPATH.md +++ b/docs/libcurl/opts/CURLOPT_CAPATH.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.md b/docs/libcurl/opts/CURLOPT_CERTINFO.md index baddc30797..e3bf6be8c4 100644 --- a/docs/libcurl/opts/CURLOPT_CERTINFO.md +++ b/docs/libcurl/opts/CURLOPT_CERTINFO.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md index 0515a8ae35..765e0de232 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md +++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md @@ -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 */ } } diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.md b/docs/libcurl/opts/CURLOPT_COOKIEFILE.md index a4baf8febf..330f3d57d4 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.md +++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.md b/docs/libcurl/opts/CURLOPT_COOKIEJAR.md index 01cf9c01c6..ac3a7074d0 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEJAR.md +++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.md b/docs/libcurl/opts/CURLOPT_COOKIESESSION.md index bda715af92..920b4b59fe 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIESESSION.md +++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_CRLF.md b/docs/libcurl/opts/CURLOPT_CRLF.md index 275f8bad3c..4ce1a165c1 100644 --- a/docs/libcurl/opts/CURLOPT_CRLF.md +++ b/docs/libcurl/opts/CURLOPT_CRLF.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.md b/docs/libcurl/opts/CURLOPT_CRLFILE.md index 0c4eca6c78..62f5651090 100644 --- a/docs/libcurl/opts/CURLOPT_CRLFILE.md +++ b/docs/libcurl/opts/CURLOPT_CRLFILE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_CURLU.md b/docs/libcurl/opts/CURLOPT_CURLU.md index 737e746a15..f9207b85db 100644 --- a/docs/libcurl/opts/CURLOPT_CURLU.md +++ b/docs/libcurl/opts/CURLOPT_CURLU.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md index 060cfd9c77..9928eef9d6 100644 --- a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md +++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.md b/docs/libcurl/opts/CURLOPT_DEBUGDATA.md index ed84a27d12..d15a5576fb 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGDATA.md +++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md index 4ecfb5327b..af1dbd34ef 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.md b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.md index d249fa6223..548d1f0bf6 100644 --- a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.md +++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md index 4c40980cdb..5a9b7bbb9a 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md +++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md index 015a77c236..729223d21b 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md +++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md index f149475c4f..4613ff3e1d 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md index a0762b78ab..3a0fe9abe3 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.md b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.md index a731b966ed..738714786f 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.md +++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md index 0bc37a6a4e..05093eb2bd 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md +++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md index 61bdab4d8a..6083662aac 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md @@ -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)); } } } diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.md b/docs/libcurl/opts/CURLOPT_FAILONERROR.md index 24a3bdb7ed..29578978fc 100644 --- a/docs/libcurl/opts/CURLOPT_FAILONERROR.md +++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.md @@ -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 */ } } diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.md b/docs/libcurl/opts/CURLOPT_FILETIME.md index 65676e1380..6031fcd760 100644 --- a/docs/libcurl/opts/CURLOPT_FILETIME.md +++ b/docs/libcurl/opts/CURLOPT_FILETIME.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.md b/docs/libcurl/opts/CURLOPT_FTPPORT.md index 59e4419512..3570b91033 100644 --- a/docs/libcurl/opts/CURLOPT_FTPPORT.md +++ b/docs/libcurl/opts/CURLOPT_FTPPORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md index a2021f830e..6360fb3908 100644 --- a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md +++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md index 3f60368653..97b843696c 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md +++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md index 88824d08fc..d8ca86427c 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md +++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md index d775e1b826..7b1a766d08 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md +++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md index 847a491a27..dffec993d4 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md +++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md index 7116b9536f..0f529b25d6 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md +++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md index cce1616d41..78fc976bee 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md +++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md index 8f2cd82449..781a2c75de 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md index 5bed94573d..48eb13641d 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md index 5439f2ca8c..9a26cf4504 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md index bedceaabcf..2196f23984 100644 --- a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md +++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md index 609d891064..77ef0e06f3 100644 --- a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md +++ b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md b/docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md index 6250101ee1..af42b73b79 100644 --- a/docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md +++ b/docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.md b/docs/libcurl/opts/CURLOPT_HEADEROPT.md index 5695d3e0b7..88d8194aba 100644 --- a/docs/libcurl/opts/CURLOPT_HEADEROPT.md +++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md b/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md index 5d03607fa1..67129f242d 100644 --- a/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md b/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md index 621268ea52..cdbdbe5d26 100644 --- a/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md index 585faa275a..400348f4ca 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md +++ b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.md b/docs/libcurl/opts/CURLOPT_HTTPAUTH.md index b21647eda2..f0bdc0f12e 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.md +++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md index 10ca0c5100..f56e55f184 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md +++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md index ea59ad2c16..15444a2e96 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md +++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.md b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.md index 4cabb09f87..1bc23bf7af 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.md +++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.md @@ -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 */ } } diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.md b/docs/libcurl/opts/CURLOPT_INTERFACE.md index d58398383b..dc966aad19 100644 --- a/docs/libcurl/opts/CURLOPT_INTERFACE.md +++ b/docs/libcurl/opts/CURLOPT_INTERFACE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.md b/docs/libcurl/opts/CURLOPT_IPRESOLVE.md index 9d7bee3150..180546a9df 100644 --- a/docs/libcurl/opts/CURLOPT_IPRESOLVE.md +++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.md b/docs/libcurl/opts/CURLOPT_ISSUERCERT.md index 7b6998040b..1e10b1bbb2 100644 --- a/docs/libcurl/opts/CURLOPT_ISSUERCERT.md +++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md b/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md index e347f6ca9f..c000353619 100644 --- a/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md index 5b43545e0f..eeb4704dd2 100644 --- a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md +++ b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.md b/docs/libcurl/opts/CURLOPT_KEYPASSWD.md index 0b7ded9c70..d97a947164 100644 --- a/docs/libcurl/opts/CURLOPT_KEYPASSWD.md +++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.md b/docs/libcurl/opts/CURLOPT_KRBLEVEL.md index 8dc5de7cee..cfc728ccd6 100644 --- a/docs/libcurl/opts/CURLOPT_KRBLEVEL.md +++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.md b/docs/libcurl/opts/CURLOPT_LOCALPORT.md index ef71d5373b..806de6e9ac 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORT.md +++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md index a3a33ff108..da3ef5ae1f 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md +++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md index 9d41a3fa74..dfdda91efd 100644 --- a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md index 97c2654604..06d1533e4a 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md @@ -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 */ diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md index d478e753ce..6a250efb03 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md @@ -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 */ diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.md b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.md index 8643c892e3..13b9acadae 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.md +++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.md @@ -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, ""); - res = curl_easy_perform(curl); + result = curl_easy_perform(curl); curl_easy_cleanup(curl); } } diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.md b/docs/libcurl/opts/CURLOPT_MAIL_FROM.md index aa5656e413..fe6968f368 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_FROM.md +++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.md @@ -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, "president@example.com"); - res = curl_easy_perform(curl); + result = curl_easy_perform(curl); curl_easy_cleanup(curl); } } diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.md b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.md index 99ee600f58..de763edd07 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.md +++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.md @@ -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, "person@example.com"); list = curl_slist_append(list, " 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); } diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md b/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md index eae7c3f51c..d87ba09bd7 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md +++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md @@ -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, "person@example.com"); @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.md b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.md index 80a4f8b326..96df2614a1 100644 --- a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.md +++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.md b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.md index 0dd9d7922a..8618758f1b 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.md +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md index e58b8195e6..3ee91696e4 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md index 2ad3d49b96..9a9117669d 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md +++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md index 545fec9a0d..34566ece0d 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md +++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_NETRC.md b/docs/libcurl/opts/CURLOPT_NETRC.md index aba4ed2ad9..65d87cf881 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC.md +++ b/docs/libcurl/opts/CURLOPT_NETRC.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.md b/docs/libcurl/opts/CURLOPT_NETRC_FILE.md index 8863415910..dba6f85007 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC_FILE.md +++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md index 7c2c13fd00..cb6731912c 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md +++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md index 7252ac5956..4c9579c826 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md +++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.md b/docs/libcurl/opts/CURLOPT_NOSIGNAL.md index 27886ff65e..c89b01465b 100644 --- a/docs/libcurl/opts/CURLOPT_NOSIGNAL.md +++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md index d91a7da3ba..2bcdee3b66 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md index 89931d0e06..3591516358 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.md b/docs/libcurl/opts/CURLOPT_PASSWORD.md index 26bbf32d39..f8b9ee752d 100644 --- a/docs/libcurl/opts/CURLOPT_PASSWORD.md +++ b/docs/libcurl/opts/CURLOPT_PASSWORD.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_PORT.md b/docs/libcurl/opts/CURLOPT_PORT.md index e452cb54f7..c0cf765dba 100644 --- a/docs/libcurl/opts/CURLOPT_PORT.md +++ b/docs/libcurl/opts/CURLOPT_PORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_POST.md b/docs/libcurl/opts/CURLOPT_POST.md index c7850f3aed..1678b50e6b 100644 --- a/docs/libcurl/opts/CURLOPT_POST.md +++ b/docs/libcurl/opts/CURLOPT_POST.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_POSTQUOTE.md b/docs/libcurl/opts/CURLOPT_POSTQUOTE.md index 0457f490db..55ef81aabc 100644 --- a/docs/libcurl/opts/CURLOPT_POSTQUOTE.md +++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.md b/docs/libcurl/opts/CURLOPT_PREQUOTE.md index c570e57731..79cf9fee80 100644 --- a/docs/libcurl/opts/CURLOPT_PREQUOTE.md +++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.md b/docs/libcurl/opts/CURLOPT_PROXYAUTH.md index c010c8fd0c..459fd429c3 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYAUTH.md +++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md index 20e3a687a6..c4664b6631 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md +++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.md b/docs/libcurl/opts/CURLOPT_PROXYPORT.md index 31abbf9cbf..6a390ae903 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPORT.md +++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.md b/docs/libcurl/opts/CURLOPT_PROXYTYPE.md index d7870efc57..6000d10b00 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYTYPE.md +++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md index 0bf170f4e8..be196eed13 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md index 3fed4a3d55..87dac82a13 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md index 55c97b769f..3eb5af912a 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md index 5efc5e5f08..36666edf21 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md index 0cb17c31bf..0bd3770f91 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md index 76c9612515..2dda8235c6 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md index 54e900d2fd..c3687a46fe 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md index dd8e81b8d4..180a7b1808 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md index 9b59ec1fd1..98f3683eef 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md index 59cd1aaea2..9bdb4af26a 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md index efea446a25..8ba84add1f 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md index e0c07e325d..c7c7b728a5 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md index 83bd4d6ea8..5be7b134a0 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md index 443097dfb4..9b8d293735 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md index cf44f3718a..8513dffced 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md index da997695d0..65f940b861 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md index 718b261749..ce1f63aa3b 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md index ec9ccc16c8..cbe422b08e 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md index 18b5516c5e..999a111c98 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md index 540d96149f..17acca6761 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md index ceb1c1c091..d1badf4be5 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md index cbc8952753..c4db7aa815 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md index f424a27ef5..93b483802e 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md +++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_QUICK_EXIT.md b/docs/libcurl/opts/CURLOPT_QUICK_EXIT.md index 7027159e31..d6505244cb 100644 --- a/docs/libcurl/opts/CURLOPT_QUICK_EXIT.md +++ b/docs/libcurl/opts/CURLOPT_QUICK_EXIT.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.md b/docs/libcurl/opts/CURLOPT_QUOTE.md index 11b6997c68..d4365f7b41 100644 --- a/docs/libcurl/opts/CURLOPT_QUOTE.md +++ b/docs/libcurl/opts/CURLOPT_QUOTE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md index d7b13a04ab..27da0f3b83 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md index 89e303d4ab..e42e75b712 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md index d054be7a55..f8672f1bf4 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md index 0d76e60186..e60438eecb 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md index eb745da043..619096bf1a 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md index cba9b4ad53..44633cd71d 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md +++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md index 7f627f5a61..e32380d65e 100644 --- a/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md +++ b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.md b/docs/libcurl/opts/CURLOPT_SASL_IR.md index 6a3b50ca35..c99239db5b 100644 --- a/docs/libcurl/opts/CURLOPT_SASL_IR.md +++ b/docs/libcurl/opts/CURLOPT_SASL_IR.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md b/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md index 85695316e6..68e27529dc 100644 --- a/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md +++ b/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md b/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md index 98d93fe5dc..cb57bf5d4a 100644 --- a/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md +++ b/docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.md b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.md index 56d7029cd2..f6efb393f2 100644 --- a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.md +++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.md @@ -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); } } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_SHARE.md b/docs/libcurl/opts/CURLOPT_SHARE.md index 9b9a281e00..2c6a496593 100644 --- a/docs/libcurl/opts/CURLOPT_SHARE.md +++ b/docs/libcurl/opts/CURLOPT_SHARE.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md index dbf75da3bc..be913df029 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md index 3467acf77f..b20a387b12 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md index f873c6a5cc..38f5004adc 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md index b47c2ca226..673112cf32 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md index 60a6025c8c..3b9fb989d1 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md +++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md index 09810f22ee..5dfb2ff1d2 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md +++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md index 3e6861bc35..e83bf918d7 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md +++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md index e4443a10b6..cdd45110af 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md +++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md index a92f744d59..2a1f79845d 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md +++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md index d7878e8626..d7df84fa1b 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md +++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.md b/docs/libcurl/opts/CURLOPT_SSLCERT.md index 40c3a21c25..d3669e90a4 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERT.md +++ b/docs/libcurl/opts/CURLOPT_SSLCERT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md index acf875dfb5..8497016083 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md +++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md b/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md index 5d121de2de..aa69fbbc89 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.md b/docs/libcurl/opts/CURLOPT_SSLENGINE.md index 0983e93a51..85aa7753ec 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE.md +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md index 72e908b76e..87aab0c2bb 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.md b/docs/libcurl/opts/CURLOPT_SSLKEY.md index bbc486d21f..f590e16e9e 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEY.md +++ b/docs/libcurl/opts/CURLOPT_SSLKEY.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md index 0a996fc054..aef7fd5f8d 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md +++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md b/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md index 515fa91b38..a062d39deb 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md +++ b/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md index a177d52317..1bbbf6e8c5 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md +++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md index 7cc94bdfb9..d8fac3b2e2 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md @@ -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; } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md index 01688ef3ea..dff37bb144 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md @@ -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; } ~~~ diff --git a/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md b/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md index fcdef1d5b4..674e1ac6d5 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md +++ b/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md index a9e20a68d3..2e0399d0fa 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md index e8a6649bfd..46b8c9dbb4 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md index ddd7965ee2..7767b05280 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md index 6f0d527b83..2e0c7c6fc0 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md +++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md b/docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md index 4fce470bf8..4e7644719c 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md +++ b/docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md index 14e1ab08b0..b1d373eef6 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md index f306c64fa2..8cab6200bc 100644 --- a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md index dd299ec922..d2de3c19c7 100644 --- a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md +++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md index 41cdec07bc..07dcc79c64 100644 --- a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md +++ b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md index d6c871118c..8ff3d95c58 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md index 64ce85e5db..078c41c253 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md index 230c3babee..654d858f83 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md index 0636233765..716967d88a 100644 --- a/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md index 4923f33d8f..f99dc8df5e 100644 --- a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md +++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md index 209ea32e4e..746d14c0dd 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md +++ b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.md b/docs/libcurl/opts/CURLOPT_USERNAME.md index 736c80cf81..916c9dd831 100644 --- a/docs/libcurl/opts/CURLOPT_USERNAME.md +++ b/docs/libcurl/opts/CURLOPT_USERNAME.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.md b/docs/libcurl/opts/CURLOPT_USERPWD.md index ba54949bee..e3727baec9 100644 --- a/docs/libcurl/opts/CURLOPT_USERPWD.md +++ b/docs/libcurl/opts/CURLOPT_USERPWD.md @@ -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); } diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md index ad4b4e0360..8cc97a6e40 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md @@ -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); diff --git a/docs/libcurl/opts/CURLOPT_WS_OPTIONS.md b/docs/libcurl/opts/CURLOPT_WS_OPTIONS.md index d1488a762b..a76396f38c 100644 --- a/docs/libcurl/opts/CURLOPT_WS_OPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_WS_OPTIONS.md @@ -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); } } diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md index d80e38ed78..894c1384a5 100644 --- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md +++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md @@ -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); } }