glib: how to sort a doubly linked list?
- From: Joel Wijngaarde <vasquez xs4all nl>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: glib: how to sort a doubly linked list?
- Date: Mon, 01 Jun 1998 14:08:57 +0200
Hi
i noticed a function in glib called:
GList* g_list_insert_sorted (GList *list, gpointer data,
GCompareFunc func)
I'm wondering how i can use this function on a GList which contains a
pointer to a structure. The structure looks like this:
struct {
gchar *name
gchar *version
...
}
Now i want to sort the GList alphabetically, looking at the 'name' in
the data structure... Is there a way i can achieve this with the
function above?
Thanks!
Joel Wijngaarde
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]