コード例 #1
0
ファイル: test_linking.c プロジェクト: darnir/wget2
int main(void)
{
	char *empty = (char *)"";

	wget_info_printf("%d\n", wget_base64_is_string("")); // base64.c
	wget_buffer_alloc(0); // buffer.c
	wget_buffer_printf((wget_buffer_t *)1, "%s", ""); // buffer_printf.c
	strlcpy((char *)"", "", 0); // strlcpy.c
	wget_css_parse_buffer((const char *)1, 0, NULL, NULL, NULL); // css.c
	wget_decompress_close(NULL); // decompressor.c
	wget_hashmap_create(0, 0, NULL, NULL); // hashmap.c
	wget_fdgetline(&empty, (size_t *)1, 0); // io.c
	wget_iri_parse("", NULL); // iri.c
	wget_list_free((wget_list_t **)1); // list.c
	wget_debug_write("", 0); // log.c
	wget_logger_set_file(NULL, ""); // logger.c
	wget_tcp_set_connect_timeout(NULL, 0); // net.c
	wget_netrc_deinit(NULL); // netrc.c
	wget_strdup(""); // mem.c
//	wget_popenf("r", "%s", ""); // pipe.c
//	wget_bsprintf(NULL, NULL, "%s", ""); // printf.c
	wget_ssl_set_config_int(0, 0); // ssl_[gnutls].c
	wget_stringmap_create(0); // stringmap.c
	if (wget_strcmp("", "")) {}; // utils.c
	wget_vector_set_destructor(NULL, NULL); // vector.c
	wget_malloc(1); // xalloc.c
	wget_xml_parse_buffer("", NULL, NULL, 0); // xml.c
}
コード例 #2
0
ファイル: ocsp.c プロジェクト: kush789/wget2
wget_ocsp_db_t *wget_ocsp_db_init(wget_ocsp_db_t *ocsp_db)
{
	if (!ocsp_db)
		ocsp_db = xmalloc(sizeof(wget_ocsp_db_t));

	memset(ocsp_db, 0, sizeof(*ocsp_db));

	ocsp_db->fingerprints = wget_hashmap_create(16, -2, (unsigned int(*)(const void *))_hash_ocsp, (int(*)(const void *, const void *))_compare_ocsp);
	wget_hashmap_set_key_destructor(ocsp_db->fingerprints, (void(*)(void *))wget_ocsp_free);
	wget_hashmap_set_value_destructor(ocsp_db->fingerprints, (void(*)(void *))wget_ocsp_free);

	ocsp_db->hosts = wget_hashmap_create(16, -2, (unsigned int(*)(const void *))_hash_ocsp, (int(*)(const void *, const void *))_compare_ocsp);
	wget_hashmap_set_key_destructor(ocsp_db->hosts, (void(*)(void *))wget_ocsp_free);
	wget_hashmap_set_value_destructor(ocsp_db->hosts, (void(*)(void *))wget_ocsp_free);

	wget_thread_mutex_init(&ocsp_db->mutex);

	return ocsp_db;
}
コード例 #3
0
ファイル: netrc.c プロジェクト: rockdaboot/wget2
wget_netrc_db_t *wget_netrc_db_init(wget_netrc_db_t *netrc_db)
{
	if (!netrc_db)
		netrc_db = xmalloc(sizeof(wget_netrc_db_t));

	memset(netrc_db, 0, sizeof(*netrc_db));

	netrc_db->machines = wget_hashmap_create(16, -2, (unsigned int(*)(const void *))_hash_netrc, (int(*)(const void *, const void *))_compare_netrc);
	wget_hashmap_set_key_destructor(netrc_db->machines, (void(*)(void *))wget_netrc_free);
	wget_hashmap_set_value_destructor(netrc_db->machines, (void(*)(void *))wget_netrc_free);

	return netrc_db;
}