From: Viktor Szakats Date: Mon, 17 Nov 2025 22:48:39 +0000 (+0100) Subject: examples: tidy-up headers and includes X-Git-Tag: rc-8_18_0-1~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c7cf8eac3cad4f425cfe7fb487fc6a6f22f6f63;p=thirdparty%2Fcurl.git examples: tidy-up headers and includes To have a more similar layout across examples. Closes #19580 --- diff --git a/docs/examples/address-scope.c b/docs/examples/address-scope.c index 82607e2df5..adfcf2789b 100644 --- a/docs/examples/address-scope.c +++ b/docs/examples/address-scope.c @@ -26,6 +26,7 @@ * */ #include + #include #if !defined(_WIN32) && !defined(MSDOS) && !defined(__AMIGA__) diff --git a/docs/examples/altsvc.c b/docs/examples/altsvc.c index 4021c90002..99b92c0157 100644 --- a/docs/examples/altsvc.c +++ b/docs/examples/altsvc.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index 15b11a3b61..ed8f40aef4 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -30,9 +30,11 @@ #include #include -#include + #include +#include + #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic ignored "-Woverlength-strings" #endif diff --git a/docs/examples/connect-to.c b/docs/examples/connect-to.c index b2848772d8..3353c6a6c2 100644 --- a/docs/examples/connect-to.c +++ b/docs/examples/connect-to.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c index bda931eb13..419ceab26d 100644 --- a/docs/examples/crawler.c +++ b/docs/examples/crawler.c @@ -20,25 +20,27 @@ * * SPDX-License-Identifier: curl * - * To compile: - * gcc crawler.c $(pkg-config --cflags --libs libxml-2.0 libcurl) - * - */ + ***************************************************************************/ /* * Web crawler based on curl and libxml2 to stress-test curl with * hundreds of concurrent connections to various servers. * */ - +/* + * To compile: + * gcc crawler.c $(pkg-config --cflags --libs libxml-2.0 libcurl) + */ #include #include #include -#include + #include #include #include #include +#include + /* Parameters */ static int max_con = 200; static int max_total = 20000; diff --git a/docs/examples/debug.c b/docs/examples/debug.c index 5df7aae90f..ff59d9c8ab 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -26,6 +26,7 @@ * */ #include + #include struct data { diff --git a/docs/examples/default-scheme.c b/docs/examples/default-scheme.c index b4ea5fa3bf..db50636107 100644 --- a/docs/examples/default-scheme.c +++ b/docs/examples/default-scheme.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index 21f188549b..b6b957d54e 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -62,18 +62,20 @@ callback. */ +#include +#include #include -#include #include +#include +#include +#include #include #include #include -#include -#include + #include -#include -#include -#include + +#include #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */ diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 11fedb07a2..610a835272 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -37,6 +37,7 @@ #include #include #include + #include #ifdef _WIN32 diff --git a/docs/examples/ftp-delete.c b/docs/examples/ftp-delete.c index e43dd30f2f..795dae851e 100644 --- a/docs/examples/ftp-delete.c +++ b/docs/examples/ftp-delete.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include - -#include - /* * Delete a single file from an FTP server. * */ +#include + +#include static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream) { diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 9baf538b99..af88f52f1a 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -27,6 +27,7 @@ */ #include #include + #include static const char data[]= diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c index d6257afa79..8d43375395 100644 --- a/docs/examples/getinfo.c +++ b/docs/examples/getinfo.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index 025ebe67a5..1deeeda266 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -26,7 +26,6 @@ * chunk of memory instead of storing it in a file. * */ - #include #include #include diff --git a/docs/examples/getredirect.c b/docs/examples/getredirect.c index 908cd5f850..b1f42dc9fd 100644 --- a/docs/examples/getredirect.c +++ b/docs/examples/getredirect.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/getreferrer.c b/docs/examples/getreferrer.c index ae42f4605f..6827055c2b 100644 --- a/docs/examples/getreferrer.c +++ b/docs/examples/getreferrer.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index b9edb517d3..f27521971c 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -55,14 +55,15 @@ callback. */ - #include -#include + #include #include #include #include #include +#include + #include #define MSG_OUT g_print /* Change to "g_error" to write to stderr */ diff --git a/docs/examples/headerapi.c b/docs/examples/headerapi.c index 18588cf33f..089a23a070 100644 --- a/docs/examples/headerapi.c +++ b/docs/examples/headerapi.c @@ -26,6 +26,7 @@ * */ #include + #include static size_t write_cb(char *data, size_t n, size_t l, void *userp) diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index 314d7dd9d9..60288b4bd2 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -58,21 +58,22 @@ This is purely a demo app, all retrieved data is simply discarded by the write callback. */ - +#include +#include #include -#include #include +#include +#include +#include +#include #include #include #include -#include + #include + #include #include -#include -#include -#include -#include #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */ diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c index de1bd7399e..04b4809317 100644 --- a/docs/examples/htmltidy.c +++ b/docs/examples/htmltidy.c @@ -28,10 +28,11 @@ /* * LibTidy => https://www.html-tidy.org/ */ - #include + #include #include + #include /* curl write callback, to fill tidy's input buffer... */ diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp index cdbf0afa08..97b924b180 100644 --- a/docs/examples/htmltitle.cpp +++ b/docs/examples/htmltitle.cpp @@ -36,7 +36,9 @@ #include #include #include + #include + #include // diff --git a/docs/examples/http-options.c b/docs/examples/http-options.c index 9520670bae..f1542edbbe 100644 --- a/docs/examples/http-options.c +++ b/docs/examples/http-options.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index fb91822bb8..510c4c3839 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index 2caeaba512..e6fdbd6b9c 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -36,7 +36,6 @@ #include #include -/* curl stuff */ #include #ifndef CURLPIPE_MULTIPLEX diff --git a/docs/examples/http2-pushinmemory.c b/docs/examples/http2-pushinmemory.c index e15f151697..14f37dbbbc 100644 --- a/docs/examples/http2-pushinmemory.c +++ b/docs/examples/http2-pushinmemory.c @@ -29,7 +29,6 @@ #include #include -/* curl stuff */ #include struct Memory { diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c index 2664158a1f..5c817ead58 100644 --- a/docs/examples/http2-serverpush.c +++ b/docs/examples/http2-serverpush.c @@ -35,7 +35,6 @@ #include #include -/* curl stuff */ #include #ifndef CURLPIPE_MULTIPLEX diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index e546ded162..9ec8cbf5bc 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -45,7 +45,6 @@ #include #endif -/* curl stuff */ #include #ifndef CURLPIPE_MULTIPLEX diff --git a/docs/examples/http3-present.c b/docs/examples/http3-present.c index 084f265c46..0052d50188 100644 --- a/docs/examples/http3-present.c +++ b/docs/examples/http3-present.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/http3.c b/docs/examples/http3.c index 217974f93c..99de5f8e2e 100644 --- a/docs/examples/http3.c +++ b/docs/examples/http3.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index 0657313ddf..3af5c1a2db 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c index b855f454ae..29fd6273d7 100644 --- a/docs/examples/httpput-postfields.c +++ b/docs/examples/httpput-postfields.c @@ -27,6 +27,7 @@ */ #include #include + #include static const char olivertwist[]= diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index 38fb641f52..5c3fc314b8 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -34,6 +34,7 @@ #include #include #include + #include #ifdef _WIN32 diff --git a/docs/examples/https.c b/docs/examples/https.c index 1f7f5e1fbb..905cdb07f2 100644 --- a/docs/examples/https.c +++ b/docs/examples/https.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c index c78462a508..81ca682ffd 100644 --- a/docs/examples/imap-append.c +++ b/docs/examples/imap-append.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send email with IMAP * */ - #include #include + #include /* This is a simple example showing how to send mail using libcurl's IMAP diff --git a/docs/examples/imap-authzid.c b/docs/examples/imap-authzid.c index b7c2e43f99..690b1d77c7 100644 --- a/docs/examples/imap-authzid.c +++ b/docs/examples/imap-authzid.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Retrieve emails from a shared IMAP mailbox * */ - #include + #include /* This is a simple example showing how to fetch mail using libcurl's IMAP diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c index 8adb8b8c6d..7a5b52e10f 100644 --- a/docs/examples/imap-copy.c +++ b/docs/examples/imap-copy.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Copy an email from one IMAP folder to another * */ - #include + #include /* This is a simple example showing how to copy a mail from one mailbox folder diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c index 51fbe5f142..2477a00385 100644 --- a/docs/examples/imap-create.c +++ b/docs/examples/imap-create.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Create a new IMAP folder * */ - #include + #include /* This is a simple example showing how to create a new mailbox folder using diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c index a7682f7664..6744613cd1 100644 --- a/docs/examples/imap-delete.c +++ b/docs/examples/imap-delete.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Delete an IMAP folder * */ - #include + #include /* This is a simple example showing how to delete an existing mailbox folder diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c index a46d450d21..32f38493f1 100644 --- a/docs/examples/imap-examine.c +++ b/docs/examples/imap-examine.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Obtain information about an IMAP folder * */ - #include + #include /* This is a simple example showing how to obtain information about a mailbox diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c index 937d3e05b8..ab25ba552b 100644 --- a/docs/examples/imap-fetch.c +++ b/docs/examples/imap-fetch.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Retrieve IMAP emails * */ - #include + #include /* This is a simple example showing how to fetch mail using libcurl's IMAP diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c index 2d882503d0..e0201e464a 100644 --- a/docs/examples/imap-list.c +++ b/docs/examples/imap-list.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * List the folders within an IMAP mailbox * */ - #include + #include /* This is a simple example showing how to list the folders within an IMAP diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c index 74472d42ec..e967518565 100644 --- a/docs/examples/imap-lsub.c +++ b/docs/examples/imap-lsub.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * List the subscribed IMAP folders * */ - #include + #include /* This is a simple example showing how to list the subscribed folders within diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c index 56a9147bc8..afbcfbb515 100644 --- a/docs/examples/imap-multi.c +++ b/docs/examples/imap-multi.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Get IMAP email with the multi interface * */ - #include #include + #include /* This is a simple example showing how to fetch mail using libcurl's IMAP diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c index 1d8607590f..a4a53ead4f 100644 --- a/docs/examples/imap-noop.c +++ b/docs/examples/imap-noop.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Perform an IMAP noop * */ - #include + #include /* This is a simple example showing how to perform a noop using libcurl's IMAP diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c index b4e1576b38..ebef27b369 100644 --- a/docs/examples/imap-search.c +++ b/docs/examples/imap-search.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Search for new IMAP emails * */ - #include + #include /* This is a simple example showing how to search for new messages using diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c index 6eb49ae978..d56d89331a 100644 --- a/docs/examples/imap-ssl.c +++ b/docs/examples/imap-ssl.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * IMAP with implicit SSL * */ - #include + #include /* This is a simple example showing how to fetch mail using libcurl's IMAP diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c index 95d8f07476..c70c70ebce 100644 --- a/docs/examples/imap-store.c +++ b/docs/examples/imap-store.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Modify the properties of an email over IMAP * */ - #include + #include /* This is a simple example showing how to modify an existing mail using diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c index 9009174ccf..61f4cea45b 100644 --- a/docs/examples/imap-tls.c +++ b/docs/examples/imap-tls.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * IMAP using TLS * */ - #include + #include /* This is a simple example showing how to fetch mail using libcurl's IMAP diff --git a/docs/examples/interface.c b/docs/examples/interface.c index 0698b6a8e2..904131c93a 100644 --- a/docs/examples/interface.c +++ b/docs/examples/interface.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/ipv6.c b/docs/examples/ipv6.c index 1a55d64049..d16bfc4393 100644 --- a/docs/examples/ipv6.c +++ b/docs/examples/ipv6.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/keepalive.c b/docs/examples/keepalive.c index 8d55c71337..5f5c39f57a 100644 --- a/docs/examples/keepalive.c +++ b/docs/examples/keepalive.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/localport.c b/docs/examples/localport.c index 2700457211..21e632d8a7 100644 --- a/docs/examples/localport.c +++ b/docs/examples/localport.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/maxconnects.c b/docs/examples/maxconnects.c index e89f971cf4..658b38d711 100644 --- a/docs/examples/maxconnects.c +++ b/docs/examples/maxconnects.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 8c0d8b4041..460c93057a 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -26,11 +26,9 @@ * transfers in parallel. * */ - #include #include -/* curl stuff */ #include /* diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index 52f00ce482..561a967abf 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -25,11 +25,9 @@ * multi interface and debug callback * */ - #include #include -/* curl stuff */ #include #define TRUE 1 diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c index 1149f21b78..8a0c3d27fe 100644 --- a/docs/examples/multi-double.c +++ b/docs/examples/multi-double.c @@ -28,7 +28,6 @@ #include #include -/* curl stuff */ #include /* diff --git a/docs/examples/multi-event.c b/docs/examples/multi-event.c index abf907afe5..2698e24678 100644 --- a/docs/examples/multi-event.c +++ b/docs/examples/multi-event.c @@ -21,15 +21,15 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * multi_socket API using libevent * */ - #include #include + #include + #include static struct event_base *base; diff --git a/docs/examples/multi-formadd.c b/docs/examples/multi-formadd.c index 068412827a..7374fae092 100644 --- a/docs/examples/multi-formadd.c +++ b/docs/examples/multi-formadd.c @@ -25,12 +25,10 @@ * using the multi interface to do a multipart formpost without blocking * */ - /* - * 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 #include diff --git a/docs/examples/multi-legacy.c b/docs/examples/multi-legacy.c index 93b50c169f..ca2c0a4c7a 100644 --- a/docs/examples/multi-legacy.c +++ b/docs/examples/multi-legacy.c @@ -26,7 +26,6 @@ * transfers in parallel without curl_multi_wait/poll. * */ - #include #include @@ -36,7 +35,6 @@ #include #endif -/* curl stuff */ #include /* diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index c6cb60e898..678fb78d0b 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -25,7 +25,6 @@ * using the multi interface to do a multipart formpost without blocking * */ - #include #include diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index ee2676bae3..6c3f341164 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -29,7 +29,6 @@ #include #include -/* curl stuff */ #include /* diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c index de6beda210..190bed3ef4 100644 --- a/docs/examples/multi-uv.c +++ b/docs/examples/multi-uv.c @@ -25,7 +25,6 @@ * multi_socket API using libuv * */ - /* Use the socket_action interface to download multiple files in parallel, powered by libuv. @@ -38,7 +37,9 @@ #include #include + #include + #include /* object to pass to the callbacks */ diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c index 535788e394..7de1baea90 100644 --- a/docs/examples/multithread.c +++ b/docs/examples/multithread.c @@ -29,7 +29,9 @@ /* Requires: HAVE_PTHREAD_H */ #include + #include + #include #define NUMT 4 diff --git a/docs/examples/netrc.c b/docs/examples/netrc.c index 148a7e422b..91f8df96dc 100644 --- a/docs/examples/netrc.c +++ b/docs/examples/netrc.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/parseurl.c b/docs/examples/parseurl.c index 1514a79823..f70df19bef 100644 --- a/docs/examples/parseurl.c +++ b/docs/examples/parseurl.c @@ -26,6 +26,7 @@ * */ #include + #include #if !CURL_AT_LEAST_VERSION(7, 62, 0) diff --git a/docs/examples/pop3-authzid.c b/docs/examples/pop3-authzid.c index 8cfe80bca2..85c28d700e 100644 --- a/docs/examples/pop3-authzid.c +++ b/docs/examples/pop3-authzid.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Retrieve emails from a shared POP3 mailbox * */ - #include + #include /* This is a simple example showing how to retrieve mail using libcurl's POP3 diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c index 84592da4f9..bd220d7169 100644 --- a/docs/examples/pop3-dele.c +++ b/docs/examples/pop3-dele.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Delete POP3 emails * */ - #include + #include /* This is a simple example showing how to delete an existing mail using diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c index 05ecc66233..cef33c2b4f 100644 --- a/docs/examples/pop3-list.c +++ b/docs/examples/pop3-list.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * List the contents of a POP3 mailbox * */ - #include + #include /* This is a simple example using libcurl's POP3 capabilities to list the diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c index d88d119349..be028a777a 100644 --- a/docs/examples/pop3-multi.c +++ b/docs/examples/pop3-multi.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Get POP3 email using the multi interface * */ - #include #include + #include /* This is a simple example showing how to retrieve mail using libcurl's POP3 diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c index 0ab6eb2d14..4bed103fc8 100644 --- a/docs/examples/pop3-noop.c +++ b/docs/examples/pop3-noop.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Perform a POP3 noop * */ - #include + #include /* This is a simple example showing how to perform a noop using libcurl's POP3 diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c index c89c77e5d6..5cb6e1b545 100644 --- a/docs/examples/pop3-retr.c +++ b/docs/examples/pop3-retr.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Retrieve POP3 email * */ - #include + #include /* This is a simple example showing how to retrieve mail using libcurl's POP3 diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c index 1be48adc82..0f5ac3692d 100644 --- a/docs/examples/pop3-ssl.c +++ b/docs/examples/pop3-ssl.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Get POP3 email using implicit SSL * */ - #include + #include /* This is a simple example showing how to retrieve mail using libcurl's POP3 diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c index afaf79c9a4..929422af98 100644 --- a/docs/examples/pop3-stat.c +++ b/docs/examples/pop3-stat.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Obtain POP3 message statistics * */ - #include + #include /* This is a simple example showing how to obtain message statistics using diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c index a4a7208986..7693e63219 100644 --- a/docs/examples/pop3-tls.c +++ b/docs/examples/pop3-tls.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * POP3 using TLS * */ - #include + #include /* This is a simple example showing how to retrieve mail using libcurl's POP3 diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c index 7584503b0c..3a8776f0b2 100644 --- a/docs/examples/pop3-top.c +++ b/docs/examples/pop3-top.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * POP3 example showing how to retrieve only the headers of an email * */ - #include + #include /* This is a simple example showing how to retrieve only the headers of a mail diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c index aec1034231..01df011eef 100644 --- a/docs/examples/pop3-uidl.c +++ b/docs/examples/pop3-uidl.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * List the contents of a POP3 mailbox by unique ID * */ - #include + #include /* This is a simple example using libcurl's POP3 capabilities to list the diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index ed5b4b1972..bbab002790 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -27,6 +27,7 @@ */ #include #include + #include /* silly test data to POST */ diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index a6ff7fa377..fc42251ddd 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -28,6 +28,7 @@ #include #include #include + #include struct MemoryStruct { diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c index 81f8bfd27c..086cae0e51 100644 --- a/docs/examples/postit2-formadd.c +++ b/docs/examples/postit2-formadd.c @@ -25,7 +25,6 @@ * HTTP Multipart formpost with file upload and two additional parts. * */ - /* * 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 @@ * * */ - #include #include diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index 57c7c86e3a..e5cb963369 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -37,7 +37,6 @@ * * */ - #include #include diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c index 052620dcdf..59477951f9 100644 --- a/docs/examples/progressfunc.c +++ b/docs/examples/progressfunc.c @@ -27,6 +27,7 @@ * */ #include + #include #define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL 3000000 diff --git a/docs/examples/protofeats.c b/docs/examples/protofeats.c index fef4a3798d..f93dccef00 100644 --- a/docs/examples/protofeats.c +++ b/docs/examples/protofeats.c @@ -26,6 +26,7 @@ * */ #include + #include #if !CURL_AT_LEAST_VERSION(7,87,0) diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c index 4ccc3ff1d8..95adb3c1ba 100644 --- a/docs/examples/resolve.c +++ b/docs/examples/resolve.c @@ -27,6 +27,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/rtsp-options.c b/docs/examples/rtsp-options.c index 8c160f6b76..5e732e105f 100644 --- a/docs/examples/rtsp-options.c +++ b/docs/examples/rtsp-options.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index 71faeb4ad3..6f7cbb1b51 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -25,9 +25,9 @@ * Demonstrate curl_easy_send() and curl_easy_recv() usage. * */ - #include #include + #include /* Avoid warning in FD_SET() with pre-2020 Cygwin/MSYS releases: diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c index 4af62fee94..bc1239428b 100644 --- a/docs/examples/shared-connection-cache.c +++ b/docs/examples/shared-connection-cache.c @@ -26,6 +26,7 @@ * */ #include + #include static void my_lock(CURL *curl, curl_lock_data data, diff --git a/docs/examples/simple.c b/docs/examples/simple.c index a427266fd4..e7ea3be611 100644 --- a/docs/examples/simple.c +++ b/docs/examples/simple.c @@ -26,6 +26,7 @@ * */ #include + #include int main(void) diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c index 824e073e2a..ff7295c59d 100644 --- a/docs/examples/simplepost.c +++ b/docs/examples/simplepost.c @@ -27,6 +27,7 @@ */ #include #include + #include int main(void) diff --git a/docs/examples/smtp-authzid.c b/docs/examples/smtp-authzid.c index 539997d945..a375d839b1 100644 --- a/docs/examples/smtp-authzid.c +++ b/docs/examples/smtp-authzid.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send email on behalf of another user with SMTP * */ - #include #include + #include /* diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c index 727880d619..60722a5688 100644 --- a/docs/examples/smtp-expn.c +++ b/docs/examples/smtp-expn.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Expand an SMTP email mailing list * */ - #include #include + #include /* This is a simple example showing how to expand an email mailing list. diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c index 39aa86a818..e6e77b97a3 100644 --- a/docs/examples/smtp-mail.c +++ b/docs/examples/smtp-mail.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send email with SMTP * */ - #include #include + #include /* diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c index d26021ef34..553947b097 100644 --- a/docs/examples/smtp-mime.c +++ b/docs/examples/smtp-mime.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send SMTP mime emails * */ - #include #include + #include /* This is a simple example showing how to send mime mail using libcurl's SMTP diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c index 3dabfbb980..ab7165cd52 100644 --- a/docs/examples/smtp-multi.c +++ b/docs/examples/smtp-multi.c @@ -21,13 +21,12 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send SMTP email with the multi interface * */ - #include + #include /* This is an example showing how to send mail using libcurl's SMTP diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c index 36ecd18d74..a87a033fc4 100644 --- a/docs/examples/smtp-ssl.c +++ b/docs/examples/smtp-ssl.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send SMTP email using implicit SSL * */ - #include #include + #include /* This is a simple example showing how to send mail using libcurl's SMTP diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c index b2ea769b21..f6b3bb6053 100644 --- a/docs/examples/smtp-tls.c +++ b/docs/examples/smtp-tls.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Send SMTP email using implicit TLS * */ - #include #include + #include /* This is a simple example showing how to send mail using libcurl's SMTP diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c index 33d439ec9c..e58ed9491d 100644 --- a/docs/examples/smtp-vrfy.c +++ b/docs/examples/smtp-vrfy.c @@ -21,14 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ - /* * Verify an SMTP email address * */ - #include #include + #include /* This is a simple example showing how to verify an email address from an diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c index 04fc3afd85..0aec24cc67 100644 --- a/docs/examples/xmlstream.c +++ b/docs/examples/xmlstream.c @@ -32,12 +32,12 @@ * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream * */ - #include #include #include #include + #include struct MemoryStruct {