From 79c44907343fe225d2debe5cba6ed7d7ff6b9ca0 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sun, 8 May 2005 10:28:19 -0700 Subject: [PATCH] [svn] Re-alphabetize the command list. Have run_command correctly interpret the new return value of parse_line. --- src/ChangeLog | 6 ++++++ src/init.c | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9d6ce3d1..3fcc019f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-05-08 Hrvoje Niksic + + * init.c (run_command): Correctly interpret the return value of + parse_line. + (commands): Re-alphabetize. + 2005-05-08 Hrvoje Niksic * netrc.c (parse_netrc): Explicitly check for assignment != NULL diff --git a/src/init.c b/src/init.c index 6834c283..45d10243 100644 --- a/src/init.c +++ b/src/init.c @@ -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); -- 2.39.2