Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

list.h

Go to the documentation of this file.
00001 /*  $Id: list.h,v 1.4 2000/11/30 07:37:40 dbryson Exp $
00002 **
00003 **  Copyright (c) 2000 Derry Bryson <derry@techass.com>
00004 **
00005 **  Description:
00006 **  
00007 **    Postscript Library
00008 **
00009 **
00010 **  License:
00011 **
00012 **    This library is free software; you can redistribute it and/or
00013 **    modify it under the terms of the GNU Lesser General Public
00014 **    License as published by the Free Software Foundation; either
00015 **    version 2.1 of the License, or (at your option) any later version.
00016 **
00017 **    This library is distributed in the hope that it will be useful,
00018 **    but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 **    Lesser General Public License for more details.
00021 **
00022 **    You should have received a copy of the GNU Lesser General Public
00023 **    License along with this library; if not, write to the Free Software
00024 **    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 **
00026 **
00027 **  Contact:
00028 **
00029 **      Mail:
00030 **
00031 **        Technology Associates, Inc.
00032 **        LIBPS Project
00033 **        1455 Deming Way #11
00034 **        Sparks, NV  89431
00035 **        USA
00036 **
00037 **      Email:
00038 **
00039 **        libps@techass.com
00040 **
00041 **      See our website at:
00042 **
00043 **        libps.sourceforge.net
00044 **
00045 */
00046 
00050 #ifndef INCLUDE_LIST
00051 #define INCLUDE_LIST
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 /******************************************************************************
00058 ****  TYPEDEFS  ***************************************************************
00059 ******************************************************************************/
00060 
00065 typedef void (*PSListDestroyFunc)(void* value);
00066 
00071 typedef struct psListNode
00072 {
00073   struct psListNode
00074     *next,              
00075     *prev;              
00077   void
00078     *value;             
00079 } PSListNode;
00089 typedef struct psList
00090 {
00091   PSListNode
00092     *first,             
00093     *last;              
00095   long
00096     numNodes;
00097 
00098   PSListDestroyFunc
00099     destroyFunc;        
00100 } PSList;
00106 /******************************************************************************
00107 ****  FUNCTION PROTOTYPES  ****************************************************
00108 ******************************************************************************/
00109 
00110 PSList *psListAlloc(PSListDestroyFunc destroyFunc);
00111 void psListFree(PSList *list);
00112 PSListNode *psListInsert(PSList *list, PSListNode *node, void *value);
00113 void psListDelete(PSList *list, PSListNode *node);
00114 PSListNode *psListFirst(PSList *list);
00115 PSListNode *psListLast(PSList *list);
00116 PSListNode *psListNext(PSList *list, PSListNode *node);
00117 PSListNode *psListPrev(PSList *list, PSListNode *node);
00118 long psListNumNodes(PSList *list);
00119 void *psListGetValue(PSList *list, PSListNode *node);
00120 PSListNode *psListGetNode(PSList *list, long nodeNum);
00121 
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 #endif /* INCLUDE_LIST */

Generated at Mon Dec 11 22:46:27 2000 for Postscript Utility Library by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000