From 047569339406f2be1637ae4cee5dd0c9a9c2328f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 22 Jan 2014 23:19:57 +0000 Subject: create table for fetcher operations and move all operations into it --- content/fetchers/curl.c | 4 ++-- content/fetchers/file.c | 8 ++++---- content/fetchers/resource.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'content/fetchers') diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c index bc6b2c338..f3a8385a1 100644 --- a/content/fetchers/curl.c +++ b/content/fetchers/curl.c @@ -1267,7 +1267,7 @@ fetch_curl_post_convert(const struct fetch_multipart_data *control) if (control->file) { char *leafname = 0; - leafname = guit->browser->filename_from_path(control->value); + leafname = guit->fetch->filename_from_path(control->value); if (leafname == NULL) continue; @@ -1297,7 +1297,7 @@ fetch_curl_post_convert(const struct fetch_multipart_data *control) LOG(("curl_formadd: %d (%s)", code, control->name)); } else { - char *mimetype = fetch_mimetype(control->value); + char *mimetype = guit->fetch->mimetype(control->value); code = curl_formadd(&post, &last, CURLFORM_COPYNAME, control->name, CURLFORM_FILE, control->rawfile, diff --git a/content/fetchers/file.c b/content/fetchers/file.c index 26ef9069b..83c408e5a 100644 --- a/content/fetchers/file.c +++ b/content/fetchers/file.c @@ -305,7 +305,7 @@ static void fetch_file_process_plain(struct fetch_file_context *ctx, /* content type */ if (fetch_file_send_header(ctx, "Content-Type: %s", - fetch_filetype(ctx->path))) + guit->fetch->filetype(ctx->path))) goto fetch_file_process_aborted; /* content length */ @@ -385,7 +385,7 @@ fetch_file_process_aborted: /* content type */ if (fetch_file_send_header(ctx, "Content-Type: %s", - fetch_filetype(ctx->path))) + guit->fetch->filetype(ctx->path))) goto fetch_file_process_aborted; /* content length */ @@ -575,7 +575,7 @@ static void fetch_file_process_dir(struct fetch_file_context *ctx, continue; strncpy(urlpath, ctx->path, sizeof urlpath); - if (guit->browser->path_add_part(urlpath, sizeof urlpath, + if (guit->fetch->path_add_part(urlpath, sizeof urlpath, ent->d_name) == false) continue; @@ -608,7 +608,7 @@ static void fetch_file_process_dir(struct fetch_file_context *ctx, false, path, ent->d_name, - fetch_filetype(urlpath), + guit->fetch->filetype(urlpath), ent_stat.st_size, datebuf, timebuf, buffer, sizeof(buffer)); diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c index d1b21b741..cce816aa5 100644 --- a/content/fetchers/resource.c +++ b/content/fetchers/resource.c @@ -207,7 +207,7 @@ static bool fetch_resource_initialise(lwc_string *scheme) } } - e->url = guit->browser->get_resource_url(fetch_resource_paths[i]); + e->url = guit->fetch->get_resource_url(fetch_resource_paths[i]); if (e->url == NULL) { lwc_string_unref(e->path); } else { -- cgit v1.2.3