Commit Graph

39 Commits

Author SHA1 Message Date
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
8892867db0 * examples/getstream.c: Initialize array to avoid strduping random memory 2022-06-26 13:03:50 +02:00
3dc7f71098 Update copyright year 2022-02-25 17:46:43 +01:00
22162f82b2 Update copyright year 2021-01-22 21:58:38 +01:00
59d9ecd9c0 * Update copyright year to 2020 2020-01-10 00:33:02 +01:00
4b9edbad2d Update Copyright statements to be compatible with update-copyright module 2019-09-10 23:41:56 +02:00
3835d892bb Rename HTTP parse callback types
* include/wget/wget.h: Rename HTTP parse callback types
* examples/getstream.c: Likewise
* libwget/http.c: Likewise
* libwget/http_highlevel.c: Likewise
2019-08-12 11:38:10 +02:00
12f1a03693 Changed G_GNUC_WGET prefix to WGET_GCC
* include/wget/wget.h: Changed G_GNUC_WGET prefix to WGET_GCC
* */*.[ch]: Likewise
2019-08-08 17:13:24 +02:00
37ce0d0a15 * examples/getstream.c: Fix call to wget_http_get() 2019-07-25 11:58:12 +02:00
da75b622d6 Rename wget_http_response_t -> wget_http_response
* include/wget/wget.h: Rename wget_http_response_t -> wget_http_response
* examples/batch_loader.c: Likewise
* examples/check_url_types.c: Likewise
* examples/getstream.c: Likewise
* examples/http_get.c: Likewise
* examples/http_get2.c: Likewise
* examples/http_multi_get.c: Likewise
* examples/websequencediagram.c: Likewise
* examples/websequencediagram_high.c: Likewise
* fuzz/libwget_http_client_fuzzer.c: Likewise
* fuzz/libwget_http_parse_fuzzer.c: Likewise
* libwget/http.c: Likewise
* libwget/http_highlevel.c: Likewise
* libwget/http_parse.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* src/gpgme.c: Likewise
* src/stats_site.c: Likewise
* src/wget.c: Likewise
* src/wget_gpgme.h: Likewise
* src/wget_stats.h: Likewise
* tests/test-cookies-http_state.c: Likewise
* unit-tests/test-cookies-http_state.c: Likewise
* unit-tests/test.c: Likewise
2019-07-19 16:41:21 +02:00
cdb3600791 Update copyrigght to 2019 2019-01-02 12:42:53 +01:00
3688ffb941 Update copyright to 2018 2018-04-30 20:52:11 +02:00
29e241cad7 Fix usage of wget_global_init() and wget_http_get()
* examples/*.c: Use 0 instead of NULL as terminating param
* fuzz/main.c: Likewise
* include/wget/wget.h: Remove G_GNUC_WGET_NULL_TERMINATED from
  wget_global_init() and wget_http_get().
2017-10-09 16:56:53 +02:00
4099757fbc * examples/getstream.c (header_callback): Use wget_malloc() instead of malloc() 2017-05-03 14:53:37 +02:00
b3aede0e57 Remove gnulib dependencies from examples and wget.h
* cfg.mk: Add examples as excludes for config.h
* examples/Makefile.am: Remove -I to srcdir and builddir
* examples/*.c: Remove #include <config.h>
* include/wget/wget.h: Remove gettext include and defines
* libwget/private.h: Add gettext include and defines
* src/wget_main.h: Likewise
* tests/libtest.h: Likewise
* src/log.c: Add #include <string.h>
2017-04-30 21:37:39 +02:00
58f1274808 Do not include unused strings.h
* examples/getstream.c: Remove #include <strings.h>
* libwget/css.c: Likewise
* libwget/encoding.c: Likewise
* libwget/hashfile.c: Likewise
* libwget/metalink.c: Likewise
* libwget/net.c: Likewise
* libwget/robots.c: Likewise
* src/wget.c: Likewise
2017-04-29 20:24:19 +02:00
ec396c577f Fix URLs to HTTPS where possible 2017-02-28 15:31:30 +01:00
8b1a701c21 Use wget_strdup() instead of strdup()
* examples/getstream.c: Use wget_strdup().
* libwget/cookie.c: Likewise.
* libwget/encoding.c: Likewise.
* libwget/http.c: Likewise.
* libwget/iri.c: Likewise.
* libwget/netrc.c: Likewise.
* src/options.c: Likewise.
* src/wget.c: Likewise.
* tests/test.c: Likewise.
2016-11-03 09:58:09 +01:00
b049eb6d3a Fix gcc/clang warnings from the new manywarnings feature
* configure.ac: Suppress -Wunsuffixed-float-constants for gcc,
  add -Wno-disabled-macro-expansion to clang flags
* examples/getstream.c: Removed 'unused' attributes from argc and argv.
* include/wget/wget.h: Fix slot to int for bar functions.
* libwget/bar.c: Fix slot to int for bar functions, cast to int,
  change type of bitfield 'redraw' to unsigned.
* libwget/hsts.c (wget_hsts_new): Fix int to bitfield conversion.
* libwget/http.c: Cast printf %p format to (void *).
* src/wget.c: Cast printf %p format to (void *),
  remove ACTION_DONE from enum actions.
* src/wget_host.h: Fix double declaration of host_remove_job()
* tests/libtest.c (wget_test_check_filesystem): Fix type of 'rc'.
* tests/test-idn-robots.c: Fix comma to semikolon at end of line.
* tests/test.c (test_strcasecmp_ascii): Fix type of loop variable.
2016-11-02 22:19:41 +01:00
9568b0c87e Rename include/libwget.h to include/wget/wget.h+wgetver.h 2016-09-30 09:47:32 +02:00
64333b4924 Revert "Support direct mpeg streams in examples/getstream.c"
This reverts commit d3d7342e80.
2016-05-20 20:12:13 +02:00
d3d7342e80 Support direct mpeg streams in examples/getstream.c
* examples/getstream.c: Support direct mpeg streams
2016-05-20 16:38:51 +02:00
b9d930bde6 Support audio/x-scpls in examples/getstream.c
* examples/getstream.c (main): Fix m3u parsing, Add audio/x-scpls
2016-05-20 15:54:00 +02:00
acf5d564ea Fix and enhance examples/getstream.c
* autogen.sh: Add gnulib module 'c-strcasestr'
* examples/getstream.c: Support several playlist formats

getstream.c now supports .m3u, .wax, .asx, .pls, xspf playlist formats.
Playlist parsing is partly hackish - it is just an example after all.

The title information is displayed on stderr, the audio goes to stdout to
allow piping to mpg321, sox, etc. For details see the top comment in the
source file.
2016-05-15 18:23:59 +02:00
dd3c2f63b2 Updated copyright year for all relevant files 2016-01-25 13:06:21 +01:00
18bdc20576 Replaced strndup() by wget_strmemdup()
* examples/getstream.c, examples/print_css_urls2.c, libwget/cookie.c,
  libwget/css_url.c, libwget/encoding.c, libwget/hsts.c,
  libwget/html_url.c, libwget/http.c, libwget/metalink.c,
  libwget/ocsp.c, libwget/robots.c, libwget/ssl_gnutls.c,
  src/options.c, src/wget.c, tests/stringmap_perf.c,
  tests/test-wget-1.c

Strndup() calls an additional strlen() on the input string.
This is normally not needed, and thus just consumes CPU cycles.
All calls to strndup() could be replaced by wget_strmemdup, which
basically allocates len+1 memory, calls memcpy and terminates with
a 0 byte.
2015-11-10 10:55:30 +01:00
0f8e49128a Transfer copyright to Free Software Foundation, Inc. 2015-09-22 11:50:06 +02:00
c6b0e461a1 Transform Mget into Wget 2015-09-19 22:54:38 +02:00
b71abda2b0 Rearrange HTTP header API 2015-09-07 12:26:21 +02:00
6cdd208444 fix several issues found by Coverity 2015-03-07 22:55:17 +01:00
675831afa3 use ASCII-only string case comparison 2014-09-23 17:11:01 +02:00
d2c47068e8 added threaded progress bar (--progress=bar) 2014-09-18 17:14:25 +02:00
73f89e6f2a fix type naming to mget type naming convention 2014-02-05 12:39:36 +01:00
a5f21a0ac9 added example print_html_url.c (scanning and printing URLs from HTML files) 2014-01-03 17:28:50 +01:00
a039aa95ba updated README.md 2013-10-07 13:21:04 +02:00
5d8a9a6fe2 fixed clang 3.4 analyzer issues 2013-10-04 13:00:16 +02:00
4f6cff52c0 tuned getstream.c example 2013-04-21 20:57:40 +02:00
acb1872cd6 getstream.c example now handles Shoutcast metainfo 2013-04-07 21:54:27 +02:00
f79d9029e1 new example getting a stream from a .m3u URL 2013-02-03 21:57:09 +01:00