22#ifdef FREECIV_MSWINDOWS
40#ifdef HAVE_CURL_MIME_API
70#ifdef CUSTOM_CACERT_PATH
134 _(
"Failed to fetch %s: %s"), URL,
183 _(
"Could not open %s for writing"), filename);
203#ifdef HAVE_CURL_MIME_API
214 const char *
name,
const char *val)
216#ifdef HAVE_CURL_MIME_API
235 const char *
name,
const int val)
248#ifdef HAVE_CURL_MIME_API
286#ifdef HAVE_CURL_MIME_API
302 if (addr !=
nullptr) {
331#ifndef __EMSCRIPTEN__
fz_FILE * fz_from_memory(char *buffer, int size, bool control)
#define fc_calloc(n, esz)
#define fc_realloc(ptr, sz)
static CURL * netfile_init_handle(void)
void netfile_close_post(struct netfile_post *post)
static char error_buf_curl[CURL_ERROR_SIZE]
struct netfile_post * netfile_start_post(void)
bool netfile_send_post(const char *URL, struct netfile_post *post, FILE *reply_fp, struct netfile_write_cb_data *mem_data, const char *addr)
struct section_file * netfile_get_section_file(const char *URL, nf_errmsg cb, void *data)
void netfile_add_form_int(struct netfile_post *post, const char *name, const int val)
static bool netfile_download_file_core(const char *URL, FILE *fp, struct netfile_write_cb_data *mem_data, nf_errmsg cb, void *data)
size_t(* netfile_write_cb)(char *ptr, size_t size, size_t nmemb, void *userdata)
void netfile_add_form_str(struct netfile_post *post, const char *name, const char *val)
bool netfile_download_file(const char *URL, const char *filename, nf_errmsg cb, void *data)
static size_t netfile_memwrite_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
static size_t dummy_write(void *buffer, size_t size, size_t nmemb, void *userp)
void(* nf_errmsg)(const char *msg, void *data)
struct section_file * secfile_from_stream(fz_FILE *stream, bool allow_duplicates)
struct curl_httppost * first
struct curl_httppost * last
int fc_snprintf(char *str, size_t n, const char *format,...)
FILE * fc_fopen(const char *filename, const char *opentype)