22 Commits

Author SHA1 Message Date
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