aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-01 05:50:28 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-01 05:50:28 +0000
commit62de2ec3f7d426a042992c33f38607149d2d2e70 (patch)
tree62380431f3c206271aad803d818c48ae8a2edf26 /options.c
parent81f71a661244270810643d8e215502c8fc832af5 (diff)
downloadfetchmail-62de2ec3f7d426a042992c33f38607149d2d2e70.tar.gz
fetchmail-62de2ec3f7d426a042992c33f38607149d2d2e70.tar.bz2
fetchmail-62de2ec3f7d426a042992c33f38607149d2d2e70.zip
Kill off -2 and -3.
svn path=/trunk/; revision=183
Diffstat (limited to 'options.c')
-rw-r--r--options.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/options.c b/options.c
index 492bf5a9..84556c42 100644
--- a/options.c
+++ b/options.c
@@ -36,9 +36,10 @@
#define LA_LOGFILE 16
#define LA_QUIT 17
#define LA_NOREWRITE 18
-#define LA_YYDEBUG 19
+#define LA_HELP 19
+#define LA_YYDEBUG 20
-static char *shortoptions = "23PVaKkvS:sFd:f:u:r:L:qN";
+static char *shortoptions = "PVaKkvS:sFd:f:u:r:L:qN?";
static struct option longoptions[] = {
{"version", no_argument, (int *) 0, LA_VERSION },
{"all", no_argument, (int *) 0, LA_ALL },
@@ -59,6 +60,7 @@ static struct option longoptions[] = {
{"logfile", required_argument, (int *) 0, LA_LOGFILE },
{"quit", no_argument, (int *) 0, LA_QUIT },
{"norewrite", no_argument, (int *) 0, LA_NOREWRITE },
+ {"help", no_argument, (int *) 0, LA_HELP },
{"yydebug", no_argument, (int *) 0, LA_YYDEBUG },
{(char *) 0, no_argument, (int *) 0, 0 }
};
@@ -81,7 +83,7 @@ static struct option longoptions[] = {
syntax errors.
calls: none.
globals: writes outlevel, versioninfo, yydebug, logfile,
- poll_interval, quitmode, rcfile, idfile.
+ poll_interval, quitmode, rcfile
*********************************************************************/
int parsecmdline (argc,argv,queryctl)
@@ -105,12 +107,6 @@ struct hostrec *queryctl;
longoptions,&option_index)) != -1) {
switch (c) {
- case '2':
- queryctl->protocol = P_POP2;
- break;
- case '3':
- queryctl->protocol = P_POP3;
- break;
case 'V':
case LA_VERSION:
versioninfo = !0;
@@ -204,6 +200,8 @@ struct hostrec *queryctl;
case LA_YYDEBUG:
yydebug = 1;
break;
+ case '?':
+ case LA_HELP:
default:
errflag++;
}
@@ -212,9 +210,8 @@ struct hostrec *queryctl;
if (errflag) {
/* squawk if syntax errors were detected */
fputs("usage: fetchmail [options] [server ...]\n", stderr);
- fputs(" options\n",stderr);
- fputs(" -2 use POP2 protocol\n", stderr);
- fputs(" -3 use POP3 protocol\n", stderr);
+ fputs(" Options are as follows:\n",stderr);
+ fputs(" -?, --help display this option help\n", stderr);
fputs(" -p, --protocol specify pop2, pop3, imap, apop\n", stderr);
fputs(" -V, --version display version info\n", stderr);
fputs(" -a, --all retrieve old and new messages\n", stderr);
@@ -227,8 +224,7 @@ struct hostrec *queryctl;
fputs(" -v, --verbose work noisily (diagnostic output)\n", stderr);
fputs(" -d, --daemon run as a daemon once per n seconds\n", stderr);
fputs(" -f, --fetchmailrc specify alternate run control file\n", stderr);
- fputs(" -i, --idfile specify alternate ID database\n", stderr);
- fputs(" -u, --username specify server user ID\n", stderr);
+ fputs(" -u, --username specify users's login on server\n", stderr);
fputs(" -r, --remote specify remote folder name\n", stderr);
fputs(" -L, --logfile specify logfile name\n", stderr);
return(-1);
@@ -248,7 +244,7 @@ struct hostrec *queryctl;
return value: zero if defaults were successfully set, else non-zero
(indicates a problem reading /etc/passwd).
calls: none.
- globals: writes outlevel, rcfile, idfile.
+ globals: writes outlevel, rcfile.
*********************************************************************/
#include <stdlib.h>