aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-26 02:37:50 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-26 02:37:50 +0000
commit74631396d18f4c5b025e9cbbb70d0103c783037e (patch)
treee0fe83315284fa905cdecd51108a170815889cec /options.c
parentad0c91eabd0349b5f1468b52a9b37a6bb028841b (diff)
downloadfetchmail-74631396d18f4c5b025e9cbbb70d0103c783037e.tar.gz
fetchmail-74631396d18f4c5b025e9cbbb70d0103c783037e.tar.bz2
fetchmail-74631396d18f4c5b025e9cbbb70d0103c783037e.zip
Added filtering by length. Ugh.
svn path=/trunk/; revision=390
Diffstat (limited to 'options.c')
-rw-r--r--options.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/options.c b/options.c
index f6899e11..57d7f427 100644
--- a/options.c
+++ b/options.c
@@ -31,12 +31,13 @@
#define LA_KEEP 18
#define LA_FLUSH 19
#define LA_NOREWRITE 20
-#define LA_REMOTEFILE 21
-#define LA_SMTPHOST 22
-#define LA_MDA 23
-#define LA_YYDEBUG 24
+#define LA_LIMIT 21
+#define LA_REMOTEFILE 22
+#define LA_SMTPHOST 23
+#define LA_MDA 24
+#define LA_YYDEBUG 25
-static char *shortoptions = "?Vcsvd:qL:f:i:p:P:A:t:u:akKFnr:S:m:y";
+static char *shortoptions = "?Vcsvd:qL:f:i:p:P:A:t:u:akKFnl:r:S:m:y";
static struct option longoptions[] = {
{"help", no_argument, (int *) 0, LA_HELP },
{"version", no_argument, (int *) 0, LA_VERSION },
@@ -63,6 +64,7 @@ static struct option longoptions[] = {
{"keep", no_argument, (int *) 0, LA_KEEP },
{"flush", no_argument, (int *) 0, LA_FLUSH },
{"norewrite", no_argument, (int *) 0, LA_NOREWRITE },
+ {"limit", required_argument, (int *) 0, LA_LIMIT },
{"remote", required_argument, (int *) 0, LA_REMOTEFILE },
{"smtphost", required_argument, (int *) 0, LA_SMTPHOST },
@@ -202,6 +204,10 @@ struct hostrec *queryctl; /* option record to be initialized */
case LA_NOREWRITE:
queryctl->norewrite = TRUE;
break;
+ case 'l':
+ case LA_LIMIT:
+ queryctl->limit = atoi(optarg);
+ break;
case 'r':
case LA_REMOTEFILE:
strncpy(queryctl->mailbox,optarg,sizeof(queryctl->mailbox)-1);
@@ -260,7 +266,8 @@ struct hostrec *queryctl; /* option record to be initialized */
fputs(" -K, --kill delete new messages after retrieval\n", stderr);
fputs(" -k, --keep save new messages after retrieval\n", stderr);
fputs(" -F, --flush delete old messages from server\n", stderr);
- fputs(" -n, --norewrite don't rewrite header addresses\n", stderr);
+ fputs(" -n, --norewrite don't rewrite header addresses\n", stderr);
+ fputs(" -l, --limit don't fetch messages over given size\n", stderr);
fputs(" -S, --smtphost set SMTP forwarding host\n", stderr);
fputs(" -r, --remote specify remote folder name\n", stderr);