diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-09-12 11:59:39 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-09-12 11:59:39 +0000 |
commit | c64bc78c091837def7820299eb99ed51a21570d8 (patch) | |
tree | 11f97f7a8dfc7f910e62538f840040e233fa0ea3 /options.c | |
parent | 3490078bdc134e2464dfb35711b6e08dfad7a8da (diff) | |
download | fetchmail-c64bc78c091837def7820299eb99ed51a21570d8.tar.gz fetchmail-c64bc78c091837def7820299eb99ed51a21570d8.tar.bz2 fetchmail-c64bc78c091837def7820299eb99ed51a21570d8.zip |
Added port-specification option.
svn path=/trunk/; revision=87
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -36,11 +36,12 @@ #define LA_REMOTEFILE 15 #define LA_LOCALFILE 16 #define LA_MDA 17 -#define LA_SMTPHOST 18 -#define LA_LOGFILE 19 -#define LA_QUIT 20 -#define LA_NOREWRITE 21 -#define LA_YYDEBUG 22 +#define LA_PORT 18 +#define LA_SMTPHOST 19 +#define LA_LOGFILE 20 +#define LA_QUIT 21 +#define LA_NOREWRITE 22 +#define LA_YYDEBUG 23 static char *shortoptions = "23PVaKkvS:scl:Fd:f:u:r:o:m:L:qN"; static struct option longoptions[] = { @@ -62,6 +63,7 @@ static struct option longoptions[] = { {"remote", required_argument, (int *) 0, LA_REMOTEFILE }, {"local", required_argument, (int *) 0, LA_LOCALFILE }, {"mda", required_argument, (int *) 0, LA_MDA }, + {"port", required_argument, (int *) 0, LA_PORT }, {"smtphost", required_argument, (int *) 0, LA_SMTPHOST }, {"logfile", required_argument, (int *) 0, LA_LOGFILE }, {"idfile", required_argument, (int *) 0, LA_IDFILE }, @@ -220,6 +222,10 @@ struct hostrec *queryctl; case LA_MDA: strncpy(queryctl->mda,optarg,sizeof(queryctl->mda)-1); break; + case 'P': + case LA_PORT: + queryctl->port = strtol(optarg,0,0L); + break; case 'S': case LA_SMTPHOST: if (fflag) |