From c00b18d5406375627b98b47e68261ace85d1a581 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 1 Jul 2015 11:43:12 +0200 Subject: examples: provide sections --- docs/examples/htmltitle.cpp | 8 +++++--- docs/examples/http-post.c | 6 +++++- docs/examples/http2-download.c | 4 ++++ docs/examples/http2-serverpush.c | 4 ++++ docs/examples/http2-upload.c | 4 ++++ docs/examples/httpcustomheader.c | 6 +++++- docs/examples/httpput.c | 6 +++++- docs/examples/https.c | 6 +++++- docs/examples/imap-append.c | 6 +++++- docs/examples/multi-debugcallback.c | 7 +++++-- docs/examples/multi-double.c | 6 +++++- docs/examples/multi-post.c | 9 ++++++--- docs/examples/multi-single.c | 7 +++++-- docs/examples/multi-uv.c | 6 +++++- docs/examples/multithread.c | 8 +++++--- docs/examples/opensslthreadlock.c | 13 +++++++------ docs/examples/persistant.c | 6 +++++- docs/examples/post-callback.c | 6 ++++-- 18 files changed, 89 insertions(+), 29 deletions(-) diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp index ab89bb6a7..d91b505aa 100644 --- a/docs/examples/htmltitle.cpp +++ b/docs/examples/htmltitle.cpp @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,8 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -// Get a web page, parse it with libxml. -// +/* + * Get a web page, extract the title with libxml. + * + */ // Written by Lars Nilsson // // GNU C++ compile command line suggestion (edit paths accordingly): diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index f1975b1ec..a213c398f 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * simple HTTP POST using the easy interface + * + */ #include #include diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index 3b7ca81d3..8b0650734 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Multiplexed HTTP/2 downloads over a single connection + * + */ #include #include diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c index cc5bf3037..53c491b3a 100644 --- a/docs/examples/http2-serverpush.c +++ b/docs/examples/http2-serverpush.c @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * HTTP/2 server push + * + */ #include #include diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index bca16c0d6..2ec55059a 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Multiplexed HTTP/2 uploads over a single connection + * + */ #include #include #include diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index 8542ead53..e742db969 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * HTTP request with custom modified, removed and added headers + * + */ #include #include diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index 2e9dc2170..71191164f 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * HTTP PUT with easy interface and read callback + * + */ #include #include #include diff --git a/docs/examples/https.c b/docs/examples/https.c index bd9a33ba6..2d5909eaa 100644 --- a/docs/examples/https.c +++ b/docs/examples/https.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Simple HTTPS GET + * + */ #include #include diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c index fa531a8c5..fb58b4b23 100644 --- a/docs/examples/imap-append.c +++ b/docs/examples/imap-append.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Simple IMAP APPEND use + * + */ #include #include #include diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index 5fb86bea1..6769024ac 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,7 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -/* This is an example showing the multi interface and the debug callback. */ +/* + * multi interface and debug callback + * + */ #include #include diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c index 0d8d0de4f..d652e7ca8 100644 --- a/docs/examples/multi-double.c +++ b/docs/examples/multi-double.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * multi interface code doing two parallel HTTP transfers + * + */ #include #include diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index 5bfdcfd1e..115dc0ceb 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,8 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ -/* This is an example application source code using the multi interface - * to do a multipart formpost without "blocking". */ +/* + * using the multi interface to do a multipart formpost without blocking + * + */ + #include #include #include diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index a43a9f523..85be24f05 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,7 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -/* This is a very simple example using the multi interface. */ +/* + * using the multi interface to do a single download + * + */ #include #include diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c index 0c0f8a2b9..3d6e6de72 100644 --- a/docs/examples/multi-uv.c +++ b/docs/examples/multi-uv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,6 +20,10 @@ * ***************************************************************************/ +/* + * multi_socket API using libuv + * + */ /* Example application code using the multi socket interface to download multiple files at once, but instead of using curl_multi_perform and curl_multi_wait, which uses select(), we use libuv. diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c index 831a07467..23d5d8aad 100644 --- a/docs/examples/multithread.c +++ b/docs/examples/multithread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,8 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -/* A multi-threaded example that uses pthreads extensively to fetch - * X remote files at once */ +/* + * A multi-threaded example that uses pthreads to fetch several files at once + * + */ #include #include diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c index ad54f08ea..03ec1f29b 100644 --- a/docs/examples/opensslthreadlock.c +++ b/docs/examples/opensslthreadlock.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,16 +19,17 @@ * KIND, either express or implied. * ***************************************************************************/ -/* Example source code to show one way to set the necessary OpenSSL locking - * callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with - * libcurl built to use OpenSSL. - * +/* + * one way to set the necessary OpenSSL locking callbacks if you want to do + * multi-threaded transfers with HTTPS/FTPS with libcurl built to use OpenSSL. + * + */ +/* * This is not a complete stand-alone example. * * Author: Jeremy Brown */ - #include #include #include diff --git a/docs/examples/persistant.c b/docs/examples/persistant.c index 0917dfdb8..3e6af18f2 100644 --- a/docs/examples/persistant.c +++ b/docs/examples/persistant.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * re-using handles to do HTTP persistent connections + * + */ #include #include #include diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index 3e1cfb060..a2f0427fe 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,8 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -/* An example source code that issues a HTTP POST and we provide the actual +/* + * An example source code that issues a HTTP POST and we provide the actual * data through a read callback. + * */ #include #include -- cgit v1.2.3