From f1bba128929778c21168e84b8970f6623611dc6e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 18 Sep 2007 11:36:55 +0000 Subject: API change! rc_strlist_add and friends now take char *** instead of char ** and return a pointer to the item added instead of the new list head. This is so we can easily tell if the item was successfully added or not instead of iterating through the list looking for it. list = rc_strlist_add (list, item); becomes rc_strlist_add (&list, item); --- src/rc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/rc.h') diff --git a/src/rc.h b/src/rc.h index 8f73fca9..9a8fec8f 100644 --- a/src/rc.h +++ b/src/rc.h @@ -197,12 +197,12 @@ char **rc_filter_env (void); char **rc_config_env (char **env); /* Handy functions for dealing with string arrays of char ** */ -char **rc_strlist_add (char **list, const char *item); -char **rc_strlist_addu (char **list, const char *item); -char **rc_strlist_addsort (char **list, const char *item); -char **rc_strlist_addsortc (char **list, const char *item); -char **rc_strlist_addsortu (char **list, const char *item); -char **rc_strlist_delete (char **list, const char *item); +char *rc_strlist_add (char ***list, const char *item); +char *rc_strlist_addu (char ***list, const char *item); +char *rc_strlist_addsort (char ***list, const char *item); +char *rc_strlist_addsortc (char ***list, const char *item); +char *rc_strlist_addsortu (char ***list, const char *item); +int rc_strlist_delete (char ***list, const char *item); char **rc_strlist_join (char **list1, char **list2); void rc_strlist_reverse (char **list); void rc_strlist_free (char **list); -- cgit v1.2.3