X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fretr.c;h=9627f9e31320f39ea4f58ad6b32b78b176089e2c;hp=4fabd7570d8a5990fb302009accd15805e07b389;hb=94d6650817110c639975d45df57b345e10b0e396;hpb=8d07fbcc9f653e36e7c9f8924baac0dafbcae62d diff --git a/src/retr.c b/src/retr.c index 4fabd757..9627f9e3 100644 --- a/src/retr.c +++ b/src/retr.c @@ -1082,3 +1082,16 @@ no_proxy_match (const char *host, const char **no_proxy) else return sufmatch (no_proxy, host); } + +/* Set the file parameter to point to the local file string. */ +void +set_local_file (const char **file, const char *default_file) +{ + if (opt.output_document) + { + if (output_stream_regular) + *file = opt.output_document; + } + else + *file = default_file; +}