aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-01-06 16:22:05 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-01-06 16:22:05 +0000
commit8cc3bbfc406d380f93b87dad210ca84e6d7f65ba (patch)
tree6e6b41f718f8cb77b0b3e4f0c98388872490f272 /options.c
parent1a77235ca263572e25cf69dde26ed52e35fa2a4b (diff)
downloadfetchmail-8cc3bbfc406d380f93b87dad210ca84e6d7f65ba.tar.gz
fetchmail-8cc3bbfc406d380f93b87dad210ca84e6d7f65ba.tar.bz2
fetchmail-8cc3bbfc406d380f93b87dad210ca84e6d7f65ba.zip
Byrial Jensen's fixes.
svn path=/trunk/; revision=2335
Diffstat (limited to 'options.c')
-rw-r--r--options.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/options.c b/options.c
index 63238ea5..db6724c8 100644
--- a/options.c
+++ b/options.c
@@ -229,8 +229,9 @@ struct query *ctl; /* option record to be initialized */
*/
int c;
- int ocount = 0; /* count of destinations specified */
- int errflag = 0; /* TRUE when a syntax error is detected */
+ int ocount = 0; /* count of destinations specified */
+ int errflag = 0; /* TRUE when a syntax error is detected */
+ int helpflag = 0; /* TRUE when option help was explicitly requested */
int option_index;
char *buf, *cp;
@@ -540,13 +541,13 @@ struct query *ctl; /* option record to be initialized */
case '?':
case LA_HELP:
default:
- errflag++;
+ helpflag++;
}
}
- if (errflag || ocount > 1) {
+ if (errflag || ocount > 1 || helpflag) {
/* squawk if syntax errors were detected */
-#define P(s) fputs(s, stderr)
+#define P(s) fputs(s, helpflag ? stdout : stderr)
P(_("usage: fetchmail [options] [server ...]\n"));
P(_(" Options are as follows:\n"));
P(_(" -?, --help display this option help\n"));