Changes in set.c [56244c0:f3579fd]
Legend:
- Unmodified
- Added
- Removed
-
set.c
r56244c0 rf3579fd 29 29 char *SET_INVALID = "nee"; 30 30 31 set_t *set_add( set_t **head, c onst char *key, constchar *def, set_eval eval, void *data )31 set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data ) 32 32 { 33 33 set_t *s = set_find( head, key ); … … 63 63 } 64 64 65 set_t *set_find( set_t **head, c onst char *key )65 set_t *set_find( set_t **head, char *key ) 66 66 { 67 67 set_t *s = *head; … … 77 77 } 78 78 79 char *set_getstr( set_t **head, c onst char *key )79 char *set_getstr( set_t **head, char *key ) 80 80 { 81 81 set_t *s = set_find( head, key ); … … 87 87 } 88 88 89 int set_getint( set_t **head, c onst char *key )89 int set_getint( set_t **head, char *key ) 90 90 { 91 91 char *s = set_getstr( head, key ); … … 101 101 } 102 102 103 int set_getbool( set_t **head, c onst char *key )103 int set_getbool( set_t **head, char *key ) 104 104 { 105 105 char *s = set_getstr( head, key ); … … 111 111 } 112 112 113 int set_setstr( set_t **head, c onst char *key, char *value )113 int set_setstr( set_t **head, char *key, char *value ) 114 114 { 115 115 set_t *s = set_find( head, key ); … … 150 150 } 151 151 152 int set_setint( set_t **head, c onst char *key, int value )152 int set_setint( set_t **head, char *key, int value ) 153 153 { 154 154 char s[24]; /* Not quite 128-bit clean eh? ;-) */ … … 158 158 } 159 159 160 void set_del( set_t **head, c onst char *key )160 void set_del( set_t **head, char *key ) 161 161 { 162 162 set_t *s = *head, *t = NULL; … … 182 182 } 183 183 184 int set_reset( set_t **head, c onst char *key )184 int set_reset( set_t **head, char *key ) 185 185 { 186 186 set_t *s; … … 211 211 { 212 212 return is_bool( value ) ? value : SET_INVALID; 213 }214 215 char *set_eval_list( set_t *set, char *value )216 {217 GSList *options = set->eval_data, *opt;218 219 for( opt = options; opt; opt = opt->next )220 if( strcmp( value, opt->data ) == 0 )221 return value;222 223 /* TODO: It'd be nice to show the user a list of allowed values,224 but we don't have enough context here to do that. May225 want to fix that. */226 227 return NULL;228 213 } 229 214
Note: See TracChangeset
for help on using the changeset viewer.