linamh/www-client/prozilla/files/prozilla-Oopt.patch

42 lines
951 B
Diff
Raw Permalink Normal View History

--- prozilla-2.0.3/src/main.cpp.orig 2006-01-22 23:40:16.000000000 +0100
+++ prozilla-2.0.3/src/main.cpp 2006-01-22 23:48:40.000000000 +0100
@@ -216,12 +216,13 @@
{
int c;
int ret;
+ char *opt_file = NULL;
proz_init (argc, argv); //init libprozilla
set_defaults (); //set some reasonable defaults
load_prefs (); //load values from the config file
while ((c =
- getopt_long (argc, argv, "?hvrfk:1Lt:VgsP:", long_opts,
+ getopt_long (argc, argv, "?hvrfk:1Lt:VgsP:O:", long_opts,
NULL)) != EOF)
{
switch (c)
@@ -274,7 +275,12 @@
*/
rt.use_netrc = FALSE;
break;
-
+ case 'O':
+ /*
+ * Output file name
+ */
+ opt_file = kstrdup(optarg);
+ break;
case 'P':
/*
* Save the downloaded file to DIR
@@ -503,6 +509,9 @@
exit (0);
}
+ if (opt_file)
+ url_data->file=opt_file;
+
PrintMessage("Starting.....");
//In to %s\n",url_data->host);
// start the download