]> sjero.net Git - wget/blobdiff - src/init.c
[svn] Applied Dennis Smit's --preserve-permissions patch.
[wget] / src / init.c
index 8cc77bc7980afe56edf53d2130b82ea692c2d583..abafecddd00d97e4fe42c2a6c8c4b2f8921d7c25 100644 (file)
@@ -167,6 +167,7 @@ static struct {
   { "ignoretags",      &opt.ignore_tags,       cmd_vector },
   { "includedirectories", &opt.includes,       cmd_directory_vector },
   { "input",           &opt.input_filename,    cmd_file },
+  { "keepsessioncookies", &opt.keep_session_cookies, cmd_boolean },
   { "killlonger",      &opt.kill_longer,       cmd_boolean },
   { "limitrate",       &opt.limit_rate,        cmd_bytes },
   { "loadcookies",     &opt.cookies_input,     cmd_file },
@@ -184,6 +185,7 @@ static struct {
   { "passwd",          &opt.ftp_pass,          cmd_string },
   { "postdata",                &opt.post_data,         cmd_string },
   { "postfile",                &opt.post_file_name,    cmd_file },
+  { "preservepermissions", &opt.preserve_perm,     cmd_boolean },
   { "progress",                &opt.progress_type,     cmd_spec_progress },
   { "proxypasswd",     &opt.proxy_passwd,      cmd_string },
   { "proxyuser",       &opt.proxy_user,        cmd_string },
@@ -558,6 +560,7 @@ static int
 setval_internal (int comind, const char *com, const char *val)
 {
   assert (0 <= comind && comind < countof (commands));
+  DEBUGP (("Setting %s (%d) to %s\n", com, comind, val));
   return ((*commands[comind].action) (com, val, commands[comind].closure));
 }
 
@@ -574,6 +577,7 @@ setval_internal (int comind, const char *com, const char *val)
 void
 setoptval (const char *com, const char *val)
 {
+  assert (val != NULL);
   if (!setval_internal (command_by_name (com), com, val))
     exit (2);
 }