diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c index 24637033ca..86fac28f8e 100644 --- a/app/core/gimp-utils.c +++ b/app/core/gimp-utils.c @@ -858,6 +858,29 @@ gimp_ascii_strtod (const gchar *nptr, return TRUE; } +gint +gimp_list_compare (GList *list1, + GList *list2) +{ + while (list1 && list2) + { + if (list1->data < list2->data) + return -1; + else if (list1->data > list2->data) + return +1; + + list1 = g_list_next (list1); + list2 = g_list_next (list2); + } + + if (! list1) + return -1; + else if (! list2) + return +1; + + return 0; +} + /* debug stuff */ diff --git a/app/core/gimp-utils.h b/app/core/gimp-utils.h index 866936c682..719a5e489d 100644 --- a/app/core/gimp-utils.h +++ b/app/core/gimp-utils.h @@ -98,6 +98,9 @@ gboolean gimp_ascii_strtod (const gchar *nptr, gchar **endptr, gdouble *result); +gint gimp_list_compare (GList *list1, + GList *list2); + GimpImage * gimp_create_image_from_buffer (Gimp *gimp, GeglBuffer *buffer, const gchar *image_name);