00001 /* $Id: nodelist.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */ 00002 /* vim:set shiftwidth=4 ts=8: */ 00003 00004 /********************************************************** 00005 * This software is part of the graphviz package * 00006 * http://www.graphviz.org/ * 00007 * * 00008 * Copyright (c) 1994-2004 AT&T Corp. * 00009 * and is licensed under the * 00010 * Common Public License, Version 1.0 * 00011 * by AT&T Corp. * 00012 * * 00013 * Information and Software Systems Research * 00014 * AT&T Research, Florham Park NJ * 00015 **********************************************************/ 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 #ifndef NODELIST_H 00022 #define NODELIST_H 00023 00024 #include <render.h> 00025 00026 typedef struct nodelistitem nodelistitem_t; 00027 00028 struct nodelistitem { 00029 node_t *curr; 00030 nodelistitem_t *next; 00031 nodelistitem_t *prev; 00032 }; 00033 00034 typedef struct { 00035 nodelistitem_t *first; 00036 nodelistitem_t *last; 00037 int sz; 00038 } nodelist_t; 00039 00040 extern nodelist_t *mkNodelist(void); 00041 extern void freeNodelist(nodelist_t *); 00042 extern int sizeNodelist(nodelist_t * list); 00043 00044 extern void appendNodelist(nodelist_t *, nodelistitem_t *, 00045 Agnode_t * n); 00046 /* extern void removeNodelist(nodelist_t* list, Agnode_t* n); */ 00047 /* extern int node_exists(nodelist_t* list, Agnode_t* n); */ 00048 /* extern int nodename_exists(nodelist_t* list, char* n); */ 00049 extern int node_position(nodelist_t * list, Agnode_t * n); 00050 00051 extern void realignNodelist(nodelist_t * list, nodelistitem_t * n); 00052 extern void insertNodelist(nodelist_t *, Agnode_t *, Agnode_t *, int); 00053 00054 extern void reverseAppend(nodelist_t *, nodelist_t *); 00055 extern nodelist_t *reverseNodelist(nodelist_t * list); 00056 extern nodelist_t *cloneNodelist(nodelist_t * list); 00057 00058 #ifdef DEBUG 00059 extern void printNodelist(nodelist_t * list); 00060 #endif 00061 00062 #endif 00063 00064 #ifdef __cplusplus 00065 } 00066 #endif