from 1 to 0.
Things to add to the release notes for the next full release:
+Backward incompatibilities:
+-- Changed exit status of each nmh command's -version and -help
+ switches from 1 to 0.
+
-version
-help
EOF
-# The exit status is 1 with -help, so temporarily disable -e.
-set +e
+
+# check -help
mhparam -help >$actual 2>&1
-set -e
check $expected $actual
-# check -version, which returns non-zero exit status
-set +e
+# check -version
case `mhparam -v` in
mhparam\ --*) ;;
* ) echo "$0: mhparam -v generated unexpected output" 1>&2
failed=`expr ${failed:-0} + 1`;;
esac
-set -e
# check unknown option
run_test 'mhparam -nonexistent' 'mhparam: -nonexistent unknown'
-version
-help
EOF
-# The exit status is 1 with -help, so temporarily disable -e.
-set +e
+
+# check -help
mhpath -help > $actual 2>&1
-set -e
check $expected $actual
-# check -version, which returns non-zero exit status
-set +e
+# check -version
case `mhpath -v` in
mhpath\ --*) ;;
* ) echo "$0: mhpath -v generated unexpected output" 1>&2
failed=`expr ${failed:-0} + 1`;;
esac
-set -e
# check +
run_test "mhpath +" "$MH_TEST_DIR/Mail"
snprintf (buf, sizeof(buf), "%s [switches] aliases ...",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version (invo_name);
- done (1);
+ done (0);
case ALIASW:
if (!(cp = *argp++) || *cp == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case COMPSW:
if (comp)
snprintf (buf, sizeof(buf), "%s [switches] addrs ...",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version (invo_name);
- done (1);
+ done (0);
case FORMSW:
if (!(form = *argp++) || *form == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case INPLSW:
inplace++;
snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case EDITRSW:
if (!(ed = *argp++) || *ed == '-')
snprintf (buf, sizeof(buf), "%s [switches] [aliasfiles ...]",
invo_name);
print_help (buf, switches, 0);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case MAILSW:
if (!(cp = *argp++) || *cp == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ANNOSW:
anot++;
snprintf (buf, sizeof(buf), "%s [switches] dates ...",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FORMSW:
if (!(form = *argp++) || *form == '-')
snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]",
invo_name);
print_help(buf, switches, 1);
- done(1);
+ done(0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case SEQSW:
if (!(cp = *argp++) || *cp == '-')
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FORMSW:
if (!(form = *argp++) || *form == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ALLSW:
all = 1;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ANNOSW:
anot++;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [+folder] [switches]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case AUDSW:
if (!(cp = *argp++) || *cp == '-')
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
print_help (buf, switches, 0);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case AUTOSW:
autof++;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ADDSW:
addsw++;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case RCACHESW:
icachesw = &rcachesw;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case RCACHESW:
icachesw = &rcachesw;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] [files ...]", invo_name);
print_help (buf, mhlswitches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case BELLSW:
bellflg = 1;
snprintf (buf, sizeof(buf), "%s [addrs ... [switches]]",
invo_name);
print_help (buf, switches, 0);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FROMSW:
if (!(from = *argp++) || *from == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case AUTOSW:
autosw++;
snprintf (buf, sizeof(buf), "%s [profile-components] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case COMPSW:
components = 1;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
}
}
if (*cp == '+' || *cp == '@') {
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case RCACHESW:
icachesw = &rcachesw;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case AUTOSW:
autosw++;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case RCACHESW:
icachesw = &rcachesw;
snprintf (buf, sizeof(buf), "%s [switches] [users ...]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DATESW:
datesw++;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case IDSW:
if (!(cp = *argp++) || *cp == '-')
snprintf (help, sizeof(help), "%s [switches] [sequences]",
invo_name);
print_help (help, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FOLDERSSW:
if (!(folders = *argp++) || *folders == '-')
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FILESW:
if (file)
invo_name);
print_help (buf, switches, 1);
listsw = 0; /* HACK */
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
listsw = 0; /* HACK */
- done (1);
+ done (0);
case CCSW:
case DATESW:
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 0);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case LIBSW:
if (!(cp = *argp++) || *cp == '-')
snprintf (buffer, sizeof(buffer), "%s [switches] file",
invo_name);
print_help (buffer, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ERASESW:
if (!(erasep = *argp++) || *erasep == '-')
"%s [switches] [switches for postproc] address ...",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FORMSW:
if (!(form = *argp++) || *form == '-')
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case MBOXSW:
mbx_style = MBOX_FORMAT;
snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case SEQSW:
if (!(cp = *argp++) || *cp == '-')
case HELPSW:
snprintf (buf, sizeof(buf), "%s [command ...]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case BIFFSW:
biff = 1;
snprintf (buf, sizeof(buf), "%s [msgs] [switches] +folder ...",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case LINKSW:
linkf++;
done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case GROUPSW:
groupreply++;
snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case INTRSW:
interactive = 1;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case UNLINKSW:
unlink_msgs++;
snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case CLRSW:
clearflag++;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [file] [switches]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DRAFTSW:
msgs[msgp++] = draft;
"%s [+folder] %s[switches] [switches for showproc]",
invo_name, mode == SHOW ? "[msgs] ": "");
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DRFTSW:
if (file)
snprintf (buf, sizeof(buf),
"%s [switches] [address info sender]", invo_name);
print_help (buf, switches, 0);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case ADDRSW:
if (!(addr = *argp++))/* allow -xyz arguments */
snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DATESW:
if (datesw)
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DEBUGSW:
debug++;
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case TOSW:
if (!(f1 = *argp++))
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
print_help (buf, whatnowswitches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case DFOLDSW:
if (dfolder)
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case CHKSW:
case NOCHKSW: