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 /fetchmail.h | |
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 'fetchmail.h')
-rw-r--r-- | fetchmail.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fetchmail.h b/fetchmail.h index c8989a04..5fafe8bf 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -161,6 +161,15 @@ struct query struct query *next; /* next query control block in chain */ }; +/* + * Numeric option handling. Numeric option value of zero actually means + * it's unspecified. Value less than zero is zero. + */ +#define NUM_VALUE(n) (((n) == 0) ? -1 : (n)) +#define NUM_NONZERO(n) ((n) > 0) +#define NUM_ZERO(n) ((n) < 0) +#define NUM_SPECIFIED(n) ((n) != 0) + #define MULTIDROP(ctl) (ctl->wildcard || \ ((ctl)->localnames && (ctl)->localnames->next)) |