Changes in set.h [56244c0:f3579fd]
Legend:
- Unmodified
- Added
- Removed
-
set.h
r56244c0 rf3579fd 69 69 set_setstr() should be able to free() the returned string! */ 70 70 set_eval eval; 71 void *eval_data;72 71 struct set *next; 73 72 } set_t; 74 73 75 74 /* Should be pretty clear. */ 76 set_t *set_add( set_t **head, c onst char *key, constchar *def, set_eval eval, void *data );75 set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data ); 77 76 78 77 /* Returns the raw set_t. Might be useful sometimes. */ 79 set_t *set_find( set_t **head, c onst char *key );78 set_t *set_find( set_t **head, char *key ); 80 79 81 80 /* Returns a pointer to the string value of this setting. Don't modify the 82 81 returned string, and don't free() it! */ 83 G_MODULE_EXPORT char *set_getstr( set_t **head, c onst char *key );82 G_MODULE_EXPORT char *set_getstr( set_t **head, char *key ); 84 83 85 84 /* Get an integer. In previous versions set_getint() was also used to read 86 85 boolean values, but this SHOULD be done with set_getbool() now! */ 87 G_MODULE_EXPORT int set_getint( set_t **head, c onst char *key );88 G_MODULE_EXPORT int set_getbool( set_t **head, c onst char *key );86 G_MODULE_EXPORT int set_getint( set_t **head, char *key ); 87 G_MODULE_EXPORT int set_getbool( set_t **head, char *key ); 89 88 90 89 /* set_setstr() strdup()s the given value, so after using this function 91 90 you can free() it, if you want. */ 92 int set_setstr( set_t **head, c onst char *key, char *value );93 int set_setint( set_t **head, c onst char *key, int value );94 void set_del( set_t **head, c onst char *key );95 int set_reset( set_t **head, c onst char *key );91 int set_setstr( set_t **head, char *key, char *value ); 92 int set_setint( set_t **head, char *key, int value ); 93 void set_del( set_t **head, char *key ); 94 int set_reset( set_t **head, char *key ); 96 95 97 96 /* Two very useful generic evaluators. */ 98 97 char *set_eval_int( set_t *set, char *value ); 99 98 char *set_eval_bool( set_t *set, char *value ); 100 101 /* Another more complicated one. */102 char *set_eval_list( set_t *set, char *value );103 99 104 100 /* Some not very generic evaluators that really shouldn't be here... */
Note: See TracChangeset
for help on using the changeset viewer.