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
f2c6567674
* libwget/netrc.c (wget_netrc_db_load): Use wget_strncasecmp_ascii()
2017-09-27 13:26:48 +02:00
33aa11c3bf
Add GNU extensions to .netrc parsing
...
* include/wget/wget.h (wget_netrc_t): Add port and force
* libwget/netrc.c (wget_netrc_db_load): Parse port and force
2017-09-27 13:13:32 +02:00
81db8b3a30
* libwget/netrc.c: Suppress clang warning about integer overflow in hash function
2017-08-01 15:38:40 +02:00
08ed5088f8
Remove rarely used parameter 'off' from wget_hashmap_create()
...
* libwget/hashmap.c: Remove 'off' parameter, now defaults to -2,
Add wget_hashmap_set_growth_policy() to set 'off'
* include/wget/wget.h: likewise
* libwget/hpkp.c: Adapt to the change in wget_hashmap_create()
* libwget/hsts.c: Likewise
* libwget/netrc.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/stringmap.c: Likewise
* libwget/test_linking.c: Likewise
* libwget/tls_session.c: Likewise
* src/blacklist.c: Likewise
* src/host.c: Likewise
* src/wget.c: Likewise
2017-06-11 16:13:14 +00: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
0c6cf2a630
Fix .netrc parsing
...
* include/wget/wget.h (_wget_netrc_db_st): Rename .key to .host
* libwget/netrc.c (wget_netrc_db_add): Fix parsing
* tests/test.c: New function test_netrc()
2017-03-07 13:17:46 +01:00
ec396c577f
Fix URLs to HTTPS where possible
2017-02-28 15:31:30 +01:00
bfcd65c12b
Use typedefs for function pointer arguments
...
* include/wget/wget.h: Add typedefs
* libwget/cookie.c: Use typedefs
* libwget/css.c: Likewise
* libwget/css_url.c: Likewise
* libwget/decompressor.c: Likewise
* libwget/hashmap.c: Likewise
* libwget/hsts.c: Likewise
* libwget/http.c: Likewise
* libwget/init.c: Likewise
* libwget/io.c: Likewise
* libwget/list.c: Likewise
* libwget/logger.c: Likewise
* libwget/metalink.c: Likewise
* libwget/net.c: Likewise
* libwget/netrc.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/private.h: Likewise
* libwget/robots.c: Likewise
* libwget/stringmap.c: Likewise
* libwget/tls_session.c: Likewise
* libwget/vector.c: Likewise
* libwget/xml.c: Likewise
* src/blacklist.c: Likewise
* src/host.c: Likewise
* src/options.c: Likewise
* src/wget.c: Likewise
* tests/stringmap_perf.c: Likewise
* tests/test.c: Likewise
2017-01-23 14:43:17 +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
a582d324d6
Fix / silence some Coverity findings
2016-02-07 12:48:41 +01:00
dd3c2f63b2
Updated copyright year for all relevant files
2016-01-25 13:06:21 +01:00
bbcb319ac3
Add new options --netrc and --netrc-file
...
* libwget/netrc.c: New file for netrc API functions
* include/libwget.h: Add netrc function prototypes
* libwget/Makefile.am: Add netrc.c
* libwget/test_linking.c (main): Add call to wget_netrc_deinit()
* src/options.c: Add --netrc and --netrc-file
* src/options.h: Add config.netrc and config.netrc_file
* src/wget.c (http_get): Get login/password from netrc data
* tests/test-auth-basic.c (main): Add test for --netrc-file
2015-11-11 20:58:45 +01:00