X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fretr.c;h=f081d83160e332275ad3231b6cdc2ab9cc5fd905;hb=766df9d4e9392045a4e5c730ed81e599b509557a;hp=21c9002eaaf5905f16c5c845172645128f3bf559;hpb=b0bdf9549464dcf6058d55aeb81220b73cd9701c;p=wget diff --git a/src/retr.c b/src/retr.c index 21c9002e..f081d831 100644 --- a/src/retr.c +++ b/src/retr.c @@ -1070,3 +1070,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; +}