Commit Graph

818 Commits

Author SHA1 Message Date
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
34182b7706 Rename wget_http_challenge_t -> wget_http_challenge
* include/wget/wget.h: Rename wget_http_challenge_t -> wget_http_challenge
* libwget/http.c: Likewise
* libwget/http_parse.c: Likewise
* src/options.c: Likewise
* src/wget.c: Likewise
* unit-tests/test.c: Likewise
2019-07-19 16:32:07 +02:00
f119b6c734 Rename wget_http_link_t -> wget_http_link
* include/wget/wget.h: Rename wget_http_link_t -> wget_http_link
* libwget/http_parse.c: Likewise
* src/wget.c: Likewise
2019-07-19 16:29:58 +02:00
42947cfe1a Rename wget_http_header_param_t -> wget_http_header_param
* include/wget/wget.h: Rename wget_http_header_param_t -> wget_http_header_param
* libwget/http.c: Likewise
* libwget/http_highlevel.c: Likewise
* libwget/http_parse.c: Likewise
* src/options.c: Likewise
* src/wget.c: Likewise
2019-07-19 16:28:53 +02:00
035753e4c8 Rename wget_dns_t -> wget_dns
* include/wget/wget.h: Rename wget_dns_t -> wget_dns
* libwget/dns.c: Likewise
* libwget/net.c: Likewise
* libwget/net.h: Likewise
* src/options.c: Likewise
2019-07-19 16:20:18 +02:00
a13caad84d Rename wget_dns_cache_t -> wget_dns_cache
* include/wget/wget.h: Rename wget_dns_cache_t -> wget_dns_cache
* libwget/dns.c: Likewise
* libwget/dns_cache.c: Likewise
* libwget/init.c: Likewise
* src/options.c: Likewise
2019-07-19 16:18:31 +02:00
7754c7d254 Rename wget_html_tag_t -> wget_html_tag
* include/wget/wget.h: Rename wget_html_tag_t -> wget_html_tag
* libwget/html_url.c: Likewise
* src/options.c: Likewise
2019-07-19 16:15:58 +02:00
8c47901ef8 Rename wget_html_parsed_result_t -> wget_html_parsed_result
* include/wget/wget.h: Rename wget_html_parsed_result_t -> wget_html_parsed_result
* examples/check_url_types.c: Likewise
* examples/print_html_urls.c: Likewise
* fuzz/libwget_html_url_fuzzer.c: Likewise
* libwget/html_url.c: Likewise
* src/wget.c: Likewise
2019-07-19 16:14:33 +02:00
74928eaf59 Rename wget_html_parsed_url_t -> wget_html_parsed_url
* include/wget/wget.h: Rename wget_html_parsed_url_t -> wget_html_parsed_url
* examples/check_url_types.c: Likewise
* examples/print_html_urls.c: Likewise
* libwget/html_url.c: Likewise
* src/wget.c: Likewise
2019-07-19 16:13:07 +02:00
eb7e935d22 Rename wget_string_t -> wget_string
* include/wget/wget.h: Rename wget_string_t -> wget_string
* examples/batch_loader.c: Likewise
* examples/check_url_types.c: Likewise
* examples/print_html_urls.c: Likewise
* libwget/atom_url.c: Likewise
* libwget/robots.c: Likewise
* libwget/rss_url.c: Likewise
* libwget/sitemap_url.c: Likewise
* src/host.c: Likewise
* src/wget.c: Likewise
* unit-tests/test.c: Likewise
2019-07-19 16:10:54 +02:00
124d72e0df Rename wget_netrc_t -> wget_netrc
* include/wget/wget.h: Rename wget_netrc_t -> wget_netrc
* libwget/netrc.c: Likewise
* src/wget.c: Likewise
* unit-tests/test.c: Likewise
2019-07-19 16:05:39 +02:00
ae5c2cb664 Rename wget_netrc_db_t -> wget_netrc_db
* include/wget/wget.h: Rename wget_netrc_db_t -> wget_netrc_db
* fuzz/libwget_netrc_fuzzer.c: Likewise
* libwget/netrc.c: Likewise
* src/wget_options.h: Likewise
* unit-tests/test.c: Likewise
2019-07-19 16:02:49 +02:00
e61d3298e5 Rename wget_ocsp_db_t -> wget_ocsp_db
* include/wget/wget.h: Rename wget_ocsp_db_t -> wget_ocsp_db
* examples/http_multi_get.c: Likewise
* fuzz/libwget_ocsp_fuzzer.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/plugin.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/ssl_wolfssl.c: Likewise
* src/plugin.c: Likewise
* src/wget_options.h: Likewise
* src/wget_plugin.h: Likewise
* tests/test-plugin-dummy.c: Likewise
2019-07-19 15:59:58 +02:00
30269fd5c5 Rename wget_tls_session_db_t -> wget_tls_session_db
* include/wget/wget.h: Rename wget_tls_session_db_t -> wget_tls_session_db
* fuzz/libwget_tlssess_fuzzer.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/ssl_wolfssl.c: Likewise
* libwget/tls_session.c: Likewise
* src/wget_options.h: Likewise
2019-07-18 17:05:24 +02:00
618f49160d Rename wget_cookie_db_t -> wget_cookie_db
* include/wget/wget.h: Rename wget_cookie_db_t -> wget_cookie_db
* examples/http_get2.c: Likewise
* fuzz/libwget_cookie_fuzzer.c: Likewise
* libwget/cookie.c: Likewise
* libwget/http_highlevel.c: Likewise
* libwget/init.c: Likewise
* src/wget_options.h: Likewise
* tests/test-cookies-http_state.c: Likewise
* unit-tests/test-cookies-http_state.c: Likewise
* unit-tests/test.c: Likewise
2019-07-18 13:11:55 +02:00
50be5af992 Rename wget_iri_t -> wget_iri
* include/wget/wget.h: Rename wget_iri_t -> wget_iri
* examples/*.c: Likewise
* fuzz/*.c: Likewise
* libwget/*.c: Likewise
* src/*.c: Likewise
* tests/*.c: Likewise
* unit-tests/*.c: Likewise
2019-07-18 13:10:27 +02:00
a764d638f6 Rename wget_decompressor_t -> wget_decompressor
* include/wget/wget.h: Rename wget_decompressor_t -> wget_decompressor
* libwget/decompressor.c: Likewise
* libwget/http.c: Likewise
* src/wget.c: Likewise
2019-07-18 12:57:19 +02:00
9cca7ac7e5 Rename wget_thread_cond_t -> wget_thread_cond
* include/wget/wget.h: Rename wget_thread_cond_t -> wget_thread_cond
* libwget/thread.c: Likewise
* src/wget.c: Likewise
* src/wget_job.h: Likewise
* unit-tests/test-cond.c: Likewise
2019-07-18 12:55:12 +02:00
aadf56562f Rename wget_thread_mutex_t -> wget_thread_mutex
* include/wget/wget.h: Rename wget_thread_mutex_t -> wget_thread_mutex
* libwget/*.c: Likewise
* src/*.c: Likewise
* unit-tests/test-cond.c: Likewise
2019-07-18 12:54:37 +02:00
19f58cbc68 Rename wget_thread_id_t -> wget_thread_id
* include/wget/wget.h: Rename wget_thread_id_t -> wget_thread_id
* libwget/thread.c: Likewise
* src/host.c: Likewise
* src/wget_job.h: Likewise
2019-07-18 12:52:24 +02:00
36bcc83b9a Rename wget_thread_t -> wget_thread
* include/wget/wget.h: Rename wget_thread_t -> wget_thread
* examples/batch_loader.c: Likewise
* libwget/thread.c: Likewise
* src/*.c: Likewise
* unit-tests/test-cond.c: Likewise
2019-07-18 12:50:41 +02:00
2750a09f77 Rename wget_stringmap_t -> wget_stringmap
* include/wget/wget.h: Rename wget_stringmap_t -> wget_stringmap
* libwget/stringmap.c: Likewise
* src/options.c: Likewise
* src/plugin.c: Likewise
* src/wget.c: Likewise
* unit-tests/stringmap_perf.c: Likewise
* unit-tests/test.c: Likewise
2019-07-18 12:42:19 +02:00
80e56aca7d Rename wget_hashmap_t -> wget_hashmap
* include/wget/wget.h: Rename wget_hashmap_t -> wget_hashmap
* libwget/*.c: Likewise
* src/*.c: Likewise
2019-07-18 12:38:04 +02:00
bdbcbb7992 Rename wget_vector_t -> wget_vector
* include/wget/wget.h: Rename wget_vector_t -> wget_vector
* examples/print_css_urls3.c: Likewise
* fuzz/*.c: Likewise
* libwget/*.c: Likewise
* src/*.c: Likewise
* tests/*.c: Likewise
* unit-tests/*.c: Likewise
2019-07-18 12:35:37 +02:00
db50c6a801 Rename wget_buffer_t -> wget_buffer
* include/wget/wget.h: Rename wget_buffer_t -> wget_buffer
* examples/*.c: Likewise
* fuzz/libwget_iri_fuzzer.c: Likewise
* libwget/*.c: Likewise
* src/*.c: Likewise
* tests/*.c: Likewise
* unit-tests/*.c: Likewise
2019-07-18 12:30:57 +02:00
b446bda4fc Rename wget_list_t -> wget_list
* include/wget/wget.h: Likewise
* libwget/list.c: Likewise
* libwget/test_linking.c: Likewise
* src/wget_host.h: Likewise
* src/wget_job.h: Likewise
2019-07-18 12:30:06 +02:00
8d68b8f8a0 Typedef plugin functions not as pointer
* include/wget/wget.h: Remove '*' signature from function typedefs
* libwget/plugin.c: Amend casts and variable types
* src/plugin.c: Likewise
2019-07-17 15:35:00 +02:00
517624f22f Typedef vector functions not as pointer
* include/wget/wget.h: Remove '*' signature from function typedefs
* libwget/*.c: Amend casts
* src/*.c: Likewise
* tests/*.c: Likewise
* unit-tests/*.c: Likewise
2019-07-17 12:39:38 +02:00
a9abff522f Typedef wget_list_browse_t not as pointer
* include/wget/wget.h: Remove '*' signature from function typedef
* libwget/list.c: Amend wget_list_browse() argument
* src/host.c: Amend cast
2019-07-17 12:25:07 +02:00
6a3f1d53c0 Typedef hashmap functions not as pointer
* include/wget/wget.h: Remove '*' signature from function typedefs
* libwget/*.c: Amend casts
* src/*.c: Likewise
* unit-tests/stringmap_perf.c: Likewise
2019-07-17 12:11:09 +02:00
09f6de92b9 * src/stats_site.c (site_stats_init): Always free resources 2019-07-12 17:11:09 +02:00
2b21f3bd79 * src/options.c (parse_stats): Fix stats options
Stats options wrote to stdout when a filename was given without format.
2019-07-12 15:29:59 +02:00
0fbe862bc1 * src/options.c (init): Do not write stats to files when fuzzing 2019-07-12 11:36:54 +02:00
bc020d3053 Fix missing gettext/translation for string literals
* libwget/robots.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/ssl_wolfssl.c: Likewise
* src/gpgme.c: Likewise
* src/host.c: Likewise
* src/options.c: Likewise
* src/wget.c: Likewise
2019-07-09 11:12:30 +02:00
23b68e8255 * src/options.c (_add_tag): Fix OSS-Fuzz issue 15526 2019-06-28 23:43:38 +02:00
01d3c15ab4 * src/wget_options.h (struct config): wget_cookie_db_st -> wget_cookie_db_t 2019-06-27 12:11:05 +02:00
acc9e6b8b4 Rename _wget_cookie_db_st -> wget_cookie_db_st
* include/wget/wget.h: Likewise
* libwget/cookie.c: Likewise
* src/wget_options.h: Likewise
2019-06-27 12:10:58 +02:00
f8f2f69a9f Simplify vector API
* libwget/vector.c: Use wget_free as default destructor,
  renamed _vec_insert_private() -> insert_element,
  (insert_element): removed args 'size' and 'alloc',
  removed the _noalloc() API,
  removed the 'size' argument from functions,
  added wget_vector_add_memdup() as convenience function,
  renamed _compare() -> compare_element
* include/wget/wget.h: Removed _noalloc() functions
* fuzz/libwget_cookie_fuzzer.c: Amended to new API
* libwget/*.c: Likewise
* src/*.c: Likewise
* tests/*.c: Likewise
* unit-tests/*.c: Likewise
2019-06-26 16:43:20 +02:00
14b1ffbed3 Add sc_prohibit_alloc to 'make syntax-check'
* cfg.mk: Add sc_prohibit_alloc rule plus exceptions
* src/options.c: Tag exceptions
* unit-tests/test.c: Likewise

This rule checks for calling malloc()/calloc()/realloc(). Instead, either
use wget_malloc(), wget_calloc() or wget_realloc().
2019-06-24 16:04:39 +02:00
baa5ef562f Add sc_prohibit_free to 'make syntax-check'
* cfg.mk: Add sc_prohibit_free rule plus exceptions
* examples/print_css_urls3.c: Remove unneeded comment
* fuzz/libwget_base64_fuzzer.c: Use wget_free() instead of free()
* fuzz/libwget_cookie_fuzzer.c: Likewise
* fuzz/libwget_css_url_fuzzer.c: Likewise
* fuzz/libwget_http_client_fuzzer.c: Likewise
* fuzz/libwget_utils_fuzzer.c: Likewise
* libwget/vector.c: Likewise
* src/options.c: Likewise
* src/wget_main.h: Likewise
* tests/test-compression.c: Likewise
* tests/test-cookies-http_state.c: Likewise
* tests/test-metalink.c: Likewise
* unit-tests/stringmap_perf.c: Likewise

This rule checks for calling free(). Instead, either use wget_free() or
the convenience macro xfree().
2019-06-24 16:04:23 +02:00
9a26e7baf0 * src/options.c (deinit): Fix OSS-Fuzz issue 15443 2019-06-22 16:21:52 +02:00
08af837899 * src/options.c (parse_stats): Fix OSS-Fuzz issue 15438 2019-06-22 14:17:39 +02:00
d55c540b1b Simplify hashmap and stringmap API
* include/wget/wget.h: Replace _put() by _put_noalloc() functions to
  keep memory allocations outside the library functions.
* libwget/stringmap.c: Likewise
* libwget/hashmap.c: Likewise
* libwget/*.c: Likewise
* src/*.c: Likewise
* unit-tests/*.c: Likewise
2019-06-21 16:04:29 +02:00
dcd9a3725a Separate DNS and DNS caching
* include/wget/wget.h: Rewrite parts of the DNS / DNS caching API
* libwget/dns.c: Likewise
* libwget/dns_cache.c: Likewise
* libwget/init.c (wget_global_init): Amend WGET_DNS_CACHING
* libwget/net.c: Cleanup and amend for the new API
* libwget/net.h: Cleanup
* src/options.c: Use DNS caching instance if caching is requested
2019-06-21 15:52:40 +02:00
94d3969488 Remove --stats-all
* docs/wget2.md Remove docs for --stats-all
* src/options.c: Remove --stats-all and parse_stats_all()
* fuzz/wget_options_fuzzer.dict: remove --stats-all
* tests/Makefile.am: Remove test-stats-all
* tests/test-stats-all.c: Remove file
2019-06-21 15:52:40 +02:00
5230e1d165 Rewrite Site statistics --stats-site
* fuzz/Makefile.am: Remove ../src/stats_site.o
* include/wget/wget.h: Remove wget_stats_type_t
* po/POTFILES.in. Remove src/stats.c
* src/Makefile.am: Remove stats_site.c
* src/options.c (parse_stats_all): Remove site stats code,
  (init): Add DNS stats code,
  (deinit): Cleanup dns stats code
* src/stats.c: Remove file
* src/stats_site.c: iFix for new stats code
* src/wget.c (main): stats_print -> site_stats_print,
  (add_statistics): config.stats_site -> config.stats_site_args,
  (process_response): Likewise
* src/wget_options.h (struct config): Remove stats_site, add stats_site_args
* src/wget_stats.h: Remove stats_opt_t,
  remove stats_print_func_t,
  remove stats_callback_setter_t,
  remove struct stats_opts,
  remove stats_site_opts,
  rename stats_init -> site_stats_init,
  rename stats_exit -> site_stats_exit,
  rename stats_print -> site_stats_print
* unit-tests/Makefile.am: Remove ../src/stats.o
2019-06-21 15:43:34 +02:00
15fba495cf Amend --stats-* syntax
* docs/wget2.md: Amend docs for --stats-*
* src/options.c: Amend option syntax for --stats-*
* tests/stats-test-util.h: Amend tests to succeed
2019-06-21 15:42:10 +02:00
619a7456c1 Rewrite Server statistics --stats-server
* fuzz/Makefile.am: Remove ../src/stats_server.o
* include/wget/wget.h:
  remove wget_server_stats_t,
  rename wget_stats_callback_t -> wget_server_stats_callback_t,
  rename wget_tcp_set_stats_server -> wget_server_set_stats_callback,
  add wget_server_stats_data_t,
  add wget_server_stats_callback_t,
* libwget/http.c: Remove _stats_data_t,
  add server_stats_callback,
  add server_stats_ctx
* src/Makefile.am: Remove stats_server.c
* src/options.c (parse_stats_all): Remove server stats code,
  add stats_callback_server(),
  (init): Add DNS stats code,
  (deinit): Cleanup dns stats code
* src/stats.c (stats_print_func_t): Remove print_server[],
  remove WGET_STATS_TYPE_SERVER
* src/stats_server.c: Remove file
* src/wget_options.h (struct config): Remove stats_server, add stats_server_args
* src/wget_stats.h: Remove stats_server_opts
* unit-tests/Makefile.am: Remove ../src/stats_server.o
2019-06-21 15:33:06 +02:00
e5ef8c168f Rewrite TLS statistics --stats-tls
* fuzz/Makefile.am: Remove ../src/stats_tls.o
* include/wget/wget.h: Add wget_tls_stats_data_t,
  add wget_tls_stats_callback_t,
  add wget_ssl_set_stats_callback_tls,
  remove WGET_STATS_TYPE_TLS,
  remove wget_tls_stats_t,
  remove wget_tcp_set_stats_tls(),
  remove wget_tcp_get_stats_tls()
* libwget/ssl_gnutls.c: Remove old stats code, add new stats code
* libwget/ssl_none.c: Add/remove function stubs
* libwget/ssl_wolfssl.c: Remove old stats code, add new stats code
* src/Makefile.am: Remove stats_tls.c
* src/options.c (parse_stats_all): Remove TLS stats code,
  add stats_callback_tls(),
  (init): Add TLS stats code,
* src/stats.c (stats_print_func_t): Remove print_tls[],
  remove WGET_STATS_TYPE_TLS
* src/stats_tls.c: Remove file
* src/wget_options.h (struct config): Remove stats_tls, add stats_tls_args
* src/wget_stats.h: Remove stats_tls_opts
* unit-tests/Makefile.am: Remove ../src/stats_tls.o
2019-06-21 15:32:13 +02:00
6df1578283 Rewrite OCSP statistics --stats-ocsp
* fuzz/Makefile.am: Remove ../src/stats_ocsp.o
* include/wget/wget.h: Add wget_ocsp_stats_data_t,
  add wget_ocsp_stats_callback_t,
  add wget_ssl_set_stats_callback_ocsp,
  remove WGET_STATS_TYPE_OCSP,
  remove wget_ocsp_stats_t,
  remove wget_tcp_set_stats_ocsp(),
  remove wget_tcp_get_stats_ocsp()
* libwget/ssl_gnutls.c: Remove old stats code, add new stats code
* libwget/ssl_none.c: Add/remove function stubs
* libwget/ssl_wolfssl.c: Remove old stats code, add new stats code
* src/Makefile.am: Remove stats_ocsp.c
* src/options.c (parse_stats_all): Remove OCSP stats code,
  add stats_callback_ocsp(),
  (init): Add OCSP stats code,
* src/stats.c (stats_print_func_t): Remove print_ocsp[],
  remove WGET_STATS_TYPE_OCSP
* src/stats_ocsp.c: Remove file
* src/wget_options.h (struct config): Remove stats_ocsp, add stats_ocsp_args
* src/wget_stats.h: Remove stats_ocsp_opts
* unit-tests/Makefile.am: Remove ../src/stats_ocsp.o
2019-06-21 15:32:13 +02:00