Changeset 56244c0
- Timestamp:
- 2010-03-12T00:38:40Z (15 years ago)
- Branches:
- master
- Children:
- 4dc6b8d
- Parents:
- fdba6bc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
set.c
rfdba6bc r56244c0 213 213 } 214 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. May 225 want to fix that. */ 226 227 return NULL; 228 } 229 215 230 char *set_eval_to_char( set_t *set, char *value ) 216 231 { -
set.h
rfdba6bc r56244c0 69 69 set_setstr() should be able to free() the returned string! */ 70 70 set_eval eval; 71 void *eval_data; 71 72 struct set *next; 72 73 } set_t; … … 98 99 char *set_eval_bool( set_t *set, char *value ); 99 100 101 /* Another more complicated one. */ 102 char *set_eval_list( set_t *set, char *value ); 103 100 104 /* Some not very generic evaluators that really shouldn't be here... */ 101 105 char *set_eval_to_char( set_t *set, char *value );
Note: See TracChangeset
for help on using the changeset viewer.