188989e067
Update copyright year
2024-01-07 12:41:02 +01:00
15ba1db248
Update copyrights
2023-08-31 12:57:30 +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
b8a2a8274b
Change return type of wget_str_needs_encoding() to bool
...
* include/wget/wget.h: Likewise
* libwget/encoding.c: Likewise
2019-09-18 12:29:35 +02:00
4b9edbad2d
Update Copyright statements to be compatible with update-copyright module
2019-09-10 23:41:56 +02:00
0d4327adfa
* libwget/encoding.c (wget_memiconv): Check memory allocations, return WGET_E_* codes
2019-08-16 15:24:19 +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
b381286783
Remove xrealloc define for wget_realloc
...
* libwget/private.h: Remove #define
* libwget/*.c: Replace xrealloc by wget_realloc
2019-06-20 16:51:57 +02:00
5079807ffd
Remove xmalloc define for wget_malloc
...
* libwget/private.h: Remove #define
* libwget/*.c: Replace xmalloc by wget_malloc
2019-06-20 16:43:46 +02:00
eb508f4903
* libwget/encoding.c (wget_str_to_ascii): Use IDN2_USE_STD3_ASCII_RULES
...
We convert hostnames and thus have to apply IDN2_USE_STD3_ASCII_RULES.
If we don't do, the result could contain any ascii characters,
e.g. 'evil.c\u2100.example.com' will be converted into
'evil.ca/c.example.com', which seems no good idea.
2019-03-01 10:29:11 +01:00
cdb3600791
Update copyrigght to 2019
2019-01-02 12:42:53 +01:00
cc22f0de3b
Remove support for libunistring and libidn2 < 0.14
...
* configure.ac: Remove support for libidn2 < 0.14 and libunistring
* libwget/encoding.c: Same
* README.md: Same
2018-10-10 17:08:16 +02:00
3688ffb941
Update copyright to 2018
2018-04-30 20:52:11 +02:00
75cab6754e
Make strings translatable for error_printf()
...
* libwget/*.c: Likewise
* src/*.c: Likewise
* po/POTFILES.in: Add source files
2018-01-11 13:11:36 +01:00
b0579db097
Fix several issues foudn by cppcheck
...
* libwget/bar.c (_wget_bar_st): Remove unused member screen_width
* libwget/css.c: Reduce scope of variables
* libwget/encoding.c: Likewise
* libwget/hpkp.c: Likewise
* libwget/http.c: Likewise
* libwget/http_parse.c: Likewise
* libwget/iri.c: Likewise
* libwget/net.c: Likewise
* libwget/sitemap_url.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/vector.c: Likewise
* src/dl.c: Likewise
2017-12-06 11:15:08 +01:00
40cef71282
Reduce scope of variables
...
* libwget/bar.c: Likewise
* libwget/console.c: Likewise
* libwget/encoding.c: Likewise
* libwget/hashmap.c: Likewise
* libwget/io.c: Likewise
* libwget/md5.c: Likewise
* libwget/netrc.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/xml.c: Likewise
* src/job.c: Likewise
* src/plugin.c: Likewise
* libwget/hashfile.c: Include local private.h
* src/host.c: Remove unused find_free_job_context struct
Found by: cppcheck
2017-10-05 00:27:31 +05:30
6948deae02
Use type bool instead of char
...
* include/wget/wget.h: Use type bool instead of char
* libwget/bar.c: Likewise
* libwget/base64.c: Likewise
* libwget/cookie.c: Likewise
* libwget/encoding.c: Likewise
* libwget/hsts.c: Likewise
* libwget/http.h: Likewise
* libwget/http_highlevel.c: Likewise
* libwget/http_parse.c: Likewise
* libwget/ip.c: Likewise
* libwget/iri.c: Likewise
* libwget/logger.c: Likewise
* libwget/net.h: Likewise
* libwget/ocsp.c: Likewise
* libwget/tls_session.c: Likewise
* libwget/vector.c: Likewise
* src/plugin.c: Likewise
* src/wget_host.h: Likewise
* src/wget_job.h: Likewise
* src/wget_plugin.h: Likewise
* tests/test-plugin-dummy.c: Likewise
2017-09-22 13:08:49 +00:00
6246345ef7
Remove nonnull attribute from some functions
...
* include/wget/wget.h: Remove nonnull attribute from some functions
* libwget/encoding.c: Add explicit checks for NULL
* libwget/io.c: Likewise
* libwget/pipe.c: Likewise
* libwget/strlcpy.c: Likewise
* libwget/utils.c: Likewise
2017-05-15 10:28:03 +02:00
c6ee3d79ad
Fix syntax-check 'sc_prohibit_have_config_h'
...
* cfg.mk: Remove sc_prohibit_have_config_h from local-checks-to-skip
* libwget/*.c: Include <config.h> unconditionally
* src/*.c: Likewise
* tests/*.c: Likewise
2017-04-30 22:01:34 +02:00
59f163cd7b
Remove useless cpp parens (syntax-check)
2017-04-29 20:56:57 +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
bf432c29ee
* libwget/encoding.c (wget_str_to_ascii): Fall back to TR46 transitional on error
2017-04-25 12:36:17 +02:00
6bb3ff5ee1
* libwget/encoding.c (wget_memiconv): Treat non-reversible conversion as error
2017-04-16 19:44:03 +02:00
7d2eb91b1c
Skip IDNA tests when IDNA not available
...
* libwget/encoding.c: Fix #ifdef
* tests/test-idn-cmd.c: Skip if IDNA not available
* tests/test-idn-meta.c: Likewise
* tests/test-idn-robots.c: Likewise
* tests/test.c (test_iri_parse): Skip IDN test
2017-03-27 21:51:42 +02:00
1d52ade444
* libwget/encoding.c: Include idn-free.h on _WIN32
2017-03-23 16:44:47 +01:00
3005824e71
Fix misuse of libidn & libidn2 memory
...
* libwget/encoding.c (wget_str_to_ascii):
Free libidn memory with idn_free(),
Free libidn2 memory with idn2_free()
2017-03-23 14:33:11 +01:00
8610300d78
Use IDNA2008 + TR46 non-transitional for IRIs
...
* libwget/encoding.c: Fix unistring includes,
(wget_str_to_ascii): Check for libidn2 version
* src/options.c (init): Remove "unistring" output for --version
2017-03-20 09:59:37 +01: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
165cfa20fb
Mark some functions as pure
...
* libwget/cookie.c (_compare_cookie{,2}): Mark as pure
* libwget/encoding.c (_utf8_is_valid): Same
* libwget/hsts.c (_compare_hsts): Same
* libwget/ocsp.c (_compare_ocsp): Same
* libwget/netrc.c (_compare_netrc): Same
* libwget/tls_session.c (_compare_tls_session): Same
2016-09-30 14:48:08 +02:00
9568b0c87e
Rename include/libwget.h to include/wget/wget.h+wgetver.h
2016-09-30 09:47:32 +02:00
4597de60d2
* libwget/encoding.c (wget_memiconv): Fix memleak
...
Reported-by: Coverity
2016-09-14 12:54:38 +02:00
7d63e876ed
* libwget/encoding.c: Use ICONV_CONST to avoid cc warning
2016-09-09 17:10:54 +02:00
483c304aef
Support parsing of UTF-16 HTML documents
...
* examples/print_html_urls.c (html_parse_localfile):
Detect BOM (Byte Order Mark), convert UTF-16 to UTF-8 before parsing.
* include/libwget.h.in: Remove wget_charset_transcode(),
add wget_memiconv() and wget_striconv().
* libwget/encoding.c: Implement wget_memiconv() and wget_striconv()
* src/wget.c (html_parse): Add 'html_len' param,
convert UTF-16 to UTF-8 before parsing.
* tests/test.c: New test for wget_memiconv().
2016-04-24 15:08:20 +02:00
857ea9de85
* libwget/encoding.c: Use '#ifdef WITH_LIBIDN' instead of '#if'
2016-02-06 21:40:09 +01:00
dd3c2f63b2
Updated copyright year for all relevant files
2016-01-25 13:06:21 +01:00
33697e17df
Add gnulib module langinfo
...
* autogen.sh: Add gnulib module langinfo
* configure.ac: Remove searching for stringprep.h and langinfo.h
* libwget/encoding.c: Remove conditional code
2016-01-12 16:31:29 +01:00
14a3c0f806
Fix OpenSolaris libidn include directory
...
* configure.ac: Search for idn/idna.h
* libwget/encoding.c: Include idn/idna.h if found
2016-01-09 19:32:27 +01:00
e168584d02
Fix iconv conversion
...
* libwget/encoding.c: Kick out the last character from iconv().
Thanks to Eli Zaretskii <eliz@gnu.org > for suggesting the fix.
Reported-by: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl >
2015-12-15 10:47:16 +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