X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/0f4971d043c38bae1bfb95201622a1405110f899..33cfd5887ea8d05241b5b4749abbf7fdfadb51fe:/ll.h?ds=inline diff --git a/ll.h b/ll.h index 43a5bd3..fcdbc5a 100644 --- a/ll.h +++ b/ll.h @@ -1,11 +1,20 @@ /* * ll.h - various things of used for dealing with linked lists. * - * Jonathan McDowell + * Copyright 2000-2004 Jonathan McDowell * - * Copyright 2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. * - * $Id: ll.h,v 1.3 2003/06/04 20:57:10 noodles Exp $ + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __LL_H__ @@ -51,6 +60,15 @@ struct ll { */ struct ll *lladd(struct ll *curll, void *object); +/** + * lladdend - Add an item to the end of a linked list. + * @curll: The list to add to. Can be NULL to create a new list. + * @object: The object to add. + * + * Returns a pointer to the head of the new list. + */ +struct ll *lladdend(struct ll *curll, void *object); + /** * lldel - Remove an item from a linked list. * @curll: The list to remove the item from. @@ -93,7 +111,6 @@ unsigned long llsize(struct ll *curll); * objectfree then it's called for each element to free them, if it's NULL * just the list is freed. */ -struct ll *llfree(struct ll *curll, - void (*objectfree) (void *object)); +void llfree(struct ll *curll, void (*objectfree) (void *object)); #endif /* __LL_H__ */