]> sjero.net Git - wget/blobdiff - src/retr.c
Merge in gerel's url-parsing stuff.
[wget] / src / retr.c
index 4fabd7570d8a5990fb302009accd15805e07b389..9627f9e31320f39ea4f58ad6b32b78b176089e2c 100644 (file)
@@ -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;
+}