diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2009-12-07 21:54:19 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2009-12-07 21:54:19 +0000 |
commit | 2288705af462b4aca2d56f228bff269eab8d8b5f (patch) | |
tree | cbdf792579f11297773583cc822548867fdfc19c /set.h | |
parent | aac40178a6669e20855b7f5d3cc6a82cba10042e (diff) | |
parent | 36cf9fda6a5cc4bcbfe98319b48af636fa142590 (diff) |
Merging head.
Diffstat (limited to 'set.h')
-rw-r--r-- | set.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; @@ -87,7 +91,7 @@ G_MODULE_EXPORT int set_getbool( set_t **head, char *key ); int set_setstr( set_t **head, char *key, char *value ); int set_setint( set_t **head, char *key, int value ); void set_del( set_t **head, char *key ); -void set_reset( set_t **head, char *key ); +int set_reset( set_t **head, char *key ); /* Two very useful generic evaluators. */ char *set_eval_int( set_t *set, char *value ); |