- Timestamp:
- 2010-06-07T14:31:07Z (14 years ago)
- Branches:
- master
- Children:
- 56699f0
- Parents:
- 0d9d53e (diff), 1fdb0a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
set.h
r0d9d53e r4aa0f6b 70 70 set_setstr() should be able to free() the returned string! */ 71 71 set_eval eval; 72 void *eval_data; 72 73 struct set *next; 73 74 } set_t; 74 75 75 76 /* Should be pretty clear. */ 76 set_t *set_add( set_t **head, c har *key,char *def, set_eval eval, void *data );77 set_t *set_add( set_t **head, const char *key, const char *def, set_eval eval, void *data ); 77 78 78 79 /* Returns the raw set_t. Might be useful sometimes. */ 79 set_t *set_find( set_t **head, c har *key );80 set_t *set_find( set_t **head, const char *key ); 80 81 81 82 /* Returns a pointer to the string value of this setting. Don't modify the 82 83 returned string, and don't free() it! */ 83 G_MODULE_EXPORT char *set_getstr( set_t **head, c har *key );84 G_MODULE_EXPORT char *set_getstr( set_t **head, const char *key ); 84 85 85 86 /* Get an integer. In previous versions set_getint() was also used to read 86 87 boolean values, but this SHOULD be done with set_getbool() now! */ 87 G_MODULE_EXPORT int set_getint( set_t **head, c har *key );88 G_MODULE_EXPORT int set_getbool( set_t **head, c har *key );88 G_MODULE_EXPORT int set_getint( set_t **head, const char *key ); 89 G_MODULE_EXPORT int set_getbool( set_t **head, const char *key ); 89 90 90 91 /* set_setstr() strdup()s the given value, so after using this function 91 92 you can free() it, if you want. */ 92 int set_setstr( set_t **head, c har *key, char *value );93 int set_setint( set_t **head, c har *key, int value );94 void set_del( set_t **head, c har *key );95 int set_reset( set_t **head, c har *key );93 int set_setstr( set_t **head, const char *key, char *value ); 94 int set_setint( set_t **head, const char *key, int value ); 95 void set_del( set_t **head, const char *key ); 96 int set_reset( set_t **head, const char *key ); 96 97 97 98 /* Two very useful generic evaluators. */ 98 99 char *set_eval_int( set_t *set, char *value ); 99 100 char *set_eval_bool( set_t *set, char *value ); 101 102 /* Another more complicated one. */ 103 char *set_eval_list( set_t *set, char *value ); 100 104 101 105 /* Some not very generic evaluators that really shouldn't be here... */
Note: See TracChangeset
for help on using the changeset viewer.