/* SccsId = "@(#)define.h 4.3 (TU-Delft) 04/20/93" */
/**********************************************************

Name/Version      : space/4.3

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Author(s)         : A.J. van Genderen
		  : N.P. van der Meijs
Creation date     : 15-Mar-1988
Modified by       :
Modification date :


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1988. All rights reserved.
**********************************************************/
#define PREV(el,par)   ((el)->parentA == par ? ((el)->prevA) : ((el)->prevB))
#define NEXT(el,par)   ((el)->parentA == par ? ((el)->nextA) : ((el)->nextB))

#define APREV(el,par)  ((el)->parentA == par ? (&(el)->prevA) : (&(el)->prevB))
#define ANEXT(el,par)  ((el)->parentA == par ? (&(el)->nextA) : (&(el)->nextB))

#define OTHER(el,par)  ((el)->parentA == par ? (el)->parentB : (el)->parentA)

#define Grp(node) \
(((node) -> gr_father -> grp) ? ((node) -> gr_father -> grp) \
			      : (findRoot ((node)) -> grp))

#define TOR  1
#define CAP  2
#define RES  3

extern node_t * findRoot ();
