aboutsummaryrefslogtreecommitdiffstats
path: root/set.h
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-08-24 19:01:05 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2008-08-24 19:01:05 +0100
commit7125cb3775a0e384c0f2fc08fd56df9582199502 (patch)
tree7972791c53152194e4c5053801abd071c17128ca /set.h
parent934dddf3614eae2b4f305f42583b070bdbd5bc86 (diff)
Added SET_INVALID, which set evaluators should now return instead of NULL
when the given value is not accepted. This to allow certain variables actually be set to NULL (server, for example). This should fully close #444.
Diffstat (limited to 'set.h')
-rw-r--r--set.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/set.h b/set.h
index 8c722877..8ca6f9ec 100644
--- a/set.h
+++ b/set.h
@@ -43,6 +43,10 @@ struct set;
typedef char *(*set_eval) ( struct set *set, char *value );
+extern char *SET_INVALID;
+
+#define SET_NULL_OK 0x0100
+
typedef struct set
{
void *data; /* Here you can save a pointer to the
@@ -60,8 +64,8 @@ typedef struct set
int flags; /* See account.h, for example. set.c doesn't use
this (yet?). */
- /* Eval: Returns NULL if the value is incorrect or exactly the
- passed value variable. When returning a corrected value,
+ /* Eval: Returns SET_INVALID if the value is incorrect or exactly
+ the passed value variable. When returning a corrected value,
set_setstr() should be able to free() the returned string! */
set_eval eval;
struct set *next;