/************************************************************/
/************************************************************/
/**                                                        **/
/**                     LIST                               **/
/**                                                        **/
/**  Singly linked lists of arbitrary length potentially   **/
/**  including cycles.                                     **/
/**                                                        **/
/**  Copyright (C) 1996, 1997, 1998, 1999, 2000            **/
/**  MPI fuer Informatik                                   **/
/**                                                        **/
/**  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         **/
/**                                                        **/
/**                                                        **/
/**             Author: Christoph Weidenbach               **/
/**                                                        **/
/**             Contact:                                   **/
/**             Christoph Weidenbach                       **/
/**             MPI fuer Informatik                        **/
/**             Stuhlsatzenhausweg 85                      **/
/**             66123 Saarbruecken                         **/
/**             Email: spass@mpi-inf.mpg.de                **/
/**             Germany                                    **/
/**                                                        **/
/************************************************************/
/************************************************************/


#ifndef _LIST_
#define _LIST_

/**************************************************************/
/* Includes                                                   */
/**************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


/**************************************************************/
/* Structures                                                 */
/**************************************************************/

typedef struct LIST_HELP {
  struct LIST_HELP *cdr;
  void*             car;
} LIST_NODE;

typedef LIST_NODE *LIST;

/**************************************************************/
/**************************************************************/
/*  This is the structure to implement linked lists where     */
/*     cdr  is the pointer to the next element, possibly NULL */
/*     car  holds the content of the current list node        */
/**************************************************************/
/**************************************************************/


/**************************************************************/
/* Functions                                                  */
/**************************************************************/


void    list_Init();
void    list_Free();

LIST    list_Create(void *);
LIST    list_AddElement(void *, LIST);
void*   list_Car(LIST);
void*   list_Cdr(LIST);
void    list_NodeFree(LIST);
void    list_Delete(LIST);

#endif

