/* MPMorph - Amiga Morphing program */
/* Copyright (C) © 1993  Topicsave Limited */

/* 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 */
/* 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., 675 Mass Ave, Cambridge, MA 02139, USA. */

/* mpaddock@cix.compulink.co.uk */

#include "unix.h"

/* Duplicates of EXEC list functions */
extern void
Remove (struct Node *node) {
	struct Node *pre,*post;
	pre = node->mln_Pred;
	post = node->mln_Succ;
	pre->mln_Succ = post;
	post->mln_Pred = pre;
}

extern void
AddTail(struct List *list,struct Node *node) {
	struct Node *Last;
	Last = list->lh_TailPred;
	Last->mln_Succ = node;
	node->mln_Succ = (struct Node *)&(list->lh_Tail);
	node->mln_Pred = Last;
	list->lh_TailPred = node;
}

extern void
NewList(struct List *list) {
	list->lh_Head = (struct Node *) &(list->lh_Tail);
	list->lh_Tail = 0;
	list->lh_TailPred = (struct Node *) &(list->lh_Head);
}
