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 --- fetchmail.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'fetchmail.h') 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)) -- cgit v1.2.3