Hm. What about alpm_list_remove_node?
I believe I snuck your thing in there too, assuming I understood it correctly:
You stated that alpm_list_remove, when removing ALL items from a list only returned the last found data pointer. I adjusted the remove function to only remove the first item.
No. I meant that removing the first node with alpm_list_remove_node will create a "->next circle" now, because node->prev always != NULL. Other issue: If I assume, that alpm_list_reverse shouldn't free the input list (it doesn't free it now), then 1. /* break our reverse circular list */ will corrupt the input list without restoring 2. files = alpm_list_reverse(files) in your remove.c.diff is a memleak. Bye ---------------------------------------------------- SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu This mail sent through IMP: http://horde.org/imp/