]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples: tidy-up headers and includes
authorViktor Szakats <commit@vsz.me>
Mon, 17 Nov 2025 22:48:39 +0000 (23:48 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 18 Nov 2025 01:05:07 +0000 (02:05 +0100)
To have a more similar layout across examples.

Closes #19580

96 files changed:
docs/examples/address-scope.c
docs/examples/altsvc.c
docs/examples/cacertinmem.c
docs/examples/connect-to.c
docs/examples/crawler.c
docs/examples/debug.c
docs/examples/default-scheme.c
docs/examples/evhiperfifo.c
docs/examples/externalsocket.c
docs/examples/ftp-delete.c
docs/examples/ftpuploadfrommem.c
docs/examples/getinfo.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/htmltidy.c
docs/examples/htmltitle.cpp
docs/examples/http-options.c
docs/examples/http-post.c
docs/examples/http2-download.c
docs/examples/http2-pushinmemory.c
docs/examples/http2-serverpush.c
docs/examples/http2-upload.c
docs/examples/http3-present.c
docs/examples/http3.c
docs/examples/httpcustomheader.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-create.c
docs/examples/imap-delete.c
docs/examples/imap-examine.c
docs/examples/imap-fetch.c
docs/examples/imap-list.c
docs/examples/imap-lsub.c
docs/examples/imap-multi.c
docs/examples/imap-noop.c
docs/examples/imap-search.c
docs/examples/imap-ssl.c
docs/examples/imap-store.c
docs/examples/imap-tls.c
docs/examples/interface.c
docs/examples/ipv6.c
docs/examples/keepalive.c
docs/examples/localport.c
docs/examples/maxconnects.c
docs/examples/multi-app.c
docs/examples/multi-debugcallback.c
docs/examples/multi-double.c
docs/examples/multi-event.c
docs/examples/multi-formadd.c
docs/examples/multi-legacy.c
docs/examples/multi-post.c
docs/examples/multi-single.c
docs/examples/multi-uv.c
docs/examples/multithread.c
docs/examples/netrc.c
docs/examples/parseurl.c
docs/examples/pop3-authzid.c
docs/examples/pop3-dele.c
docs/examples/pop3-list.c
docs/examples/pop3-multi.c
docs/examples/pop3-noop.c
docs/examples/pop3-retr.c
docs/examples/pop3-ssl.c
docs/examples/pop3-stat.c
docs/examples/pop3-tls.c
docs/examples/pop3-top.c
docs/examples/pop3-uidl.c
docs/examples/post-callback.c
docs/examples/postinmemory.c
docs/examples/postit2-formadd.c
docs/examples/postit2.c
docs/examples/progressfunc.c
docs/examples/protofeats.c
docs/examples/resolve.c
docs/examples/rtsp-options.c
docs/examples/sendrecv.c
docs/examples/shared-connection-cache.c
docs/examples/simple.c
docs/examples/simplepost.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/xmlstream.c

index 82607e2df50e97a9402fa65fe228155391d92717..adfcf2789bf650bb5b1bde01006f532e48e24d44 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 #if !defined(_WIN32) && !defined(MSDOS) && !defined(__AMIGA__)
index 4021c90002e9ce0d324fd0e548e64b84e12d917b..99b92c0157c9595db1d90ef8b33bf86b95eac123 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 15b11a3b6129fa413724b665264dbd462afda8d3..ed8f40aef454ae149c4e69a88aa48f67161f5d4b 100644 (file)
 
 #include <openssl/err.h>
 #include <openssl/ssl.h>
-#include <curl/curl.h>
+
 #include <stdio.h>
 
+#include <curl/curl.h>
+
 #if defined(__GNUC__) || defined(__clang__)
 #pragma GCC diagnostic ignored "-Woverlength-strings"
 #endif
index b2848772d81db5f382b30be4da34eece5573e8c8..3353c6a6c20348704abe7d2e4008e25c6c748bd1 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index bda931eb13ae2bc650f244dcdef64059ffe30768..419ceab26d0695028479dc2868695f78c95ea962 100644 (file)
  *
  * SPDX-License-Identifier: curl
  *
- * To compile:
- *   gcc crawler.c $(pkg-config --cflags --libs libxml-2.0 libcurl)
- *
- */
+ ***************************************************************************/
 /* <DESC>
  * Web crawler based on curl and libxml2 to stress-test curl with
  * hundreds of concurrent connections to various servers.
  * </DESC>
  */
-
+/*
+ * To compile:
+ *   gcc crawler.c $(pkg-config --cflags --libs libxml-2.0 libcurl)
+ */
 #include <libxml/HTMLparser.h>
 #include <libxml/xpath.h>
 #include <libxml/uri.h>
-#include <curl/curl.h>
+
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
 #include <signal.h>
 
+#include <curl/curl.h>
+
 /* Parameters */
 static int max_con = 200;
 static int max_total = 20000;
index 5df7aae90f751cdf6c03fba9ed03dd5d29a13d30..ff59d9c8ab6e1427e7f1c5f49b1dad33ce7508e2 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 struct data {
index b4ea5fa3bfb4b5c9b72859bfa9055c83fe0698de..db506361075365eb5ac2d3417ad310972f5a1a82 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 21f188549b992bec20a8c2315356e9523e4451f6..b6b957d54eb62f1c45638c968e6efc9650a023b7 100644 (file)
@@ -62,18 +62,20 @@ callback.
 
 */
 
+#include <errno.h>
+#include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
 #include <sys/time.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/poll.h>
-#include <curl/curl.h>
+
 #include <ev.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
+
+#include <curl/curl.h>
 
 #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
 
index 11fedb07a20690004d55765a1969932bca9db457..610a835272a6b94a9c1485a662a9dcfb0a4ae36d 100644 (file)
@@ -37,6 +37,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+
 #include <curl/curl.h>
 
 #ifdef _WIN32
index e43dd30f2f27e48d1558799eec9812fe053ee9ec..795dae851ef8c4463d85f3ca2b17a0913f084509 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-#include <stdio.h>
-
-#include <curl/curl.h>
-
 /* <DESC>
  * Delete a single file from an FTP server.
  * </DESC>
  */
+#include <stdio.h>
+
+#include <curl/curl.h>
 
 static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
 {
index 9baf538b9948d1156dfef0bb4af0f548ff83c127..af88f52f1a7ba0ef07d662e72985a7d58bfae612 100644 (file)
@@ -27,6 +27,7 @@
  */
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 static const char data[]=
index d6257afa791c27f4d19b5da359c2796f2dba5895..8d433753950727539f4d7a1b2577d53f84f1b6b2 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 025ebe67a5530f3576c192998f93986f920c14f1..1deeeda26667dc8bad00f2bda26a42eeaa4097e6 100644 (file)
@@ -26,7 +26,6 @@
  * chunk of memory instead of storing it in a file.
  * </DESC>
  */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 908cd5f850f8ef9a95f9a1fae0faa5dae9031357..b1f42dc9fdf4c91a2ad0f04b2654a6634fd307b0 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index ae42f4605fce2c0c937d1884f78d42bb916d3258..6827055c2bd9bc3f2f4f7fe8d479400dbefff660 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index b9edb517d32d243a3ae2115462f7014793bef93d..f27521971cd5890cb98ded09a744a35adc143463 100644 (file)
  callback.
 
 */
-
 #include <glib.h>
-#include <sys/stat.h>
+
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
+#include <sys/stat.h>
+
 #include <curl/curl.h>
 
 #define MSG_OUT g_print   /* Change to "g_error" to write to stderr */
index 18588cf33f67b8c8e686785548cf7abd2cf59679..089a23a07013fc57fe07fba602b01cf7fd4b06ab 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 static size_t write_cb(char *data, size_t n, size_t l, void *userp)
index 314d7dd9d95af012ea5f2b8b37b07630fef34737..60288b4bd263b7d297be26fbdc54f99b183d9445 100644 (file)
@@ -58,21 +58,22 @@ This is purely a demo app, all retrieved data is simply discarded by the write
 callback.
 
 */
-
+#include <errno.h>
+#include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
+#include <sys/cdefs.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
 #include <sys/time.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/poll.h>
+
 #include <curl/curl.h>
+
 #include <event2/event.h>
 #include <event2/event_struct.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <sys/cdefs.h>
 
 #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
 
index de1bd7399e85d1cf0ad7f24d04b07dc15f44e602..04b4809317a9d5a60a62c2dec8c25f3bd0ba6194 100644 (file)
 /*
  * LibTidy => https://www.html-tidy.org/
  */
-
 #include <stdio.h>
+
 #include <tidy/tidy.h>
 #include <tidy/tidybuffio.h>
+
 #include <curl/curl.h>
 
 /* curl write callback, to fill tidy's input buffer...  */
index cdbf0afa08eb2a1759780e7f62a71c9be5641caa..97b924b1802d756cba4e83606e8e7187ca6120aa 100644 (file)
@@ -36,7 +36,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <string>
+
 #include <curl/curl.h>
+
 #include <libxml/HTMLparser.h>
 
 //
index 9520670baeab45fa5399f9219c99a24ef4e53e64..f1542edbbe5b69a149964e896a768e1df2fc26a7 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index fb91822bb8ab5bb299fa151ac1244430ae7db44d..510c4c38396c600be23a5f71e6ec6a60cece477d 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 2caeaba512ee5cb2f0466611149b7e1ff2aee832..e6fdbd6b9c7542b6af455831f49520f4dd6a740b 100644 (file)
@@ -36,7 +36,6 @@
 #include <string.h>
 #include <errno.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 #ifndef CURLPIPE_MULTIPLEX
index e15f1516976252fc8eabc99fdb8721c210c329da..14f37dbbbcd38e3f49fc2e8b1bb8ea265dbd91c5 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 struct Memory {
index 2664158a1f04dddfd6af9a7cace947bb2d134cfa..5c817ead5893785566191d7d3b013e60ec103a35 100644 (file)
@@ -35,7 +35,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 #ifndef CURLPIPE_MULTIPLEX
index e546ded162cfdc73af977e3b966842044af67f2b..9ec8cbf5bc371127edf0d861a6ba0c82865ec3f1 100644 (file)
@@ -45,7 +45,6 @@
 #include <unistd.h>
 #endif
 
-/* curl stuff */
 #include <curl/curl.h>
 
 #ifndef CURLPIPE_MULTIPLEX
index 084f265c46a9ce7131d55bd52b3a76f2bb9a7c3d..0052d501886627f34cd9b1adb248f20f7c161317 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 217974f93cac9b0859f5fc890cebe04360495790..99de5f8e2e223bdd0631f29e5c2061063e59c0cc 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 0657313ddf6c04ff9e9e38ce0d370a5faaaca8f8..3af5c1a2dbaeb1ec2c20d7778771577cbad3c079 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index b855f454aec41ef757bfafd93792830760938e95..29fd6273d7eb8102e3d65fd84bcbfbe15213c54e 100644 (file)
@@ -27,6 +27,7 @@
  */
 #include <stdio.h>
 #include <fcntl.h>
+
 #include <curl/curl.h>
 
 static const char olivertwist[]=
index 38fb641f52cb9924f7cb5ef43df4eb50de58d1bf..5c3fc314b80143672c63f2c0dafcb49723098264 100644 (file)
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+
 #include <curl/curl.h>
 
 #ifdef _WIN32
index 1f7f5e1fbb31a603f358131861b38a8dd71848bb..905cdb07f23b844829dab22b7eb48cc8a5246736 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index c78462a508cd9569b4d8d9f1cc141df15b460621..81ca682ffd26cabd44a363d1fcd072df8d857b45 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send email with IMAP
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mail using libcurl's IMAP
index b7c2e43f99d90732b456dd78a01988cef0df216c..690b1d77c73fddf0250f6443c30801afd5db1500 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Retrieve emails from a shared IMAP mailbox
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
index 8adb8b8c6d8073a2d21a066618d6ead519d5701e..7a5b52e10f2de1b94b49728f178b7f189ba0c5c0 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Copy an email from one IMAP folder to another
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to copy a mail from one mailbox folder
index 51fbe5f1420cfa5bb2a58f3316b4017a6c16eab1..2477a00385c77e2e303def556f041ef8cc686b41 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Create a new IMAP folder
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to create a new mailbox folder using
index a7682f7664d330d873cb8f2f73c535be39c09cdf..6744613cd1e745b86a004d50756d57bcb0aeb2a8 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Delete an IMAP folder
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to delete an existing mailbox folder
index a46d450d21ab15caecb992d3b5e28f639964b3c3..32f38493f133d5d179536e2c4c368584b3fcb0b0 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Obtain information about an IMAP folder
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to obtain information about a mailbox
index 937d3e05b80e74b172f59c307de5e712a863f7c2..ab25ba552bb3402bc43ac53c96a33b86ca23a8b0 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Retrieve IMAP emails
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
index 2d882503d09e030ffd23e4616490a86390ee28ce..e0201e464ac5ada750dd0e13f2359c29f1db20d9 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * List the folders within an IMAP mailbox
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to list the folders within an IMAP
index 74472d42ec232124ed061f98cdcd25c419e43533..e96751856512a23ae436c547e7abdb9b2c609f40 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * List the subscribed IMAP folders
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to list the subscribed folders within
index 56a9147bc8a5bb6a0ddfc10e3cc8c5f95634e325..afbcfbb51557938f4c0c5b950005f8ce0852f122 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Get IMAP email with the multi interface
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
index 1d8607590f6f60a7a051687d199b965a2d6f3dda..a4a53ead4f6e541b7c8043d34df8536be07aa371 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Perform an IMAP noop
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to perform a noop using libcurl's IMAP
index b4e1576b38c6baf61f141811298ca3baf12643af..ebef27b3696903fb97fc5895f91d6e437d4c2b6a 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Search for new IMAP emails
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to search for new messages using
index 6eb49ae9780b2ce0cb5d6e1bfa42e06b9960ecee..d56d89331ac4bee964e0cb549b795aee5329dc65 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * IMAP with implicit SSL
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
index 95d8f0747652db65a71c2c9290c44a7ac83389d7..c70c70ebce42c1f5575064c98d0e0cb5e0ea38cf 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Modify the properties of an email over IMAP
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to modify an existing mail using
index 9009174ccf015dc4005033d9f31dc0be47762d42..61f4cea45bfda3ecd3ce9f6732066d23d5242a2b 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * IMAP using TLS
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
index 0698b6a8e2f2e165e15cd8435c3c1ac21e5772a7..904131c93a839e3d547c11ef51042c954ef8caac 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 1a55d640494fed3bb2d2e3a3281815e3220a1f75..d16bfc43934646dd68277775abcc1cffedff0894 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 8d55c71337744cde284333c1aa37a9199615bc67..5f5c39f57ac8729729ca1b47a49d39721673a0d4 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 2700457211ddddb8832982c615c43feeb5f8ee7f..21e632d8a7a9a41bd8d91946e388a9860a153f7a 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index e89f971cf41e62a057beffe29abcd28c22bca6d7..658b38d711e36560f7a01448290393279fdad491 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 8c0d8b4041520581c34c058ae7f83ab750be5e01..460c93057ad57069ca4fff3cd8c0681894cd3548 100644 (file)
  * transfers in parallel.
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 /*
index 52f00ce482ea822fec4e70d6370a1fb23335dd71..561a967abf15c3b668f62e383961073be05dba7f 100644 (file)
  * multi interface and debug callback
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 #define TRUE 1
index 1149f21b78d7010252e25cbe16dc2669182e5935..8a0c3d27feb3af549812841d51d06589c1987806 100644 (file)
@@ -28,7 +28,6 @@
 #include <stdio.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 /*
index abf907afe534965f4560b5bc3acd3f0438566073..2698e24678f9d02c2dda867f3b4dbf33abfd0c66 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * multi_socket API using libevent
  * </DESC>
  */
-
 #include <stdio.h>
 #include <stdlib.h>
+
 #include <event2/event.h>
+
 #include <curl/curl.h>
 
 static struct event_base *base;
index 068412827ae7aee29f1682db536e7b56d09799ce..7374fae092e4cdbfed18702ee846ed173518375a 100644 (file)
  * using the multi interface to do a multipart formpost without blocking
  * </DESC>
  */
-
 /*
- * Warning: this example uses the deprecated form api. See "multi-post.c"
- *          for a similar example using the mime api.
+ * Warning: this example uses the deprecated form API. See "multi-post.c"
+ *          for a similar example using the mime API.
  */
-
 #include <stdio.h>
 #include <string.h>
 
index 93b50c169f4de632b1ee85119e26f4c067e701c5..ca2c0a4c7afb7a692964d9fc69ade629cfc5934d 100644 (file)
@@ -26,7 +26,6 @@
  * transfers in parallel without curl_multi_wait/poll.
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
 
@@ -36,7 +35,6 @@
 #include <unistd.h>
 #endif
 
-/* curl stuff */
 #include <curl/curl.h>
 
 /*
index c6cb60e898b0c324c8896476d905e9137f0d98da..678fb78d0b7bfafcc2c373ae57fa33b823df2d79 100644 (file)
@@ -25,7 +25,6 @@
  * using the multi interface to do a multipart formpost without blocking
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
 
index ee2676bae3fe98c41be667cdba4b441d19e207d2..6c3f341164eabfa4721bb3e5fccd6c0cda1b87c1 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdio.h>
 #include <string.h>
 
-/* curl stuff */
 #include <curl/curl.h>
 
 /*
index de6beda2102ce13bcdd2f642ab6ec3843b1ab709..190bed3ef475e183cd771e06071007699f5e0837 100644 (file)
@@ -25,7 +25,6 @@
  * multi_socket API using libuv
  * </DESC>
  */
-
 /* Use the socket_action interface to download multiple files in parallel,
    powered by libuv.
 
@@ -38,7 +37,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+
 #include <uv.h>
+
 #include <curl/curl.h>
 
 /* object to pass to the callbacks */
index 535788e394bc64d37a78da8b83d7de551b5685d5..7de1baea90855a5eb1e181f8d64af17ef43037d7 100644 (file)
@@ -29,7 +29,9 @@
 /* Requires: HAVE_PTHREAD_H */
 
 #include <stdio.h>
+
 #include <pthread.h>
+
 #include <curl/curl.h>
 
 #define NUMT 4
index 148a7e422be9fd0a3175e87840fd59d328feacbc..91f8df96dc31b2d4ce96881de5478d019f45520f 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 1514a798237f83cd1f5704ad0ed478ff1823f0b1..f70df19bef2f299d18e50aeecf05e4052fdab2d8 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 #if !CURL_AT_LEAST_VERSION(7, 62, 0)
index 8cfe80bca2393c8644b2d11e7a47c7c8a8811cbb..85c28d700ee04bff218818e21aa0eee14ddeabb5 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Retrieve emails from a shared POP3 mailbox
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
index 84592da4f9fff1230ac691961b5a9fa8cffa7668..bd220d71693ade8e52e3a77f9532847d072170bd 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Delete POP3 emails
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to delete an existing mail using
index 05ecc662331a1c121fd02e76b9a1bf75652eeccb..cef33c2b4f27ac66835b1c51751b84fb5ad6a88c 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * List the contents of a POP3 mailbox
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example using libcurl's POP3 capabilities to list the
index d88d1193499d2acab9f1f22f9523c715b59b3091..be028a777a62b844ee33e3c222e1063c255c6745 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Get POP3 email using the multi interface
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
index 0ab6eb2d14c5a0488fc4151b1d054f64aaaaef43..4bed103fc83faffa43bec0cdee55070e88e268fc 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Perform a POP3 noop
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to perform a noop using libcurl's POP3
index c89c77e5d6490bb0497b78328aac4bdd1674bf4b..5cb6e1b545760cee904b7f20dd5252cafbcbd840 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Retrieve POP3 email
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
index 1be48adc82923872c39d206134f0ce5fae192f6b..0f5ac3692d83fd768780e97e6dccf6f50ac4311a 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Get POP3 email using implicit SSL
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
index afaf79c9a4db2c7b24d3b677a44969502332c4a8..929422af98294a1bc50b199a28d1c235894b0604 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Obtain POP3 message statistics
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to obtain message statistics using
index a4a7208986b44759036d739d5250f74c48d85e9a..7693e632192802b889870ef7ca91de57a722d2bf 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * POP3 using TLS
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
index 7584503b0c2cbc0179f597dc5171b6e0d7c8d233..3a8776f0b220b72c31eb3635eae9ca9cf9b70374 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * POP3 example showing how to retrieve only the headers of an email
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to retrieve only the headers of a mail
index aec10342311d1ff027b29c159ac7d00e906f7138..01df011eefc34b8ebf96bb57f25e58968c5e5ebc 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * List the contents of a POP3 mailbox by unique ID
  * </DESC>
  */
-
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example using libcurl's POP3 capabilities to list the
index ed5b4b197212c24622ec83159a80480b4acf24ff..bbab002790915ec75ccc7a5839d29be2490b7069 100644 (file)
@@ -27,6 +27,7 @@
  */
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* silly test data to POST */
index a6ff7fa3770c998666bd5b0fade7c19595a488c3..fc42251ddd12bf6a4133c414f1c5761f0af0ca6e 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 struct MemoryStruct {
index 81f8bfd27c116b8f882858fab8a8b07c3e218da4..086cae0e51b9b0ea7661993de96f0c795bd29a3a 100644 (file)
@@ -25,7 +25,6 @@
  * HTTP Multipart formpost with file upload and two additional parts.
  * </DESC>
  */
-
 /*
  * 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.
@@ -41,7 +40,6 @@
  * <input type="submit" value="send" name="submit">
  * </form>
  */
-
 #include <stdio.h>
 #include <string.h>
 
index 57c7c86e3a2b37fd0fbd041fa287fee4361bc395..e5cb9633695317d9f8739b84844b572563c5b13b 100644 (file)
@@ -37,7 +37,6 @@
  * </form>
  *
  */
-
 #include <stdio.h>
 #include <string.h>
 
index 052620dcdf6706ab848ed00bdc12847a78d0ae40..59477951f934d35a34784dc8898d9aa75cc5ae28 100644 (file)
@@ -27,6 +27,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 #define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL     3000000
index fef4a3798d795475b5c2e6461efcc0a6b1899e11..f93dccef003c07f6a8b807877d2cee964af6da0f 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 #if !CURL_AT_LEAST_VERSION(7,87,0)
index 4ccc3ff1d815f287c1c74c520de746d4efbc6e57..95adb3c1baaa4bc3a76d2bf40dcadc70060e9f9e 100644 (file)
@@ -27,6 +27,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 8c160f6b76dc8770aea77df720298bf40f5169f1..5e732e105f5c94df7e5f542c3e24689811f505e9 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 71faeb4ad31e31dda3bf0a2eb73232efd4035597..6f7cbb1b5188ab3f3880799583ad1799dd11c97d 100644 (file)
@@ -25,9 +25,9 @@
  * Demonstrate curl_easy_send() and curl_easy_recv() usage.
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* Avoid warning in FD_SET() with pre-2020 Cygwin/MSYS releases:
index 4af62fee943c0c100af78e37ffe5d32979d8aed3..bc1239428ba49a9bbc6063f4c6c35cc19cc0850a 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 static void my_lock(CURL *curl, curl_lock_data data,
index a427266fd40666a25fd7be1096cd020f0dcab96e..e7ea3be611534b991fb9f64747b420a12fdfe075 100644 (file)
@@ -26,6 +26,7 @@
  * </DESC>
  */
 #include <stdio.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 824e073e2a120f503b54971f62d7eade1bc242cc..ff7295c59d3b231e805f7ca1865f6176e869da08 100644 (file)
@@ -27,6 +27,7 @@
  */
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 int main(void)
index 539997d945de1bafeeb732e0ad5c295517a21732..a375d839b1318ddae573e064de24d26bfd4bac3d 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send email on behalf of another user with SMTP
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /*
index 727880d6199e21930d0891eff037f75068e5a2ec..60722a56883b215847ff9dddf563388637bccb04 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Expand an SMTP email mailing list
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to expand an email mailing list.
index 39aa86a81828d58460bc6aa824f7a607a79fba2b..e6e77b97a39d6c19f6a259f62e1f68db65fc7fd3 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send email with SMTP
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /*
index d26021ef3407a71488973643b7c92e1229e4448a..553947b0976cb049e5aab9e66041bb2104dcd136 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send SMTP mime emails
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mime mail using libcurl's SMTP
index 3dabfbb9801e9b90fbd84134097585e11a8c9a13..ab7165cd5277a07d70b6a0dcbf81fba7e2dbe61b 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send SMTP email with the multi interface
  * </DESC>
  */
-
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is an example showing how to send mail using libcurl's SMTP
index 36ecd18d74491d4b344af1226b63da9cbc4f468e..a87a033fc4aaeb4af6cf2277278d4466b12e472d 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send SMTP email using implicit SSL
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mail using libcurl's SMTP
index b2ea769b21f5217dd63f380c6f1d27df3649b2fc..f6b3bb6053c4adc5e069392767de7a06541b4fef 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Send SMTP email using implicit TLS
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mail using libcurl's SMTP
index 33d439ec9c433a78e0b3e073ca79d6f6bfcadad5..e58ed9491d7b87eb9a83bd6826a739d01755299c 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* <DESC>
  * Verify an SMTP email address
  * </DESC>
  */
-
 #include <stdio.h>
 #include <string.h>
+
 #include <curl/curl.h>
 
 /* This is a simple example showing how to verify an email address from an
index 04fc3afd8580c6eef39ddf738fd2ffa1ca21229a..0aec24cc67a77046c57fd4ed0a87879cc0b015e9 100644 (file)
  * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
  *
  */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include <expat.h>
+
 #include <curl/curl.h>
 
 struct MemoryStruct {