aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-12-14 21:27:50 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-12-14 21:27:50 +0000
commitb877a3f40400be9035d96b855b94c73a6f92c779 (patch)
treeca53d5783774ad4cbfdfcc4ca9f7692526071ad6 /options.c
parentf191f75af5ce76ce9ed72224bc3585ba9a39a73e (diff)
downloadfetchmail-b877a3f40400be9035d96b855b94c73a6f92c779.tar.gz
fetchmail-b877a3f40400be9035d96b855b94c73a6f92c779.tar.bz2
fetchmail-b877a3f40400be9035d96b855b94c73a6f92c779.zip
Cleanup of numeric option handling.
svn path=/trunk/; revision=1568
Diffstat (limited to 'options.c')
-rw-r--r--options.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/options.c b/options.c
index 70f25848..521028ac 100644
--- a/options.c
+++ b/options.c
@@ -276,9 +276,8 @@ struct query *ctl; /* option record to be initialized */
break;
case 'l':
case LA_LIMIT:
- ctl->limit = atoi(optarg);
- if (ctl->limit == 0)
- ctl->limit = -1;
+ c = atoi(optarg);
+ ctl->limit = NUM_VALUE(c);
break;
case 'r':
case LA_FOLDER:
@@ -301,21 +300,18 @@ struct query *ctl; /* option record to be initialized */
break;
case 'b':
case LA_BATCHLIMIT:
- ctl->batchlimit = atoi(optarg);
- if (ctl->batchlimit == 0)
- ctl->batchlimit = -1;
+ c = atoi(optarg);
+ ctl->batchlimit = NUM_VALUE(c);
break;
case 'B':
case LA_FETCHLIMIT:
- ctl->fetchlimit = atoi(optarg);
- if (ctl->fetchlimit == 0)
- ctl->fetchlimit = -1;
+ c = atoi(optarg);
+ ctl->fetchlimit = NUM_VALUE(c);
break;
case 'e':
case LA_EXPUNGE:
- ctl->expunge = atoi(optarg);
- if (ctl->expunge == 0)
- ctl->expunge = -1;
+ c = atoi(optarg);
+ ctl->expunge = NUM_VALUE(c);
break;
case 'm':
case LA_MDA: