/*
Copyright (C) 2003-2006 Andrey Nazarov

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; either version 2
of the License, or (at your option) any later version.

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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

//
// q_list.h
//

typedef struct listElem_s {
	struct list_s		*parent;

	struct listElem_s	*prev;
	struct listElem_s	*next;
} listElem_t;

typedef struct list_s {
	listElem_t	*first;
	listElem_t	*last;
} list_t;

void	List_Clear( list_t *list );
void	List_Free( list_t *list );

listElem_t	*List_Append( list_t *list, void *data );
listElem_t	*List_Insert( list_t *list, void *data );
listElem_t	*List_InsertAfter( listElem_t *after, void *data );
listElem_t	*List_InsertBefore( listElem_t *before, void *data );
void		List_DeleteElem( void *data );
int			List_CountElems( list_t *list );

