From b877a3f40400be9035d96b855b94c73a6f92c779 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 14 Dec 1997 21:27:50 +0000 Subject: Cleanup of numeric option handling. svn path=/trunk/; revision=1568 --- options.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'options.c') 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: -- cgit v1.2.3