/* Returns: the position of the element in the #GSList, or -1 if the element is not found  */
gint g_slist_position(GSList *list, GSList *llink)
/* Returns: the position of the element in the #GSList, or -1 if the element is not found  */
gint g_slist_position(GSList *list, GSList *llink)
{
  gint i;
  i = 0;
  while (list)
    {
      if (list == llink)
        return i;
      i++;
      list = list->next;
    }
  return -1;
}