diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-12-14 21:27:50 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-12-14 21:27:50 +0000 |
commit | b877a3f40400be9035d96b855b94c73a6f92c779 (patch) | |
tree | ca53d5783774ad4cbfdfcc4ca9f7692526071ad6 /options.c | |
parent | f191f75af5ce76ce9ed72224bc3585ba9a39a73e (diff) | |
download | fetchmail-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.c | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -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: |