aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.h
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 /fetchmail.h
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 'fetchmail.h')
-rw-r--r--fetchmail.h9
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))