Utility function to free a GList of strings.
svn path=/trunk/; revision=3048
This commit is contained in:
@ -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
|
||||
|
||||
@ -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 *
|
||||
|
||||
@ -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 *
|
||||
|
||||
@ -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_ */
|
||||
|
||||
@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user