From: Daniel Stenberg Date: Tue, 27 Feb 2024 11:29:27 +0000 (+0100) Subject: examples: use present tense in comments X-Git-Tag: curl-8_7_0~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f540e43b9db8a507e1afa83a66b059aff7c965f2;p=thirdparty%2Fcurl.git examples: use present tense in comments remove "will" and some other word fixes Closes #13003 --- diff --git a/docs/examples/address-scope.c b/docs/examples/address-scope.c index dc305a072e..5650fdb230 100644 --- a/docs/examples/address-scope.c +++ b/docs/examples/address-scope.c @@ -47,7 +47,7 @@ int main(void) my_scope_id = if_nametoindex("eth0"); curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/altsvc.c b/docs/examples/altsvc.c index 28e9794e85..2f70d05e1a 100644 --- a/docs/examples/altsvc.c +++ b/docs/examples/altsvc.c @@ -44,7 +44,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long) CURLALTSVC_H1|CURLALTSVC_H2|CURLALTSVC_H3); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index 156e8d1524..269e29cf56 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -100,7 +100,7 @@ int main(int argc, char **argv) fp = fopen(file, "rb"); fstat(FILENO(fp), &file_info); - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ curl_global_init(CURL_GLOBAL_ALL); /* get a curl handle */ diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index 647b495b4c..ff748db4b4 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -139,7 +139,7 @@ int main(void) curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); - /* Turn off the default CA locations, otherwise libcurl will load CA + /* Turn off the default CA locations, otherwise libcurl loads CA * certificates from the locations that were detected/specified at * build-time */ @@ -155,19 +155,18 @@ int main(void) else printf("*** transfer failed ***\n"); - /* use a fresh connection (optional) - * this option seriously impacts performance of multiple transfers but - * it is necessary order to demonstrate this example. recall that the - * ssl ctx callback is only called _before_ an SSL connection is - * established, therefore it will not affect existing verified SSL - * connections already in the connection cache associated with this - * handle. normally you would set the ssl ctx function before making - * any transfers, and not use this option. + /* use a fresh connection (optional) this option seriously impacts + * performance of multiple transfers but it is necessary order to + * demonstrate this example. recall that the ssl ctx callback is only called + * _before_ an SSL connection is established, therefore it does not affect + * existing verified SSL connections already in the connection cache + * associated with this handle. normally you would set the ssl ctx function + * before making any transfers, and not use this option. */ curl_easy_setopt(ch, CURLOPT_FRESH_CONNECT, 1L); - /* second try: retrieve page using cacerts' certificate -> will succeed - * load the certificate by installing a function doing the necessary + /* second try: retrieve page using cacerts' certificate -> succeeds to load + * the certificate by installing a function doing the necessary * "modifications" to the SSL CONTEXT just before link init */ curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function); diff --git a/docs/examples/connect-to.c b/docs/examples/connect-to.c index fcdd2cc4ff..ad1e304649 100644 --- a/docs/examples/connect-to.c +++ b/docs/examples/connect-to.c @@ -22,7 +22,7 @@ * ***************************************************************************/ /* - * Use CURLOPT_CONNECT_TO to connect to "wrong" host name + * Use CURLOPT_CONNECT_TO to connect to "wrong" hostname * */ #include @@ -39,8 +39,8 @@ int main(void) request, PORT is the port of the request, CONNECT-TO-HOST is the host name to connect to, and CONNECT-TO-PORT is the port to connect to. */ - /* instead of curl.se:443, it will resolve and use example.com:443 but in - other aspects work as if it still is curl.se */ + /* instead of curl.se:443, it resolves and uses example.com:443 but in other + aspects work as if it still is curl.se */ struct curl_slist *host = curl_slist_append(NULL, "curl.se:443:example.com:443"); @@ -51,13 +51,13 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/"); /* since this connects to the wrong host, checking the host name in the - server certificate will fail, so unless we disable the check libcurl + server certificate fails, so unless we disable the check libcurl returns CURLE_PEER_FAILED_VERIFICATION */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); /* Letting the wrong host name in the certificate be okay, the transfer - goes through but will (most likely) cause a 404 or similar because it - sends an unknown name in the Host: header field */ + 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); /* always cleanup */ diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c index 1200498306..0cc47cff7f 100644 --- a/docs/examples/cookie_interface.c +++ b/docs/examples/cookie_interface.c @@ -107,10 +107,9 @@ main(void) } /* HTTP-header style cookie. If you use the Set-Cookie format and do not - specify a domain then the cookie is sent for any domain and will not be - modified, likely not what you intended. Starting in 7.43.0 any-domain - cookies will not be exported either. For more information refer to the - CURLOPT_COOKIELIST documentation. + specify a domain then the cookie is sent for any domain and is not + modified, likely not what you intended. For more information refer to + the CURLOPT_COOKIELIST documentation. */ snprintf(nline, sizeof(nline), "Set-Cookie: OLD_PREF=3d141414bf4209321; " diff --git a/docs/examples/default-scheme.c b/docs/examples/default-scheme.c index 525dcc3c32..13e1e08fcb 100644 --- a/docs/examples/default-scheme.c +++ b/docs/examples/default-scheme.c @@ -43,7 +43,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c index 0ce68de5dd..0c8a269248 100644 --- a/docs/examples/ephiperfifo.c +++ b/docs/examples/ephiperfifo.c @@ -138,8 +138,8 @@ static void mcode_or_die(const char *where, CURLMcode code) static void timer_cb(GlobalInfo* g, int revents); -/* Update the timer after curl_multi library does it's thing. Curl will - * inform us through this callback what it wants the new timeout to be, +/* Update the timer after curl_multi library does its thing. Curl informs the + * application through this callback what it wants the new timeout to be, * after it does some work. */ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { @@ -228,9 +228,9 @@ static void timer_cb(GlobalInfo* g, int revents) if(err == -1) { /* Note that we may call the timer callback even if the timerfd is not * readable. It's possible that there are multiple events stored in the - * epoll buffer (i.e. the timer may have fired multiple times). The - * event count is cleared after the first call so future events in the - * epoll buffer will fail to read from the timer. */ + * epoll buffer (i.e. the timer may have fired multiple times). The event + * count is cleared after the first call so future events in the epoll + * buffer fails to read from the timer. */ if(errno == EAGAIN) { fprintf(MSG_OUT, "EAGAIN on tfd %d\n", g->tfd); return; @@ -386,8 +386,8 @@ static void new_conn(char *url, GlobalInfo *g) rc = curl_multi_add_handle(g->multi, conn->easy); mcode_or_die("new_conn: curl_multi_add_handle", rc); - /* note that the add_handle() will set a time-out to trigger soon so that - the necessary socket_action() call will be called by this app */ + /* note that the add_handle() sets a timeout to trigger soon so that the + * necessary socket_action() call gets called by this app */ } /* This gets called whenever data is received from the fifo */ diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index 17bff2b65a..8997dff11d 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -364,8 +364,8 @@ static void new_conn(char *url, GlobalInfo *g) rc = curl_multi_add_handle(g->multi, conn->easy); mcode_or_die("new_conn: curl_multi_add_handle", rc); - /* note that the add_handle() will set a time-out to trigger soon so that - the necessary socket_action() call will be called by this app */ + /* note that add_handle() sets a timeout to trigger soon so that the + necessary socket_action() gets called */ } /* This gets called whenever data is received from the fifo */ diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 9c34373443..21e9a9c477 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -106,8 +106,8 @@ int main(void) curl = curl_easy_init(); if(curl) { /* - * Note that libcurl will internally think that you connect to the host - * and port that you specify in the URL option. + * Note that libcurl internally thinks that you connect to the host and + * port that you specify in the URL option. */ curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999"); diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c index f805432479..8a1b3c88f2 100644 --- a/docs/examples/ftp-wildcard.c +++ b/docs/examples/ftp-wildcard.c @@ -70,7 +70,7 @@ int main(int argc, char **argv) /* callback is called after data from the file have been transferred */ curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded); - /* this callback will write contents into files */ + /* this callback writes contents into files */ curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it); /* put transfer data into callbacks */ diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c index 238885dfec..33c26b380e 100644 --- a/docs/examples/ftpgetresp.c +++ b/docs/examples/ftpgetresp.c @@ -47,10 +47,10 @@ int main(void) FILE *ftpfile; FILE *respfile; - /* local file name to store the file as */ + /* local filename to store the file as */ ftpfile = fopen(FTPBODY, "wb"); /* b is binary, needed on win32 */ - /* local file name to store the FTP server's response lines in */ + /* local filename to store the FTP server's response lines in */ respfile = fopen(FTPHEADERS, "wb"); /* b is binary, needed on win32 */ curl = curl_easy_init(); diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index 92bb0b8a0b..d43f090269 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -46,10 +46,10 @@ #define REMOTE_URL "ftp://example.com/" UPLOAD_FILE_AS #define RENAME_FILE_TO "renamed-and-fine.txt" -/* NOTE: if you want this example to work on Windows with libcurl as a - DLL, you MUST also provide a read callback with CURLOPT_READFUNCTION. - Failing to do so will give you a crash since a DLL may not use the - variable's memory when passed in to it from an app like this. */ +/* NOTE: if you want this example to work on Windows with libcurl as a DLL, + you MUST also provide a read callback with CURLOPT_READFUNCTION. Failing to + do so might give you a crash since a DLL may not use the variable's memory + when passed in to it from an app like this. */ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream) { unsigned long nread; @@ -90,7 +90,7 @@ int main(void) /* get a FILE * of the same file */ hd_src = fopen(LOCAL_FILE, "rb"); - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ curl_global_init(CURL_GLOBAL_ALL); /* get a curl handle */ diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 9613cca262..699468d1cc 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -76,7 +76,7 @@ int main(void) upload.readptr = data; upload.sizeleft = strlen(data); - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ res = curl_global_init(CURL_GLOBAL_DEFAULT); /* Check for errors */ if(res != CURLE_OK) { @@ -111,7 +111,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)upload.sizeleft); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index 42d31a2bbf..d4063925dd 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -112,12 +112,10 @@ static int upload(CURL *curlhandle, const char *remotepath, /* determine the length of the file already written */ /* - * With NOBODY and NOHEADER, libcurl will issue a SIZE - * command, but the only way to retrieve the result is - * to parse the returned Content-Length header. Thus, - * getcontentlengthfunc(). We need discardfunc() above - * because HEADER will dump the headers to stdout - * without it. + * With NOBODY and NOHEADER, libcurl issues a SIZE command, but the only + * way to retrieve the result is to parse the returned Content-Length + * header. Thus, getcontentlengthfunc(). We need discardfunc() above + * because HEADER dumps the headers to stdout without it. */ curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L); curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L); diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index 8ec84142db..173247d915 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -66,7 +66,7 @@ int main(void) struct MemoryStruct chunk; - chunk.memory = malloc(1); /* will be grown as needed by the realloc above */ + chunk.memory = malloc(1); /* grown as needed by the realloc above */ chunk.size = 0; /* no data at this point */ curl_global_init(CURL_GLOBAL_ALL); diff --git a/docs/examples/getredirect.c b/docs/examples/getredirect.c index 9163c9b079..91c778d3c1 100644 --- a/docs/examples/getredirect.c +++ b/docs/examples/getredirect.c @@ -41,7 +41,7 @@ int main(void) /* example.com is redirected, figure out the redirection! */ - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/getreferrer.c b/docs/examples/getreferrer.c index 6073f9fca4..c46f7825a0 100644 --- a/docs/examples/getreferrer.c +++ b/docs/examples/getreferrer.c @@ -39,7 +39,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer"); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index 5a4f4a7057..4510edae50 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -323,8 +323,8 @@ static void new_conn(char *url, GlobalInfo *g) rc = curl_multi_add_handle(g->multi, conn->easy); mcode_or_die("new_conn: curl_multi_add_handle", rc); - /* note that the add_handle() will set a time-out to trigger soon so that - the necessary socket_action() call will be called by this app */ + /* note that add_handle() sets a timeout to trigger soon so that the + necessary socket_action() gets called */ } /* This gets called by glib whenever data is received from the fifo */ diff --git a/docs/examples/headerapi.c b/docs/examples/headerapi.c index 4df6cbd672..95c366884a 100644 --- a/docs/examples/headerapi.c +++ b/docs/examples/headerapi.c @@ -51,7 +51,7 @@ int main(void) /* this example just ignores the content */ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index 9fba341bb6..bde30594f8 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -358,8 +358,8 @@ static void new_conn(char *url, GlobalInfo *g) rc = curl_multi_add_handle(g->multi, conn->easy); mcode_or_die("new_conn: curl_multi_add_handle", rc); - /* note that the add_handle() will set a time-out to trigger soon so that - the necessary socket_action() call will be called by this app */ + /* note that the add_handle() sets a time-out to trigger soon so that + the necessary socket_action() gets called */ } /* This gets called whenever data is received from the fifo */ @@ -454,8 +454,9 @@ int main(int argc, char **argv) event_base_dispatch(g.evbase); - /* this, of course, will not get called since only way to stop this program - is via ctrl-C, but it is here to show how cleanup /would/ be done. */ + /* this, of course, does not get called since the only way to stop this + program is via ctrl-C, but it is here to show how cleanup /would/ be + done. */ clean_fifo(&g); event_del(&g.timer_event); event_base_free(g.evbase); diff --git a/docs/examples/hsts-preload.c b/docs/examples/hsts-preload.c index ee4253533e..a25773f42d 100644 --- a/docs/examples/hsts-preload.c +++ b/docs/examples/hsts-preload.c @@ -104,7 +104,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/http-options.c b/docs/examples/http-options.c index 964e0ef374..586b55f12a 100644 --- a/docs/examples/http-options.c +++ b/docs/examples/http-options.c @@ -42,10 +42,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_REQUEST_TARGET, "*"); /* if this operation fails, allow risking a memory leak and do quick exit - from libcurl as this will exit() anyway */ + from libcurl as this exits anyway */ curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index 2cacefee47..1ee9f69c0f 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -33,7 +33,7 @@ int main(void) CURL *curl; CURLcode res; - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ curl_global_init(CURL_GLOBAL_ALL); /* get a curl handle */ @@ -46,7 +46,7 @@ int main(void) /* Now specify the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl"); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index 5da7ed6035..c45a1c2d65 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -39,9 +39,9 @@ #include #ifndef CURLPIPE_MULTIPLEX -/* This little trick will just make sure that we do not enable pipelining for - libcurls old enough to not have this symbol. It is _not_ defined to zero in - a recent libcurl header. */ +/* This little trick makes sure that we do not enable pipelining for libcurls + old enough to not have this symbol. It is _not_ defined to zero in a recent + libcurl header. */ #define CURLPIPE_MULTIPLEX 0 #endif diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index dd63b8cd50..56d0c98250 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -41,9 +41,9 @@ #include #ifndef CURLPIPE_MULTIPLEX -/* This little trick will just make sure that we do not enable pipelining for - libcurls old enough to not have this symbol. It is _not_ defined to zero in - a recent libcurl header. */ +/* This little trick makes sure that we do not enable pipelining for libcurls + old enough to not have this symbol. It is _not_ defined to zero in a recent + libcurl header. */ #define CURLPIPE_MULTIPLEX 0 #endif diff --git a/docs/examples/http3.c b/docs/examples/http3.c index 900e119208..e278f2e313 100644 --- a/docs/examples/http3.c +++ b/docs/examples/http3.c @@ -41,7 +41,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_3); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c index 98d7c3d742..e8a8de7a25 100644 --- a/docs/examples/httpput-postfields.c +++ b/docs/examples/httpput-postfields.c @@ -58,7 +58,7 @@ int main(int argc, char **argv) url = argv[1]; - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ curl_global_init(CURL_GLOBAL_ALL); /* get a curl handle */ diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index b9a6c87b74..d26aa9e250 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -82,7 +82,7 @@ int main(int argc, char **argv) an example! */ hd_src = fopen(file, "rb"); - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ curl_global_init(CURL_GLOBAL_ALL); /* get a curl handle */ diff --git a/docs/examples/https.c b/docs/examples/https.c index 2a34e37d83..c1cba877df 100644 --- a/docs/examples/https.c +++ b/docs/examples/https.c @@ -57,8 +57,8 @@ int main(void) /* * If the site you are connecting to uses a different host name that what * they have mentioned in their server certificate's commonName (or - * subjectAltName) fields, libcurl will refuse to connect. You can skip - * this check, but this will make the connection less secure. + * subjectAltName) fields, libcurl refuses to connect. You can skip this + * check, but it makes the connection insecure. */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); #endif @@ -66,7 +66,7 @@ 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 will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c index 33566bb643..1839deac1d 100644 --- a/docs/examples/imap-append.c +++ b/docs/examples/imap-append.c @@ -99,7 +99,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will create a new message in folder "Sent". */ + /* This creates a new message in folder "Sent". */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/Sent"); /* In this case, we are using a callback function to specify the data. You diff --git a/docs/examples/imap-authzid.c b/docs/examples/imap-authzid.c index af07320645..eb615c6f3d 100644 --- a/docs/examples/imap-authzid.c +++ b/docs/examples/imap-authzid.c @@ -53,7 +53,7 @@ int main(void) /* Force PLAIN authentication */ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); - /* This will fetch message 1 from the user's inbox */ + /* This fetches message 1 from the user's inbox */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c index 0920f09443..a221be0ca8 100644 --- a/docs/examples/imap-copy.c +++ b/docs/examples/imap-copy.c @@ -53,7 +53,7 @@ int main(void) /* Set the COPY command specifying the message ID and destination folder */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "COPY 1 FOLDER"); - /* Note that to perform a move operation you will need to perform the copy, + /* Note that to perform a move operation you need to perform the copy, * then mark the original mail as Deleted and EXPUNGE or CLOSE. Please see * imap-store.c for more information on deleting messages. */ diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c index 3361d7cfe5..416fe88096 100644 --- a/docs/examples/imap-fetch.c +++ b/docs/examples/imap-fetch.c @@ -47,7 +47,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will fetch message 1 from the user's inbox */ + /* This fetches message 1 from the user's inbox */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c index 2f3780f2d0..0253b543e6 100644 --- a/docs/examples/imap-list.c +++ b/docs/examples/imap-list.c @@ -47,8 +47,8 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will list the folders within the user's mailbox. If you want to - * list the folders within a specific folder, for example the inbox, then + /* This lists the folders within the user's mailbox. If you want to list + * the folders within a specific folder, for example the inbox, then * specify the folder as a path in the URL such as /INBOX */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c index 6a5f4b070f..42fa7381cd 100644 --- a/docs/examples/imap-multi.c +++ b/docs/examples/imap-multi.c @@ -56,7 +56,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will fetch message 1 from the user's inbox */ + /* This fetches message 1 from the user's inbox */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); /* Tell the multi stack about our easy handle */ diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c index e920720c01..a2774bea4a 100644 --- a/docs/examples/imap-ssl.c +++ b/docs/examples/imap-ssl.c @@ -48,7 +48,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will fetch message 1 from the user's inbox. Note the use of + /* This fetches message 1 from the user's inbox. Note the use of * imaps:// rather than imap:// to request a SSL based connection. */ curl_easy_setopt(curl, CURLOPT_URL, "imaps://imap.example.com/INBOX/;UID=1"); @@ -67,13 +67,13 @@ int main(void) /* If the site you are connecting to uses a different host name that what * they have mentioned in their server certificate's commonName (or - * subjectAltName) fields, libcurl will refuse to connect. You can skip - * this check, but this will make the connection less secure. */ + * subjectAltName) fields, libcurl refuses to connect. You can skip this + * check, but it makes the connection insecure. */ #ifdef SKIP_HOSTNAME_VERIFICATION curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); #endif - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c index d98f5ef9f9..838923b334 100644 --- a/docs/examples/imap-tls.c +++ b/docs/examples/imap-tls.c @@ -48,14 +48,14 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will fetch message 1 from the user's inbox */ + /* This fetches message 1 from the user's inbox */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); - /* In this example, we will start with a plain text connection, and upgrade - * to Transport Layer Security (TLS) using the STARTTLS command. Be careful - * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer - * will continue anyway - see the security discussion in the libcurl + /* In this example, we start with a plain text connection, and upgrade to + * Transport Layer Security (TLS) using the STARTTLS command. Be careful + * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the + * transfer continues anyway - see the security discussion in the libcurl * tutorial for more details. */ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); @@ -73,7 +73,7 @@ int main(void) * for more information. */ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem"); - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/localport.c b/docs/examples/localport.c index 56e0b62cfb..7e88ce48a7 100644 --- a/docs/examples/localport.c +++ b/docs/examples/localport.c @@ -38,8 +38,8 @@ int main(void) /* Try to use a local port number between 20000-20009 */ curl_easy_setopt(curl, CURLOPT_LOCALPORT, 20000L); /* 10 means number of attempts, which starts with the number set in - CURLOPT_LOCALPORT. The lowe value set, the smaller the change it will - work. */ + CURLOPT_LOCALPORT. The lower value set, the smaller the chance it + works. */ curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 10L); curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/"); diff --git a/docs/examples/maxconnects.c b/docs/examples/maxconnects.c index 84fefd7bc8..2e8e5b50a8 100644 --- a/docs/examples/maxconnects.c +++ b/docs/examples/maxconnects.c @@ -51,7 +51,7 @@ int main(void) while(urls[i]) { curl_easy_setopt(curl, CURLOPT_URL, urls[i]); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 3dbc46483e..63918f182e 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -60,7 +60,7 @@ int main(void) for(i = 0; ieasy_handle; @@ -155,8 +155,7 @@ static int start_timeout(CURLM *multi, long timeout_ms, void *userp) } else { if(timeout_ms == 0) - timeout_ms = 1; /* 0 means directly call socket_action, but we will do it - in a bit */ + timeout_ms = 1; /* 0 means call socket_action asap */ struct timeval tv; tv.tv_sec = timeout_ms / 1000; tv.tv_usec = (timeout_ms % 1000) * 1000; diff --git a/docs/examples/multi-legacy.c b/docs/examples/multi-legacy.c index f36139fe1d..67575418e5 100644 --- a/docs/examples/multi-legacy.c +++ b/docs/examples/multi-legacy.c @@ -60,7 +60,7 @@ int main(void) for(i = 0; ieasy_handle; @@ -165,8 +165,7 @@ static int start_timeout(CURLM *multi, long timeout_ms, void *userp) } else { if(timeout_ms == 0) - timeout_ms = 1; /* 0 means directly call socket_action, but we will do it - in a bit */ + timeout_ms = 1; /* 0 means call socket_action asap */ uv_timer_start(&timeout, on_timeout, timeout_ms, 0); } return 0; diff --git a/docs/examples/parseurl.c b/docs/examples/parseurl.c index 688336f025..8675adc623 100644 --- a/docs/examples/parseurl.c +++ b/docs/examples/parseurl.c @@ -48,7 +48,7 @@ int main(void) if(uc) goto fail; - /* extract host name from the parsed URL */ + /* extract hostname from the parsed URL */ uc = curl_url_get(h, CURLUPART_HOST, &host, 0); if(!uc) { printf("Host name: %s\n", host); @@ -75,6 +75,6 @@ int main(void) } fail: - curl_url_cleanup(h); /* free url handle */ + curl_url_cleanup(h); /* free URL handle */ return 0; } diff --git a/docs/examples/persistent.c b/docs/examples/persistent.c index 51bd8c352c..4be7d6f2af 100644 --- a/docs/examples/persistent.c +++ b/docs/examples/persistent.c @@ -44,7 +44,7 @@ int main(void) /* get the first document */ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) @@ -55,7 +55,7 @@ int main(void) connection */ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/docs/"); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/pop3-authzid.c b/docs/examples/pop3-authzid.c index a948e95c63..3281b322bb 100644 --- a/docs/examples/pop3-authzid.c +++ b/docs/examples/pop3-authzid.c @@ -53,7 +53,7 @@ int main(void) /* Force PLAIN authentication */ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); - /* This will retrieve message 1 from the user's mailbox */ + /* This retrieves message 1 from the user's mailbox */ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); /* Perform the retr */ diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c index 2e8b3baee2..2cd44e41cd 100644 --- a/docs/examples/pop3-list.c +++ b/docs/examples/pop3-list.c @@ -47,7 +47,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will list every message of the given mailbox */ + /* This lists every message of the given mailbox */ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); /* Perform the list */ diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c index b4fad19251..54eb7ecc32 100644 --- a/docs/examples/pop3-multi.c +++ b/docs/examples/pop3-multi.c @@ -56,7 +56,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will retrieve message 1 from the user's mailbox */ + /* This retrieves message 1 from the user's mailbox */ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); /* Tell the multi stack about our easy handle */ diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c index 4940e07812..8e690f972f 100644 --- a/docs/examples/pop3-retr.c +++ b/docs/examples/pop3-retr.c @@ -47,7 +47,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will retrieve message 1 from the user's mailbox */ + /* This retrieves message 1 from the user's mailbox */ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); /* Perform the retr */ diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c index e72cf6f38d..dcc7992e41 100644 --- a/docs/examples/pop3-ssl.c +++ b/docs/examples/pop3-ssl.c @@ -48,7 +48,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will retrieve message 1 from the user's mailbox. Note the use of + /* This retrieves message 1 from the user's mailbox. Note the use of * pop3s:// rather than pop3:// to request a SSL based connection. */ curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1"); @@ -66,13 +66,13 @@ int main(void) /* If the site you are connecting to uses a different host name that what * they have mentioned in their server certificate's commonName (or - * subjectAltName) fields, libcurl will refuse to connect. You can skip - * this check, but this will make the connection less secure. */ + * subjectAltName) fields, libcurl refuses to connect. You can skip this + * check, but it makes the connection insecure. */ #ifdef SKIP_HOSTNAME_VERIFICATION curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); #endif - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c index 04e6e3b71f..7c2d824d04 100644 --- a/docs/examples/pop3-tls.c +++ b/docs/examples/pop3-tls.c @@ -48,14 +48,14 @@ int main(void) curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); - /* This will retrieve message 1 from the user's mailbox */ + /* This retrieves message 1 from the user's mailbox */ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); - /* In this example, we will start with a plain text connection, and upgrade - * to Transport Layer Security (TLS) using the STLS command. Be careful of + /* In this example, we start with a plain text connection, and upgrade to + * Transport Layer Security (TLS) using the STLS command. Be careful of * using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer - * will continue anyway - see the security discussion in the libcurl - * tutorial for more details. */ + * continues anyway - see the security discussion in the libcurl tutorial + * for more details. */ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); /* If your server does not have a valid certificate, then you can disable @@ -72,7 +72,7 @@ int main(void) * for more information. */ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem"); - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index a802c35825..311bc3cae0 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -73,7 +73,7 @@ int main(void) wt.readptr = data; wt.sizeleft = strlen(data); - /* In windows, this will init the winsock stuff */ + /* In windows, this inits the winsock stuff */ res = curl_global_init(CURL_GLOBAL_DEFAULT); /* Check for errors */ if(res != CURLE_OK) { @@ -141,7 +141,7 @@ int main(void) } #endif - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index 1610ad5a51..cbdc77f75c 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -63,7 +63,7 @@ int main(void) struct MemoryStruct chunk; static const char *postthis = "Field=1&Field=2&Field=3"; - chunk.memory = malloc(1); /* will be grown as needed by realloc above */ + chunk.memory = malloc(1); /* grown as needed by realloc above */ chunk.size = 0; /* no data at this point */ curl_global_init(CURL_GLOBAL_ALL); @@ -83,11 +83,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis); - /* if we do not provide POSTFIELDSIZE, libcurl will strlen() by - itself */ + /* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis)); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) { diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c index 27761fcda3..02e50aa3d6 100644 --- a/docs/examples/postit2-formadd.c +++ b/docs/examples/postit2-formadd.c @@ -27,17 +27,17 @@ */ /* - * Example code that uploads a file name 'foo' to a remote script that accepts + * Example code that uploads a filename 'foo' to a remote script that accepts * "HTML form based" (as described in RFC 1738) uploads using HTTP POST. * * Warning: this example uses the deprecated form api. See "postit2.c" * for a similar example using the mime api. * - * The imaginary form we will fill in looks like: + * The imaginary form we fill in looks like: * *
* Enter file: - * Enter file name: + * Enter filename: * *
*/ @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index a1fb12b0fc..0f12cd4786 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -25,14 +25,14 @@ * HTTP Multipart formpost with file upload and two additional parts. * */ -/* Example code that uploads a file name 'foo' to a remote script that accepts +/* Example code that uploads a filename 'foo' to a remote script that accepts * "HTML form based" (as described in RFC 1738) uploads using HTTP POST. * - * The imaginary form we will fill in looks like: + * The imaginary form we fill in looks like: * *
* Enter file: - * Enter file name: + * Enter filename: * *
* @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_MIMEPOST, form); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/range.c b/docs/examples/range.c index 1a93f3676a..c8229fca4d 100644 --- a/docs/examples/range.c +++ b/docs/examples/range.c @@ -22,7 +22,7 @@ * ***************************************************************************/ /* - * GET a range only of a HTTP resource + * GET a range only of an HTTP resource * */ #include diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c index a16f459545..6514e93d8d 100644 --- a/docs/examples/resolve.c +++ b/docs/examples/resolve.c @@ -22,7 +22,7 @@ * ***************************************************************************/ /* - * Use CURLOPT_RESOLVE to feed custom IP addresses for given host name + port + * Use CURLOPT_RESOLVE to feed custom IP addresses for given hostname + port * number combinations. * */ @@ -35,9 +35,9 @@ int main(void) CURLcode res = CURLE_OK; /* Each single name resolve string should be written using the format - HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, - PORT is the port number of the service where libcurl wants to connect to - the HOST and ADDRESS is the numerical IP address + HOST:PORT:ADDRESS where HOST is the name libcurl tries to resolve, PORT + is the port number of the service where libcurl wants to connect to the + HOST and ADDRESS is the numerical IP address */ struct curl_slist *host = curl_slist_append(NULL, "example.com:443:127.0.0.1"); diff --git a/docs/examples/rtsp-options.c b/docs/examples/rtsp-options.c index e4a623048e..d1ddbf01ff 100644 --- a/docs/examples/rtsp-options.c +++ b/docs/examples/rtsp-options.c @@ -41,7 +41,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index eabe0c2269..0b7e86a3f0 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -100,8 +100,7 @@ int main(void) return 1; } - /* Extract the socket from the curl handle - we will need it for - waiting. */ + /* Extract the socket from the curl handle - we need it for waiting. */ res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd); if(res != CURLE_OK) { diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c index 992d607ef9..4d33939a40 100644 --- a/docs/examples/sftpget.c +++ b/docs/examples/sftpget.c @@ -34,10 +34,10 @@ #undef DISABLE_SSH_AGENT /* - * This is an example showing how to get a single file from an SFTP server. - * It delays the actual destination file creation until the first write - * callback so that it will not create an empty file in case the remote file - * does not exist or something else fails. + * This is an example showing how to get a single file from an SFTP server. It + * delays the actual destination file creation until the first write callback + * so that it does not create an empty file in case the remote file does not + * exist or something else fails. */ struct FtpFile { diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c index 26bfb1a461..dc6805a9f1 100644 --- a/docs/examples/shared-connection-cache.c +++ b/docs/examples/shared-connection-cache.c @@ -57,8 +57,8 @@ int main(void) curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock); curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock); - /* Loop the transfer and cleanup the handle properly every lap. This will - still reuse connections since the pool is in the shared object! */ + /* Loop the transfer and cleanup the handle properly every lap. This still + reuses connections since the pool is in the shared object! */ for(i = 0; i < 3; i++) { CURL *curl = curl_easy_init(); @@ -70,7 +70,7 @@ int main(void) /* use the share object */ curl_easy_setopt(curl, CURLOPT_SHARE, share); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/simple.c b/docs/examples/simple.c index 8579b0ba54..53c8e4754f 100644 --- a/docs/examples/simple.c +++ b/docs/examples/simple.c @@ -39,7 +39,7 @@ 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 will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c index 89435afa62..7ced982fe0 100644 --- a/docs/examples/simplepost.c +++ b/docs/examples/simplepost.c @@ -41,11 +41,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis); - /* if we do not provide POSTFIELDSIZE, libcurl will strlen() by - itself */ + /* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis)); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index 9d933ce82c..7145493a69 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -38,7 +38,7 @@ 3.2. set pEngine to the name of the crypto engine you use 3.3. set pKeyName to the key identifier you want to use 4. if you do not use a crypto engine: - 4.1. set pKeyName to the file name of your client key + 4.1. set pKeyName to the filename of your client key 4.2. if the format of the key file is DER, set pKeyType to "DER" !! verify of the server certificate is not implemented here !! @@ -124,7 +124,7 @@ int main(void) /* disconnect if we cannot validate server's cert */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index 906660f999..c53951262a 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -113,8 +113,8 @@ gboolean pulse_bar(gpointer data) gtk_progress_bar_pulse(GTK_PROGRESS_BAR (data)); gdk_threads_leave(); - /* Return true so the function will be called again; - * returning false removes this timeout function. + /* Return true so the function is called again; returning false removes this + * timeout function. */ return TRUE; } diff --git a/docs/examples/smtp-authzid.c b/docs/examples/smtp-authzid.c index dc24d7f4d5..daaeab1694 100644 --- a/docs/examples/smtp-authzid.c +++ b/docs/examples/smtp-authzid.c @@ -115,8 +115,8 @@ int main(void) /* Force PLAIN authentication */ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); - /* Note that this option is not strictly required, omitting it will result - * in libcurl sending the MAIL FROM command with empty sender data. All + /* Note that this option is not strictly required, omitting it results in + * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more @@ -147,7 +147,7 @@ int main(void) /* Free the list of recipients */ curl_slist_free_all(recipients); - /* curl will not send the QUIT command until you call cleanup, so you + /* curl does not send the QUIT command until you call cleanup, so you * should be able to reuse this connection for additional messages * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and * calling curl_easy_perform() again. It may not be a good idea to keep diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c index e61b6b4eee..202d1d089f 100644 --- a/docs/examples/smtp-expn.c +++ b/docs/examples/smtp-expn.c @@ -68,7 +68,7 @@ int main(void) /* Free the list of recipients */ curl_slist_free_all(recipients); - /* curl will not send the QUIT command until you call cleanup, so you + /* curl does not send the QUIT command until you call cleanup, so you * should be able to reuse this connection for additional requests. It may * not be a good idea to keep the connection open for a long time though * (more than a few minutes may result in the server timing out the diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c index 742787824f..29918de7ff 100644 --- a/docs/examples/smtp-mail.c +++ b/docs/examples/smtp-mail.c @@ -101,8 +101,8 @@ int main(void) /* This is the URL for your mailserver */ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); - /* Note that this option is not strictly required, omitting it will result - * in libcurl sending the MAIL FROM command with empty sender data. All + /* Note that this option is not strictly required, omitting it results in + * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more @@ -135,7 +135,7 @@ int main(void) /* Free the list of recipients */ curl_slist_free_all(recipients); - /* curl will not send the QUIT command until you call cleanup, so you + /* curl does not send the QUIT command until you call cleanup, so you * should be able to reuse this connection for additional messages * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and * calling curl_easy_perform() again. It may not be a good idea to keep diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c index 36703a1d82..7a2a9c618b 100644 --- a/docs/examples/smtp-mime.c +++ b/docs/examples/smtp-mime.c @@ -86,8 +86,8 @@ int main(void) /* This is the URL for your mailserver */ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); - /* Note that this option is not strictly required, omitting it will result - * in libcurl sending the MAIL FROM command with empty sender data. All + /* Note that this option is not strictly required, omitting it results in + * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more @@ -150,7 +150,7 @@ int main(void) curl_slist_free_all(recipients); curl_slist_free_all(headers); - /* curl will not send the QUIT command until you call cleanup, so you + /* curl does not send the QUIT command until you call cleanup, so you * should be able to reuse this connection for additional messages * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and * calling curl_easy_perform() again. It may not be a good idea to keep diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c index e5bc4011c1..8837c57fd8 100644 --- a/docs/examples/smtp-multi.c +++ b/docs/examples/smtp-multi.c @@ -103,7 +103,7 @@ int main(void) /* This is the URL for your mailserver */ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); - /* Note that this option is not strictly required, omitting it will result in + /* Note that this option is not strictly required, omitting it results in * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, they diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c index 89708408d7..150de9ceab 100644 --- a/docs/examples/smtp-ssl.c +++ b/docs/examples/smtp-ssl.c @@ -117,14 +117,14 @@ int main(void) /* If the site you are connecting to uses a different host name that what * they have mentioned in their server certificate's commonName (or - * subjectAltName) fields, libcurl will refuse to connect. You can skip - * this check, but this will make the connection less secure. */ + * subjectAltName) fields, libcurl refuses to connect. You can skip this + * check, but it makes the connection insecure. */ #ifdef SKIP_HOSTNAME_VERIFICATION curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); #endif - /* Note that this option is not strictly required, omitting it will result - * in libcurl sending the MAIL FROM command with empty sender data. All + /* Note that this option is not strictly required, omitting it results in + * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more @@ -146,7 +146,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c index 83aab69cbb..fd4e385023 100644 --- a/docs/examples/smtp-tls.c +++ b/docs/examples/smtp-tls.c @@ -105,10 +105,10 @@ int main(void) * matches your server configuration. */ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587"); - /* In this example, we will start with a plain text connection, and upgrade - * to Transport Layer Security (TLS) using the STARTTLS command. Be careful - * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer - * will continue anyway - see the security discussion in the libcurl + /* In this example, we start with a plain text connection, and upgrade to + * Transport Layer Security (TLS) using the STARTTLS command. Be careful + * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the + * transfer continues anyway - see the security discussion in the libcurl * tutorial for more details. */ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); @@ -125,8 +125,8 @@ int main(void) * for more information. */ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem"); - /* Note that this option is not strictly required, omitting it will result - * in libcurl sending the MAIL FROM command with empty sender data. All + /* Note that this option is not strictly required, omitting it results in + * libcurl sending the MAIL FROM command with empty sender data. All * autoresponses should have an empty reverse-path, and should be directed * to the address in the reverse-path which triggered them. Otherwise, * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more @@ -148,7 +148,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - /* Since the traffic will be encrypted, it is useful to turn on debug + /* Since the traffic is encrypted, it is useful to turn on debug * information within libcurl to see what is happening during the * transfer. */ diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c index 70da41b065..0135efef2d 100644 --- a/docs/examples/smtp-vrfy.c +++ b/docs/examples/smtp-vrfy.c @@ -68,7 +68,7 @@ int main(void) /* Free the list of recipients */ curl_slist_free_all(recipients); - /* curl will not send the QUIT command until you call cleanup, so you + /* curl does not send the QUIT command until you call cleanup, so you * should be able to reuse this connection for additional requests. It may * not be a good idea to keep the connection open for a long time though * (more than a few minutes may result in the server timing out the diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index 2d7d523d50..ab61b2fb00 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -50,7 +50,7 @@ * using HTTP protocol which has no problem with firewall/proxy. * * For this software to work, you should take note of these items. - * 1. Your firewall/proxy must allow your computer to surf internet. + * 1. Your firewall/proxy must allow your computer to surf Internet. * 2. Webserver system time must in sync with the NTP time server, * or at least provide an accurate time keeping. * 3. Webserver HTTP header does not provide the milliseconds units, @@ -59,7 +59,7 @@ * as Round-Trip delay time is not taken into consideration. * Compensation of network, firewall/proxy delay cannot be simply divide * the Round-Trip delay time by half. - * 5. Win32 SetSystemTime() API will set your computer clock according to + * 5. Win32 SetSystemTime() API sets your computer clock according to * GMT/UTC time. Therefore your computer timezone must be properly set. * 6. Webserver data should not be cached by the proxy server. Some * webserver provide Cache-Control to prevent caching. @@ -71,7 +71,7 @@ * tf.nist.gov/timefreq/service/firewall.htm * * Usage: - * This software will synchronise your computer clock only when you issue + * This software synchronises your computer clock only when you issue * it with --synctime. By default, it only display the webserver's clock. * * Written by: Frank (contributed to libcurl) @@ -171,7 +171,7 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, break; } } - AutoSyncTime = 3; /* Computer clock will be adjusted */ + AutoSyncTime = 3; /* Computer clock is adjusted */ } else { AutoSyncTime = 0; /* Error in sscanf() fields conversion */ diff --git a/docs/examples/unixsocket.c b/docs/examples/unixsocket.c index 53c5fd2de8..90c655917d 100644 --- a/docs/examples/unixsocket.c +++ b/docs/examples/unixsocket.c @@ -53,7 +53,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, PATH); #endif - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index 12a2b7937b..b35d982035 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -199,8 +199,7 @@ int main(void) curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM"); - /* first try: retrieve page without user certificate and key -> will fail - */ + /* first try: retrieve page without user certificate and key -> fails */ rv = curl_easy_perform(ch); if(rv == CURLE_OK) { printf("*** transfer succeeded ***\n"); @@ -209,7 +208,7 @@ int main(void) printf("*** transfer failed ***\n"); } - /* second try: retrieve page using user certificate and key -> will succeed + /* second try: retrieve page using user certificate and key -> succeeds * load the certificate and key by installing a function doing the necessary * "modifications" to the SSL CONTEXT just before link init */ diff --git a/docs/examples/websocket-cb.c b/docs/examples/websocket-cb.c index 7adbf4489d..09d6c647dd 100644 --- a/docs/examples/websocket-cb.c +++ b/docs/examples/websocket-cb.c @@ -54,7 +54,7 @@ int main(void) /* pass the easy handle to the callback */ curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl); - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) diff --git a/docs/examples/websocket.c b/docs/examples/websocket.c index dbcd044f5a..039b4f8b95 100644 --- a/docs/examples/websocket.c +++ b/docs/examples/websocket.c @@ -113,7 +113,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */ - /* Perform the request, res will get the return code */ + /* Perform the request, res gets the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK)