Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • set.c

    r56244c0 rf3579fd  
    2929char *SET_INVALID = "nee";
    3030
    31 set_t *set_add( set_t **head, const char *key, const char *def, set_eval eval, void *data )
     31set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data )
    3232{
    3333        set_t *s = set_find( head, key );
     
    6363}
    6464
    65 set_t *set_find( set_t **head, const char *key )
     65set_t *set_find( set_t **head, char *key )
    6666{
    6767        set_t *s = *head;
     
    7777}
    7878
    79 char *set_getstr( set_t **head, const char *key )
     79char *set_getstr( set_t **head, char *key )
    8080{
    8181        set_t *s = set_find( head, key );
     
    8787}
    8888
    89 int set_getint( set_t **head, const char *key )
     89int set_getint( set_t **head, char *key )
    9090{
    9191        char *s = set_getstr( head, key );
     
    101101}
    102102
    103 int set_getbool( set_t **head, const char *key )
     103int set_getbool( set_t **head, char *key )
    104104{
    105105        char *s = set_getstr( head, key );
     
    111111}
    112112
    113 int set_setstr( set_t **head, const char *key, char *value )
     113int set_setstr( set_t **head, char *key, char *value )
    114114{
    115115        set_t *s = set_find( head, key );
     
    150150}
    151151
    152 int set_setint( set_t **head, const char *key, int value )
     152int set_setint( set_t **head, char *key, int value )
    153153{
    154154        char s[24];     /* Not quite 128-bit clean eh? ;-) */
     
    158158}
    159159
    160 void set_del( set_t **head, const char *key )
     160void set_del( set_t **head, char *key )
    161161{
    162162        set_t *s = *head, *t = NULL;
     
    182182}
    183183
    184 int set_reset( set_t **head, const char *key )
     184int set_reset( set_t **head, char *key )
    185185{
    186186        set_t *s;
     
    211211{
    212212        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. May
    225                  want to fix that. */
    226        
    227         return NULL;
    228213}
    229214
Note: See TracChangeset for help on using the changeset viewer.