]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples: use present tense in comments
authorDaniel Stenberg <daniel@haxx.se>
Tue, 27 Feb 2024 11:29:27 +0000 (12:29 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 27 Feb 2024 15:19:43 +0000 (16:19 +0100)
remove "will" and some other word fixes

Closes #13003

81 files changed:
docs/examples/address-scope.c
docs/examples/altsvc.c
docs/examples/anyauthput.c
docs/examples/cacertinmem.c
docs/examples/connect-to.c
docs/examples/cookie_interface.c
docs/examples/default-scheme.c
docs/examples/ephiperfifo.c
docs/examples/evhiperfifo.c
docs/examples/externalsocket.c
docs/examples/ftp-wildcard.c
docs/examples/ftpgetresp.c
docs/examples/ftpupload.c
docs/examples/ftpuploadfrommem.c
docs/examples/ftpuploadresume.c
docs/examples/getinmemory.c
docs/examples/getredirect.c
docs/examples/getreferrer.c
docs/examples/ghiper.c
docs/examples/headerapi.c
docs/examples/hiperfifo.c
docs/examples/hsts-preload.c
docs/examples/http-options.c
docs/examples/http-post.c
docs/examples/http2-download.c
docs/examples/http2-upload.c
docs/examples/http3.c
docs/examples/httpput-postfields.c
docs/examples/httpput.c
docs/examples/https.c
docs/examples/imap-append.c
docs/examples/imap-authzid.c
docs/examples/imap-copy.c
docs/examples/imap-fetch.c
docs/examples/imap-list.c
docs/examples/imap-multi.c
docs/examples/imap-ssl.c
docs/examples/imap-tls.c
docs/examples/localport.c
docs/examples/maxconnects.c
docs/examples/multi-app.c
docs/examples/multi-debugcallback.c
docs/examples/multi-event.c
docs/examples/multi-legacy.c
docs/examples/multi-single.c
docs/examples/multi-uv.c
docs/examples/parseurl.c
docs/examples/persistent.c
docs/examples/pop3-authzid.c
docs/examples/pop3-list.c
docs/examples/pop3-multi.c
docs/examples/pop3-retr.c
docs/examples/pop3-ssl.c
docs/examples/pop3-tls.c
docs/examples/post-callback.c
docs/examples/postinmemory.c
docs/examples/postit2-formadd.c
docs/examples/postit2.c
docs/examples/range.c
docs/examples/resolve.c
docs/examples/rtsp-options.c
docs/examples/sendrecv.c
docs/examples/sftpget.c
docs/examples/shared-connection-cache.c
docs/examples/simple.c
docs/examples/simplepost.c
docs/examples/simplessl.c
docs/examples/smooth-gtk-thread.c
docs/examples/smtp-authzid.c
docs/examples/smtp-expn.c
docs/examples/smtp-mail.c
docs/examples/smtp-mime.c
docs/examples/smtp-multi.c
docs/examples/smtp-ssl.c
docs/examples/smtp-tls.c
docs/examples/smtp-vrfy.c
docs/examples/synctime.c
docs/examples/unixsocket.c
docs/examples/usercertinmem.c
docs/examples/websocket-cb.c
docs/examples/websocket.c

index dc305a072ecd0f29d3db09fbc4abf0e73527c590..5650fdb230a1894e55dbbf8a03fa8cac938cc5a2 100644 (file)
@@ -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)
index 28e9794e85cea98124337031839ef85c75c75a4b..2f70d05e1ab2940a19551232d613928b6e0054d6 100644 (file)
@@ -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)
index 156e8d15245fb7c4a8eb26716c126afa015361f2..269e29cf566631153beb384e7c417d61c02d17ed 100644 (file)
@@ -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 */
index 647b495b4c598d7404ff8e91bacdf1b9011a19f5..ff748db4b4c8dce4d3fa6c89068122e7b7f17ba3 100644 (file)
@@ -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);
index fcdd2cc4ff7d7a2ab2b71aedd6a9b672d28b6610..ad1e304649648af08af631b49bcdf893f66f50c4 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * Use CURLOPT_CONNECT_TO to connect to "wrong" host name
+ * Use CURLOPT_CONNECT_TO to connect to "wrong" hostname
  * </DESC>
  */
 #include <stdio.h>
@@ -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 */
index 120049830674fa81b340ef14cf7686e2e201420b..0cc47cff7fa3f2b225ee1cbfb3380aef5dd301dc 100644 (file)
@@ -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; "
index 525dcc3c32a24e0c6b3553564f7d93a1620a52b5..13e1e08fcb3e6ab6d504f27c1a79e070b257ee72 100644 (file)
@@ -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)
index 0ce68de5dd5befdc8a25a2e04c265e86c0fa88c6..0c8a2692486f77f04dfc9faa0790da02a0084322 100644 (file)
@@ -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 */
index 17bff2b65ade2c2e281a31201fcc7f52ed2ed82c..8997dff11de62e64a4aabe9df4232cdcbefafd9f 100644 (file)
@@ -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 */
index 9c343734436be4a5b7a347963ca3d7ad3c3774d1..21e9a9c477d16292afa5fc98fb5fa6bc4fefc672 100644 (file)
@@ -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");
 
index f80543247954b62af55caf7d16ac50b07cabb96b..8a1b3c88f2f9675fa98957313a97cc2d1f6b975d 100644 (file)
@@ -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 */
index 238885dfec8cbfaabbc16a0cc69a13e5df7b9fca..33c26b380ebc1f2d3f0e32861640f70352c4edbc 100644 (file)
@@ -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();
index 92bb0b8a0ba73faf09138d152cf5ca9f03f11c62..d43f0902699bea3578861fa218c27df9a284b5f2 100644 (file)
 #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 */
index 9613cca262f49f5cbd229924fdfa8d73eaac50ad..699468d1ccfd7c48c1b49b9460b00ec29922a764 100644 (file)
@@ -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)
index 42d31a2bbfbdeb4b23b6a3b2cdb0a1798c045ec5..d4063925dd4175f59a43076d944d7b4147cb1ff4 100644 (file)
@@ -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);
index 8ec84142dbf1588c9acc8d63dbb4d7084236b9d3..173247d91520835602189e6cec7ad2e574b00636 100644 (file)
@@ -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);
index 9163c9b079ac5a74ac978b88b889a74e8aece098..91c778d3c1b8e8158e35d29ce486871e169bbdfe 100644 (file)
@@ -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)
index 6073f9fca46c87d9dfb0bd3a6819e035361b37a5..c46f7825a0aa96a34f42b7b4e993fb69c726bd79 100644 (file)
@@ -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)
index 5a4f4a7057a9316c80be645f1d162dab87583b76..4510edae5062422f34e30cda000450c5da805f37 100644 (file)
@@ -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 */
index 4df6cbd672232557dbcf3f8a36270fed1e30930f..95c366884a422b362959a70e6ace7eee83c39a3d 100644 (file)
@@ -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)
index 9fba341bb6df7d77ff365e64897bf5889658df43..bde30594f8d4ff569c51da118e5d2cd4e721f5c8 100644 (file)
@@ -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);
index ee4253533e6b4cfe4cff5f10463403ba93a45242..a25773f42dd7a90d8faa1c1bd67e438a08401b02 100644 (file)
@@ -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)
index 964e0ef374fab9fd69cc0ff4de90db352c8fd786..586b55f12a51271f6d07f73783d2a3c49a796d52 100644 (file)
@@ -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)
index 2cacefee47339c41674e80169c199a11cd35b0a2..1ee9f69c0fd1222e93fa9ac837ee479b85a0a4cb 100644 (file)
@@ -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)
index 5da7ed6035a3e7d8ead64d2db9f23d9a33adc101..c45a1c2d651a9d06bbb949be1f9eae6d4ea7b483 100644 (file)
@@ -39,9 +39,9 @@
 #include <curl/mprintf.h>
 
 #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
 
index dd63b8cd50fff5a5cc9552454562cf54fa679eea..56d0c982504766898ac3558aa7dc903edfe93d31 100644 (file)
@@ -41,9 +41,9 @@
 #include <curl/mprintf.h>
 
 #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
 
index 900e119208537580c1d42ae11b6b63e806fc0452..e278f2e313eae413c660a0e754d770ecc6b9cfc9 100644 (file)
@@ -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)
index 98d7c3d7423a501016ab7682ba928ae3235151c0..e8a8de7a25730fbc5408849b5292eaa5a8d38848 100644 (file)
@@ -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 */
index b9a6c87b7481d4a5c3859f9dbc4cd0f8ce085f9f..d26aa9e250666fd53cc86ab0caccfb2de58aed81 100644 (file)
@@ -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 */
index 2a34e37d83e5c3a35dc76a23eb7ae3048661155f..c1cba877df615507e6edd9807d9c5c54ce03c283 100644 (file)
@@ -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)
index 33566bb6430f746fba2c90045b7ef9b8d9e1231f..1839deac1dd6c3f4dd6a0511ca468092908cd70f 100644 (file)
@@ -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
index af0732064526479a90515625f0d92f42e4c13a2c..eb615c6f3d5cdaebd453f8ece1e3e88c34fde8b9 100644 (file)
@@ -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");
 
index 0920f09443b4ed547b46b1892dc562e73f18ed8c..a221be0ca8de2869ac0d93df17079dd227a39c81 100644 (file)
@@ -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. */
 
index 3361d7cfe5885e7569792944bb77b230c292c7dc..416fe88096846e7eda3b06935d799c20e65b4333 100644 (file)
@@ -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");
 
index 2f3780f2d0dbd8bd90d67fdb06ae961841b20e07..0253b543e6facd98d7e5c8ef80b6c04128374cb1 100644 (file)
@@ -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");
 
index 6a5f4b070f634912000a29dee62c4eeef3549ee9..42fa7381cd2131edecfa162f303fcb73720cf4f9 100644 (file)
@@ -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 */
index e920720c013d367f148c4f580084e6fd82a35546..a2774bea4ab2487a92fc0ecd7be95ece147e390b 100644 (file)
@@ -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);
index d98f5ef9f950189b22ae43d0c65c39e4db2177c5..838923b334c5889c4999f7e9e67a2a47b78fcbf2 100644 (file)
@@ -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);
index 56e0b62cfba5d82d2aef70e8590398016a0ec42c..7e88ce48a7c44bdd449642a28a7fefd2ab8f0e88 100644 (file)
@@ -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/");
 
index 84fefd7bc867e4df398e5426c849a83a08c5cd61..2e8e5b50a82cde54e507aece441785c453d3a8ed 100644 (file)
@@ -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)
index 3dbc46483e4514d15d47aec0531f0928464fc06d..63918f182e7224745aeb4df956565a9b1fc53647 100644 (file)
@@ -60,7 +60,7 @@ int main(void)
   for(i = 0; i<HANDLECOUNT; i++)
     handles[i] = curl_easy_init();
 
-  /* set the options (I left out a few, you will get the point anyway) */
+  /* set the options (I left out a few, you get the point anyway) */
   curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
 
   curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
index 10842e9509f34719fbd3259063e2ae07bcb5cc7d..2feb214d50455183bd1ebd35ae833da1d31ff7f4 100644 (file)
@@ -133,7 +133,7 @@ int main(void)
 
   http_handle = curl_easy_init();
 
-  /* set the options (I left out a few, you will get the point anyway) */
+  /* set the options (I left out a few, you get the point anyway) */
   curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
 
   curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
index 5a24bb2037d90946e1be3f4bc2a7637aea4c847f..44e9203e5d0e32ed9ef1d74f4c60e7dbbd3f94cc 100644 (file)
@@ -98,7 +98,7 @@ static void check_multi_info(void)
     case CURLMSG_DONE:
       /* Do not use message data after calling curl_multi_remove_handle() and
          curl_easy_cleanup(). As per curl_multi_info_read() docs:
-         "WARNING: The data the returned pointer points to will not survive
+         "WARNING: The data the returned pointer points to does not survive
          calling curl_multi_cleanup, curl_multi_remove_handle or
          curl_easy_cleanup." */
       easy_handle = message->easy_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;
index f36139fe1d74e4d029443d14b7021cd827137f4e..67575418e520879b212b2f616e83cc5fe2896b54 100644 (file)
@@ -60,7 +60,7 @@ int main(void)
   for(i = 0; i<HANDLECOUNT; i++)
     handles[i] = curl_easy_init();
 
-  /* set the options (I left out a few, you will get the point anyway) */
+  /* set the options (I left out a few, you get the point anyway) */
   curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
 
   curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
index c5933627ad9714591a73bf477ae9eb61de8b9165..f5077850b30ae1322aa89fabf6dd763a543aafa4 100644 (file)
@@ -49,7 +49,7 @@ int main(void)
 
   http_handle = curl_easy_init();
 
-  /* set the options (I left out a few, you will get the point anyway) */
+  /* set the options (I left out a few, you get the point anyway) */
   curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
 
   /* init a multi stack */
index 6581b9fa6008854c8608a0294c80b28ae675fcb4..3e967ccd8d245ab81861f0076ac5c60bf6e91451 100644 (file)
@@ -108,7 +108,7 @@ static void check_multi_info(void)
     case CURLMSG_DONE:
       /* Do not use message data after calling curl_multi_remove_handle() and
          curl_easy_cleanup(). As per curl_multi_info_read() docs:
-         "WARNING: The data the returned pointer points to will not survive
+         "WARNING: The data the returned pointer points to does not survive
          calling curl_multi_cleanup, curl_multi_remove_handle or
          curl_easy_cleanup." */
       easy_handle = message->easy_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;
index 688336f0256de722c4c5b944d68a106c6ec76df8..8675adc623837bd30a8815b4709364c9fa2d8b3f 100644 (file)
@@ -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;
 }
index 51bd8c352c34864947cbea4282ad6c08089b21a7..4be7d6f2af7f7569e0d2cb121a6783ec8fa2adf0 100644 (file)
@@ -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)
index a948e95c63e8c09a9688015a4f34041d728d9d8c..3281b322bb9c2595934a72ea207f55c5e241639e 100644 (file)
@@ -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 */
index 2e8b3baee270b4d4e16d201b8785f4d7dd16fab5..2cd44e41cdb14ab4172b955ac3e1c93a8e9de910 100644 (file)
@@ -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 */
index b4fad19251f3fde47779a551db7f9a1dba8d4f20..54eb7ecc324364124d4515e87c43770cd1558ef2 100644 (file)
@@ -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 */
index 4940e078120837698d22cb45e555068f1a3bffbb..8e690f972f2b5e7b78bb5fa7965baafe792b5923 100644 (file)
@@ -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 */
index e72cf6f38d1589c609111d58ce214a4d238af35d..dcc7992e418ff95ac9165989cc1534425727deeb 100644 (file)
@@ -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);
index 04e6e3b71fbdb2f3a3d0880dcb68e780e398ff8b..7c2d824d043e78e787b6bdea3feecb34d14f18b2 100644 (file)
@@ -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);
index a802c35825d70ee9411c9767eb449fd17cd5ec77..311bc3cae059822f6cff574f4173d9e255057da3 100644 (file)
@@ -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)
index 1610ad5a51b02da57fa2f90eb9263e9b3084f63b..cbdc77f75c72ea24bd618a12b75590aa8c2ac719 100644 (file)
@@ -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) {
index 27761fcda39be039065cc1e6bcaf2a4270d2d668..02e50aa3d6dae695b95c2362184bbf8d7280d992 100644 (file)
  */
 
 /*
- * 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:
  *
  * <form method="post" enctype="multipart/form-data" action="examplepost.cgi">
  * Enter file: <input type="file" name="sendfile" size="40">
- * Enter file name: <input type="text" name="filename" size="30">
+ * Enter filename: <input type="text" name="filename" size="30">
  * <input type="submit" value="send" name="submit">
  * </form>
  */
@@ -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)
index a1fb12b0fcd9317ab70b911611732c660ab082c6..0f12cd4786696dc34684b9d3355f93b9e10a4909 100644 (file)
  * HTTP Multipart formpost with file upload and two additional parts.
  * </DESC>
  */
-/* 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:
  *
  * <form method="post" enctype="multipart/form-data" action="examplepost.cgi">
  * Enter file: <input type="file" name="sendfile" size="40">
- * Enter file name: <input type="text" name="filename" size="30">
+ * Enter filename: <input type="text" name="filename" size="30">
  * <input type="submit" value="send" name="submit">
  * </form>
  *
@@ -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)
index 1a93f3676af7eb151f4e48c74f13a2b241e36a11..c8229fca4d43bdb742df9b763577c8987372eb49 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * GET a range only of a HTTP resource
+ * GET a range only of an HTTP resource
  * </DESC>
  */
 #include <curl/curl.h>
index a16f459545144c0cb2587aa2259311e0856ee58f..6514e93d8d3c1ead82589eb3a5468311f0f62041 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * 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.
  * </DESC>
  */
@@ -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");
index e4a623048e39541e78985b6d14f55903b0862d43..d1ddbf01ff24076b84d6b3d52eb0212dd1e24d99 100644 (file)
@@ -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)
index eabe0c2269b797deebaa6e6872151767365aea58..0b7e86a3f098f818c11e03d18a0f02ec5def5403 100644 (file)
@@ -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) {
index 992d607ef9369deeef62787ec517f76bf1b7042a..4d33939a40bf8781e701d41c2b477abda973c471 100644 (file)
 #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 {
index 26bfb1a4614bf1e1b1bf9ffeafa70dc0c4136114..dc6805a9f19e8d59a084b15cbf821002d0621376 100644 (file)
@@ -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)
index 8579b0ba54cc954e4ddd80b017282ee835890d9b..53c8e4754f3d7c7ba8af58a91a6200be50e2e343 100644 (file)
@@ -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)
index 89435afa62949f70639a6c26702b2b03f518251b..7ced982fe010ffc33bfaa77eb1eb7bc453207bfb 100644 (file)
@@ -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)
index 9d933ce82c49816a8555d8c04e195a34421699d9..7145493a6928d4d52d452573658b67254961c4f2 100644 (file)
@@ -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)
index 906660f99920c3770440c592d90a0524e70886d7..c53951262afe580e395cf9f297cd551dbf5a1b7b 100644 (file)
@@ -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;
 }
index dc24d7f4d5f937190ccbd9cdec24302133f36eaf..daaeab16943c906e8e133bc8414deb12bf475f17 100644 (file)
@@ -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
index e61b6b4eeeadae42680978f7ef14ca458d96f09b..202d1d089fa8d2b79aebf7b93407becc42d3eae6 100644 (file)
@@ -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
index 742787824f08863fed23a62d14046311c4d6e42b..29918de7ff93125c703af3d0202fa21dbab4fcd1 100644 (file)
@@ -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
index 36703a1d8290cb22826d543412a7f0039b44cf1b..7a2a9c618b03314e4e01826db13e93d8284fc56b 100644 (file)
@@ -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
index e5bc4011c183cb44c489dde9ae06d1514b5888d4..8837c57fd87fcdc20f735f8771c7e9acdb448acd 100644 (file)
@@ -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
index 89708408d7486fc1c436a4d59e94c52ecaae86a6..150de9ceab32b9d862e791082a7b5dfa09ce56e4 100644 (file)
@@ -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);
index 83aab69cbb65b079853138952cfcd923c3bec0ae..fd4e385023a5f76139b487b01fe813cbb324cec5 100644 (file)
@@ -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.
      */
index 70da41b065880dadc54f79fa14007a18cb45f726..0135efef2df0cc7ad0e27beb11d95be09b6d9589 100644 (file)
@@ -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
index 2d7d523d50d3e5eb9c78a839006c7495e17c881d..ab61b2fb0091367307104a2c6ca7d0264042e3be 100644 (file)
@@ -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 */
index 53c5fd2de8a62f31a9251fa3f1a9c4c926bf2a76..90c655917dad7c295a129f9cabec507cfb0a73ec 100644 (file)
@@ -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)
index 12a2b7937bfc056eac29af56e8d261ee7ac6f5cb..b35d982035ee04f7ecd8e401f3b7b8570bf7fb3c 100644 (file)
@@ -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
    */
index 7adbf4489dc04875d4ca82853d665e1d42f5e4aa..09d6c647dd196e3e4460a85439acb1c9103d2bb2 100644 (file)
@@ -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)
index dbcd044f5a4234d5f416680578967a1e9240e7f4..039b4f8b9588bf3f10f1691998bc4ac2ada29fba 100644 (file)
@@ -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)