/************************************************************************/
/* Copyright 2002 MBARI													*/
/************************************************************************/
/* Summary	: Definitions for Linked List library for OASIS				*/
/* Filename : list.h													*/
/* Author	: Robert Herlien (rah)										*/
/* Project	: OASIS Mooring Replacement (OASIS3)						*/
/* Revision: 0.1														*/
/* Created	: 10/14/2002												*/
/*																			*/
/* MBARI provides this documentation and code "as is", with no warranty,	*/
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium	*/
/* Research Institute to assist in its use, correction, modification, or	*/
/* enhancement. This information should not be published or distributed to	*/
/* third parties without specific written permission from MBARI.			*/
/*																			*/
/************************************************************************/
/* Modification History:												*/
/* 10oct2002 rah - created from OASIS io.h								*/
/************************************************************************/

#ifndef INClistLibh
#define INClistLibh		1

#define NULLNODE		((Node *)0)
typedef struct node		Node;			/* Node in linked list				*/

struct node								/************************************/
{										/* List Node structure				*/
	Node		*lst_next;				/* Pointer to next node				*/
	Node		*lst_prev;				/* Pointer to previous node			*/
};										/************************************/

typedef struct list_head				/************************************/
{										/* LstHead STRUCTURE				*/
	Node		*lst_head;				/* Head of linked list of tasks		*/
	Node		*lst_tail;				/* Tail of linked list of tasks		*/
} LstHead;								/************************************/


/****************************************/
/* Function Declarations				*/
/****************************************/

Void	list_init( LstHead *lp );
Node	*list_head( LstHead *lp );
Void	list_add( LstHead *lp, Node *np );
Node	*list_get( LstHead *lp, Node *np );
Node	*list_first( LstHead *lp );
Node	*list_next( Node *np );
MBool	listIsOnList( LstHead *lp, Node *np );
Nat16	list_count( LstHead *lp );

#endif	/* INClistLibh */
