2 * lists.c -- Includefile of lists.c
\r
3 * XBoard $Id: lists.h,v 2.1 2003/10/27 19:21:00 mann Exp $
\r
5 * Copyright 1995 Free Software Foundation, Inc.
\r
7 * ------------------------------------------------------------------------
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this program; if not, write to the Free Software
\r
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
\r
21 * ------------------------------------------------------------------------
\r
23 * This file could well be a part of backend.c, but I prefer it this
\r
31 /* Type definition: Node of a double linked list.
\r
33 typedef struct _ListNode {
\r
34 struct _ListNode *succ;
\r
35 struct _ListNode *pred;
\r
39 /* Type definition: Double linked list.
\r
41 * The list structure consists of two ListNode's: The pred entry of
\r
42 * the head being the succ entry of the tail. Thus a list is empty
\r
43 * if and only if it consists of 2 nodes. :-)
\r
46 struct _ListNode *head; /* The list structure consists of two */
\r
47 struct _ListNode *tail; /* ListNode's: The pred entry of the */
\r
48 struct _ListNode *tailPred; /* head being the succ entry of the */
\r
53 /* Function prototypes
\r
55 extern int ListEmpty P((List *));
\r
56 void ListNew P((List *));
\r
57 void ListRemove P((ListNode *));
\r
58 void ListNodeFree P((ListNode *));
\r
59 ListNode *ListNodeCreate P((size_t));
\r
60 void ListInsert P((ListNode *, ListNode *));
\r
61 void ListAddHead P((List *, ListNode *));
\r
62 void ListAddTail P((List *, ListNode *));
\r
63 ListNode *ListElem P((List *, int));
\r