]> sjero.net Git - wget/commitdiff
[svn] Re-alphabetize the command list. Have run_command correctly interpret
authorhniksic <devnull@localhost>
Sun, 8 May 2005 17:28:19 +0000 (10:28 -0700)
committerhniksic <devnull@localhost>
Sun, 8 May 2005 17:28:19 +0000 (10:28 -0700)
the new return value of parse_line.

src/ChangeLog
src/init.c

index 9d6ce3d12fa44c6201a0b980b86bdaea983d08ab..3fcc019f941e36b557d94cfa9d232c61bcf14d40 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * init.c (run_command): Correctly interpret the return value of
+       parse_line.
+       (commands): Re-alphabetize.
+
 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * netrc.c (parse_netrc): Explicitly check for assignment != NULL
index 6834c283b45fdf9d638c456d38fcbb1138dda314..45d10243584178c61486dc6dc8ed071c4eca62f2 100644 (file)
@@ -159,8 +159,8 @@ static struct {
   { "forcehtml",       &opt.force_html,        cmd_boolean },
   { "ftppasswd",       &opt.ftp_passwd,        cmd_string }, /* deprecated */
   { "ftppassword",     &opt.ftp_passwd,        cmd_string },
-  { "ftpuser",         &opt.ftp_user,          cmd_string },
   { "ftpproxy",                &opt.ftp_proxy,         cmd_string },
+  { "ftpuser",         &opt.ftp_user,          cmd_string },
   { "glob",            &opt.ftp_glob,          cmd_boolean },
   { "header",          &opt.user_headers,      cmd_spec_header },
   { "htmlextension",   &opt.html_extension,    cmd_boolean },
@@ -649,16 +649,15 @@ run_command (const char *opt)
 {
   char *com, *val;
   int comind;
-  int status = parse_line (opt, &com, &val, &comind);
-  if (status == 1)
+  switch (parse_line (opt, &com, &val, &comind))
     {
+    case line_ok:
       if (!setval_internal (comind, com, val))
        exit (2);
       xfree (com);
       xfree (val);
-    }
-  else if (status == 0)
-    {
+      break;
+    default:
       fprintf (stderr, _("%s: Invalid --execute command `%s'\n"),
               exec_name, opt);
       exit (2);