/*
 * Copyright 1990 by Baylor College of Medicine ALL RIGHTS RESERVED. 
 *
 * This program is subject to a license agreement between 
 * Baylor College of Medicine and MIT. Any use inconsistent with
 * said license and any use by persons other than the faculty, 
 * students and staff at MIT or any use on a computer not operated 
 * as part of the Athena Computing Environment (ACE) is expressly 
 * prohibited.
 */
typedef struct llink *LLINK ;

typedef struct {
	LLINK first ;
	LLINK *last ;
	int size ;
} *LLIST ;
	
#define FOR_EACH_LINK(l,ll) for(l = ll->first; l; l = l->next)

LLINK add_link() ;
void del_link() ;
void del_list() ;
LLINK *get_n_link() ;
LLIST init_list() ;

struct llink {

	unsigned char *lr ;

	LLINK *prev ;	/* Pointer to the pointer of self */
	LLINK next ;	/* Pointer to next */
} ;

#define add_beginning(lr,ll) add_link(lr,&(ll)->first,ll)
#define add_last(lr,ll) add_link(lr,(ll)->last,ll)
