Skip to content

Commit c00b18d

Browse files
committed
examples: provide <DESC> sections
1 parent 4ed8537 commit c00b18d

18 files changed

+89
-29
lines changed

docs/examples/htmltitle.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
// Get a web page, parse it with libxml.
23-
//
22+
/* <DESC>
23+
* Get a web page, extract the title with libxml.
24+
* </DESC>
25+
*/
2426
// Written by Lars Nilsson
2527
//
2628
// GNU C++ compile command line suggestion (edit paths accordingly):

docs/examples/http-post.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* simple HTTP POST using the easy interface
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <curl/curl.h>
2428

docs/examples/http2-download.c

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* Multiplexed HTTP/2 downloads over a single connection
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <stdlib.h>
2428

docs/examples/http2-serverpush.c

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* HTTP/2 server push
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <stdlib.h>
2428

docs/examples/http2-upload.c

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* Multiplexed HTTP/2 uploads over a single connection
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <stdlib.h>
2428
#include <fcntl.h>

docs/examples/httpcustomheader.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* HTTP request with custom modified, removed and added headers
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <curl/curl.h>
2428

docs/examples/httpput.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* HTTP PUT with easy interface and read callback
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <fcntl.h>
2428
#include <sys/stat.h>

docs/examples/https.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* Simple HTTPS GET
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <curl/curl.h>
2428

docs/examples/imap-append.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* Simple IMAP APPEND use
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <string.h>
2428
#include <curl/curl.h>

docs/examples/multi-debugcallback.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,7 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* This is an example showing the multi interface and the debug callback. */
22+
/* <DESC>
23+
* multi interface and debug callback
24+
* </DESC>
25+
*/
2326

2427
#include <stdio.h>
2528
#include <string.h>

docs/examples/multi-double.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* multi interface code doing two parallel HTTP transfers
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <string.h>
2428

docs/examples/multi-post.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,8 +19,11 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* This is an example application source code using the multi interface
23-
* to do a multipart formpost without "blocking". */
22+
/* <DESC>
23+
* using the multi interface to do a multipart formpost without blocking
24+
* </DESC>
25+
*/
26+
2427
#include <stdio.h>
2528
#include <string.h>
2629
#include <sys/time.h>

docs/examples/multi-single.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,7 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* This is a very simple example using the multi interface. */
22+
/* <DESC>
23+
* using the multi interface to do a single download
24+
* </DESC>
25+
*/
2326

2427
#include <stdio.h>
2528
#include <string.h>

docs/examples/multi-uv.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -20,6 +20,10 @@
2020
*
2121
***************************************************************************/
2222

23+
/* <DESC>
24+
* multi_socket API using libuv
25+
* </DESC>
26+
*/
2327
/* Example application code using the multi socket interface to download
2428
multiple files at once, but instead of using curl_multi_perform and
2529
curl_multi_wait, which uses select(), we use libuv.

docs/examples/multithread.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* A multi-threaded example that uses pthreads extensively to fetch
23-
* X remote files at once */
22+
/* <DESC>
23+
* A multi-threaded example that uses pthreads to fetch several files at once
24+
* </DESC>
25+
*/
2426

2527
#include <stdio.h>
2628
#include <pthread.h>

docs/examples/opensslthreadlock.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,16 +19,17 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* Example source code to show one way to set the necessary OpenSSL locking
23-
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
24-
* libcurl built to use OpenSSL.
25-
*
22+
/* <DESC>
23+
* one way to set the necessary OpenSSL locking callbacks if you want to do
24+
* multi-threaded transfers with HTTPS/FTPS with libcurl built to use OpenSSL.
25+
* </DESC>
26+
*/
27+
/*
2628
* This is not a complete stand-alone example.
2729
*
2830
* Author: Jeremy Brown
2931
*/
3032

31-
3233
#include <stdio.h>
3334
#include <pthread.h>
3435
#include <openssl/err.h>

docs/examples/persistant.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22+
/* <DESC>
23+
* re-using handles to do HTTP persistent connections
24+
* </DESC>
25+
*/
2226
#include <stdio.h>
2327
#include <unistd.h>
2428
#include <curl/curl.h>

docs/examples/post-callback.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
8+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
1919
* KIND, either express or implied.
2020
*
2121
***************************************************************************/
22-
/* An example source code that issues a HTTP POST and we provide the actual
22+
/* <DESC>
23+
* An example source code that issues a HTTP POST and we provide the actual
2324
* data through a read callback.
25+
* </DESC>
2426
*/
2527
#include <stdio.h>
2628
#include <string.h>

0 commit comments

Comments
 (0)