diff options
-rw-r--r-- | e-util/ChangeLog | 4 | ||||
-rw-r--r-- | e-util/e-util.c | 11 | ||||
-rw-r--r-- | e-util/e-util.c-8611 | 11 | ||||
-rw-r--r-- | e-util/e-util.h | 12 | ||||
-rw-r--r-- | e-util/e-util.h-29002 | 12 |
5 files changed, 40 insertions, 10 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 015d840969..a672adfa2d 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,7 @@ +2000-05-15 Ettore Perazzoli <ettore@helixcode.com> + + * e-util.c (e_free_string_list): New function. + 2000-05-14 Christopher James Lahey <clahey@helixcode.com> * e-util.c, e-util.h: Added e_strdup_strip which returns a copy of diff --git a/e-util/e-util.c b/e-util/e-util.c index 33c10aba5c..fd167599df 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -74,6 +74,17 @@ e_free_object_list (GList *list) g_list_free (list); } +void +e_free_string_list (GList *list) +{ + GList *p; + + for (p = list; p != NULL; p = p->next) + g_free (p->data); + + g_list_free (list); +} + #define BUFF_SIZE 1024 char * diff --git a/e-util/e-util.c-8611 b/e-util/e-util.c-8611 index 33c10aba5c..fd167599df 100644 --- a/e-util/e-util.c-8611 +++ b/e-util/e-util.c-8611 @@ -74,6 +74,17 @@ e_free_object_list (GList *list) g_list_free (list); } +void +e_free_string_list (GList *list) +{ + GList *p; + + for (p = list; p != NULL; p = p->next) + g_free (p->data); + + g_list_free (list); +} + #define BUFF_SIZE 1024 char * diff --git a/e-util/e-util.h b/e-util/e-util.h index 2043235cf7..fef56c0531 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -31,12 +31,14 @@ typedef enum { E_FOCUS_END } EFocus; -int g_str_compare(const void *x, const void *y); -int g_int_compare(const void *x, const void *y); +int g_str_compare (const void *x, const void *y); +int g_int_compare (const void *x, const void *y); -char *e_strdup_strip(char *string); +char *e_strdup_strip (char *string); -void e_free_object_list (GList *list); -char *e_read_file(const char *filename); +void e_free_object_list (GList *list); +void e_free_string_list (GList *list); + +char *e_read_file (const char *filename); #endif /* _E_UTIL_H_ */ diff --git a/e-util/e-util.h-29002 b/e-util/e-util.h-29002 index 2043235cf7..fef56c0531 100644 --- a/e-util/e-util.h-29002 +++ b/e-util/e-util.h-29002 @@ -31,12 +31,14 @@ typedef enum { E_FOCUS_END } EFocus; -int g_str_compare(const void *x, const void *y); -int g_int_compare(const void *x, const void *y); +int g_str_compare (const void *x, const void *y); +int g_int_compare (const void *x, const void *y); -char *e_strdup_strip(char *string); +char *e_strdup_strip (char *string); -void e_free_object_list (GList *list); -char *e_read_file(const char *filename); +void e_free_object_list (GList *list); +void e_free_string_list (GList *list); + +char *e_read_file (const char *filename); #endif /* _E_UTIL_H_ */ |